Boost logo

Boost-Build :

Subject: [Boost-build] build static thread lib has undefined symbol : boost13thread_detail17enter_once_regionERNS_9once_flag
From: dasir (dansirbu101_at_[hidden])
Date: 2015-04-09 15:16:38


Hi,

  I am trying to build only the thread library from boost - version 1_57_0.
These are the steps that I follow:

    ./bootstrap.sh --with-libraries=thread,system
    ./b2 link=static threading=multi

  At the end I have the following undefined symbols:
[dasir_at_test bin.v2]# nm
./libs/thread/build/gcc-4.3/release/link-static/threading-multi/libboost_thread.a
| grep " U " | grep boost
                 U
_ZN5boost13thread_detail17enter_once_regionERNS_9once_flagE
                 U
_ZN5boost13thread_detail18commit_once_regionERNS_9once_flagE
                 U
_ZN5boost13thread_detail20rollback_once_regionERNS_9once_flagE
                 U _ZN5boost6system15system_categoryEv
                 U _ZN5boost6system16generic_categoryEv
                 U _ZN5boost6system15system_categoryEv
                 U _ZN5boost6system16generic_categoryEv
[dasir_at_test bin.v2]#

   What I find bizar is that the "so" version has only the system part:

[dasi_at_test bin.v2]# nm
./libs/thread/build/gcc-4.3/release/threading-multi/libboost_thread.so.1.57.0
| grep " U " | grep boost
                 U _ZN5boost6system15system_categoryEv
                 U _ZN5boost6system16generic_categoryEv

    Which I can get from the system .so file. It looks like the
once_atomic.cpp from thread/pthread is build ONLY for the SO ... since these
objects are defined there. And there is no:

[dasi_at_test pthread]# env | grep BOOST_THREAD_ONCE_ATOMIC
[dasi_at_test pthread]#

    Also, I am wondering is if it not possible to 'merge' both within one
'.a' without having me playing 'ar'.

    Thx.

BR,
Dan S.

    
 

--
View this message in context: http://boost.2283326.n4.nabble.com/build-static-thread-lib-has-undefined-symbol-boost13thread-detail17enter-once-regionERNS-9once-flag-tp4674362.html
Sent from the Boost - Build mailing list archive at Nabble.com.

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk