public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: 纪明 <jiming@yafco.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: undefined symbol: __atomic_store ?
Date: Thu, 07 Aug 2014 09:14:00 -0000	[thread overview]
Message-ID: <CAH6eHdRuhapZujXsUxTU7HzqiEozgcKNcScOG-15g9j0PXr3Rw@mail.gmail.com> (raw)
In-Reply-To: <53E34282.2030303@yafco.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.

      reply	other threads:[~2014-08-07  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  9:10 纪明
2014-08-07  9:14 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdRuhapZujXsUxTU7HzqiEozgcKNcScOG-15g9j0PXr3Rw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jiming@yafco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).