[Boost-bugs] [Boost C++ Libraries] #8810: Link error on some platforms: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'

Subject: [Boost-bugs] [Boost C++ Libraries] #8810: Link error on some platforms: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-10 13:21:04


#8810: Link error on some platforms: undefined reference to
`boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
----------------------------------------+----------------------
 Reporter: Gennady Proskurin <gpr@…> | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: get_lock_for |
----------------------------------------+----------------------
 Host platform: Linux 3.2.0-24-generic-pae i686
 Target platform: sh4, Linux 2.6.32.57-se
 Cross-compiler: gcc version 4.6.2 (crosstool-NG 1.16.0)

 When cross-compiling empty program
 {{{#!c++
 int main() {}
 }}}

 and linking it with boost_thread
 {{{
 $ ~/p4/all/IMAQLIQ_TV/r_2_pre_2238/platform/x-tools/sh4-unknown-linux-
 gnu/bin/sh4-unknown-linux-gnu-c++ once_test.cc -Wl,-rpath
 -Wl,/opt/boost_1_54_0/lib -L
 ~/p4/all/IMAQLIQ_TV/r_2_pre_2238/platform/buildroot-2011.08/output/target/usr/lib/
 -l boost_thread -l boost_system -I
 ~/p4/all/IMAQLIQ_TV/r_2_pre_2238/platform/buildroot-2011.08/output/staging/usr/include/
 -pthread
 }}}

 I have the following linker error:
 {{{
 /home/gpr/p4/all/IMAQLIQ_TV/r_2_pre_2238/platform/buildroot-2011.08/output/target/usr/lib//libboost_thread.so:
 undefined reference to
 `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
 collect2: ld returned 1 exit status
 }}}

 If I additionally link this program with boost_atomic, all compiles and
 links fine.

 Related discussion was on this thread:
 http://lists.boost.org/Archives/boost/2013/01/200160.php


 BoostThread library on target platform:
 {{{
 $ readelf -d libboost_thread.so.1.54.0

 Dynamic section at offset 0x15630 contains 28 entries:
   Tag Type Name/Value
  0x00000001 (NEEDED) Shared library:
 [libboost_system.so.1.54.0]
  0x00000001 (NEEDED) Shared library: [librt.so.1]
  0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
  0x00000001 (NEEDED) Shared library: [libm.so.6]
  0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
  0x00000001 (NEEDED) Shared library: [libpthread.so.0]
  0x00000001 (NEEDED) Shared library: [libc.so.6]
  0x00000001 (NEEDED) Shared library: [ld-linux.so.2]
  0x0000000e (SONAME) Library soname:
 [libboost_thread.so.1.54.0]
  0x0000000c (INIT) 0x9080
  0x0000000d (FINI) 0x11c00
  0x6ffffef5 (GNU_HASH) 0xd4
  0x00000005 (STRTAB) 0x2314
  0x00000006 (SYMTAB) 0xae4
  0x0000000a (STRSZ) 21470 (bytes)
  0x0000000b (SYMENT) 16 (bytes)
  0x00000003 (PLTGOT) 0x2573c
  0x00000002 (PLTRELSZ) 1404 (bytes)
  0x00000014 (PLTREL) RELA
  0x00000017 (JMPREL) 0x8afc
  0x00000007 (RELA) 0x7ae8
  0x00000008 (RELASZ) 4116 (bytes)
  0x00000009 (RELAENT) 12 (bytes)
  0x6ffffffe (VERNEED) 0x79f8
  0x6fffffff (VERNEEDNUM) 6
  0x6ffffff0 (VERSYM) 0x76f2
  0x6ffffff9 (RELACOUNT) 11
  0x00000000 (NULL) 0x0
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8810>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC