This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined symbol: __atomic_store ï
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: çæ <jiming at yafco dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 7 Aug 2014 10:14:11 +0100
- Subject: Re: undefined symbol: __atomic_store ï
- Authentication-results: sourceware.org; auth=none
- References: <53E34282 dot 2030303 at yafco dot com>
On 7 August 2014 10:10, çæ wrote:
> Hi allï
>
> I have gcc 4.9.0 installed in my system. When I tried to run an
> executable, I got the following error:
>
> libMyLib.so: undefined symbol: __atomic_store
>
> Then I tried to find this symbol in libstdc++.so with the following command:
>
> [workspace]$ nm -DC /usr/lib64/libstdc++.so | grep atomic
> 000000348e07bdb0 T __gnu_cxx::__atomic_add(int volatile*, int)
> 000000348e05c0c0 T
> std::__atomic0::atomic_flag::test_and_set(std::memory_order)
> 000000348e05c120 T std::__atomic0::atomic_flag::clear(std::memory_order)
> 000000348e05c0c0 T
> std::__atomic0::atomic_flag::test_and_set(std::memory_order) volatile
> 000000348e05c120 T std::__atomic0::atomic_flag::clear(std::memory_order)
> volatile
> 000000348e05c1b0 T __atomic_flag_for_address
> 000000348e05c180 T __atomic_flag_wait_explicit
> 000000348e05c170 T atomic_flag_clear_explicit
> 000000348e05c160 T atomic_flag_test_and_set_explicit
>
>
> There is no __atomic_store indeed. Did I miss some flags when installing
> gcc?
You didn't say what flags you used when installing it - or even what
platform you installed it on - are we supposed to guess?
This usually means you are on a target without atomic operations, so
you need to link to GCC's libatomic.so support library.