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


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

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

  At the end I have the following undefined symbols:
[dasir_at_test bin.v2]# nm
| grep " U " | grep boost
                 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
| 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'.


Dan S.


View this message in context:
Sent from the Boost - Build mailing list archive at

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at