From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15195 invoked by alias); 7 Aug 2014 09:14:16 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 15184 invoked by uid 89); 7 Aug 2014 09:14:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f54.google.com Received: from mail-la0-f54.google.com (HELO mail-la0-f54.google.com) (209.85.215.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 07 Aug 2014 09:14:14 +0000 Received: by mail-la0-f54.google.com with SMTP id hz20so3328308lab.27 for ; Thu, 07 Aug 2014 02:14:11 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.28.230 with SMTP id e6mr16080102lah.62.1407402851071; Thu, 07 Aug 2014 02:14:11 -0700 (PDT) Received: by 10.112.94.70 with HTTP; Thu, 7 Aug 2014 02:14:11 -0700 (PDT) In-Reply-To: <53E34282.2030303@yafco.com> References: <53E34282.2030303@yafco.com> Date: Thu, 07 Aug 2014 09:14:00 -0000 Message-ID: Subject: =?UTF-8?B?UmU6IHVuZGVmaW5lZCBzeW1ib2w6IF9fYXRvbWljX3N0b3JlIO+8nw==?= From: Jonathan Wakely To: =?UTF-8?B?57qq5piO?= Cc: gcc-help Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00050.txt.bz2 On 7 August 2014 10:10, =E7=BA=AA=E6=98=8E wrote: > Hi all=EF=BC=8C > > 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 comma= nd: > > [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.