public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* undefined symbol: __atomic_store ?
@ 2014-08-07  9:10 纪明
  2014-08-07  9:14 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: 纪明 @ 2014-08-07  9:10 UTC (permalink / raw)
  To: gcc-help

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?


Thanks,
Ming

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: undefined symbol: __atomic_store ?
  2014-08-07  9:10 undefined symbol: __atomic_store ? 纪明
@ 2014-08-07  9:14 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2014-08-07  9:14 UTC (permalink / raw)
  To: 纪明; +Cc: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-07  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  9:10 undefined symbol: __atomic_store ? 纪明
2014-08-07  9:14 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).