Bugzilla – Bug 2935
boost library detection fails on name variants
Last modified: 2019-11-05 18:07:45 EST
Many package managers have ways to support multiple versions of a single package, in particular boost. I encountered this first on my Mac, but it's also a problem on our Linux clusters. On my Mac I use Fink as my external package manager. It builds the boost libraries with a different file name format than expected by waf-tools/boost.py. Let's find the boost/system link library: $ ls /sw/opt/boost-1_63/lib/*_sys* /sw/opt/boost-1_63/lib/libboost_system-1_63.dylib* /sw/opt/boost-1_63/lib/libboost_system-mt-1_63.dylib* /sw/opt/boost-1_63/lib/libboost_system-mt.a /sw/opt/boost-1_63/lib/libboost_system-mt.dylib@ -> libboost_system-mt-1_63.dylib /sw/opt/boost-1_63/lib/libboost_system.a /sw/opt/boost-1_63/lib/libboost_system.dylib@ -> libboost_system-1_63.dylib Note the library 'libboost_system.dylib' exists, as a symlink to the real dylib, which include the boost version in the name. So let's configure: $ ./waf configure --boost-includes=/sw/opt/boost-1_63/include --boost-libs=/sw/opt/boost-1_63/lib —verbose ... Checking boost includes : 1_63 path : /sw/include Checking boost libs : ok path : /sw/opt/boost-1_63/lib shared libs : ['boost_system-1_63', 'boost_signals-1_63', 'boost_filesystem-1_63'] static libs : [] Checking for boost linkage : 11:26:54 runner ['g++-7', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-I/sw/include', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DPYTHONDIR="/usr/local/lib/python2.7/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/site-packages"', '-DHAVE_PYEMBED=1', '-DHAVE_PYEXT=1', '-DHAVE_PYTHON_H=1', '../test.cpp', '-c', '-o', '/Users/barnes26/Code/netsim/ns3/repos/fabric-bake/source/fabric-simulator/build/debug/.conf_check_3a035c89e574c1e32e1ac2e6adf29abe/testbuild/test.cpp.1.o'] 11:26:54 runner ['g++-7', 'test.cpp.1.o', '-o', '/Users/barnes26/Code/netsim/ns3/repos/fabric-bake/source/fabric-simulator/build/debug/.conf_check_3a035c89e574c1e32e1ac2e6adf29abe/testbuild/testprog', '-L/sw/opt/boost-1_63/lib', '-L/sw/opt/boost-1_63/lib', '-lboost_system-1_63', '-lboost_signals-1_63', '-lboost_filesystem-1_63'] ok ... NS-3 OpenFlow Integration : not enabled (Required boost libraries not found, missing: system, signals, filesystem) Note that the includes and libraries are found correctly, but OpenFlow is not enabled because "the libraries aren't found." This error is triggered by src/openflow/wscript:17: def configure(conf): if not conf.env['LIB_BOOST’]: ... But LIB_BOOST is never set anywhere, as far as I can tell. So I'm stumped: BOOST_LIB doesn't appear to be set, and yet our openflow build-bot succeeds, but not with name variants.
(In reply to Peter Barnes from comment #0) > Many package managers have ways to support multiple versions of a single > package, in particular boost. I encountered this first on my Mac, but it's > also a problem on our Linux clusters. > > On my Mac I use Fink as my external package manager. It builds the boost > libraries with a different file name format than expected by > waf-tools/boost.py. Let's find the boost/system link library: > > $ ls /sw/opt/boost-1_63/lib/*_sys* > /sw/opt/boost-1_63/lib/libboost_system-1_63.dylib* > /sw/opt/boost-1_63/lib/libboost_system-mt-1_63.dylib* > /sw/opt/boost-1_63/lib/libboost_system-mt.a > /sw/opt/boost-1_63/lib/libboost_system-mt.dylib@ -> > libboost_system-mt-1_63.dylib > /sw/opt/boost-1_63/lib/libboost_system.a > /sw/opt/boost-1_63/lib/libboost_system.dylib@ -> libboost_system-1_63.dylib > > Note the library 'libboost_system.dylib' exists, as a symlink to the real > dylib, which include the boost version in the name. > > So let's configure: > > $ ./waf configure --boost-includes=/sw/opt/boost-1_63/include > --boost-libs=/sw/opt/boost-1_63/lib —verbose > ... > Checking boost includes : 1_63 > path : /sw/include > Checking boost libs : ok > path : /sw/opt/boost-1_63/lib > shared libs : ['boost_system-1_63', 'boost_signals-1_63', > 'boost_filesystem-1_63'] > static libs : [] > Checking for boost linkage : > 11:26:54 runner ['g++-7', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', > '-std=c++11', '-I/sw/include', '-DNS3_BUILD_PROFILE_DEBUG', > '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', > '-DPYTHONDIR="/usr/local/lib/python2.7/site-packages"', > '-DPYTHONARCHDIR="/usr/local/lib/python2.7/site-packages"', > '-DHAVE_PYEMBED=1', '-DHAVE_PYEXT=1', '-DHAVE_PYTHON_H=1', '../test.cpp', > '-c', '-o', > '/Users/barnes26/Code/netsim/ns3/repos/fabric-bake/source/fabric-simulator/ > build/debug/.conf_check_3a035c89e574c1e32e1ac2e6adf29abe/testbuild/test.cpp. > 1.o'] > 11:26:54 runner ['g++-7', 'test.cpp.1.o', '-o', > '/Users/barnes26/Code/netsim/ns3/repos/fabric-bake/source/fabric-simulator/ > build/debug/.conf_check_3a035c89e574c1e32e1ac2e6adf29abe/testbuild/testprog', > '-L/sw/opt/boost-1_63/lib', '-L/sw/opt/boost-1_63/lib', > '-lboost_system-1_63', '-lboost_signals-1_63', '-lboost_filesystem-1_63'] > ok > ... > NS-3 OpenFlow Integration : not enabled (Required boost libraries not > found, missing: system, signals, filesystem) > > Note that the includes and libraries are found correctly, but OpenFlow is > not enabled because "the libraries aren't found." > > This error is triggered by src/openflow/wscript:17: > def configure(conf): > if not conf.env['LIB_BOOST’]: > ... > > But LIB_BOOST is never set anywhere, as far as I can tell. I think that it is set (if it is set) in check_boost() in waf-tools/boost.py: 335: self.env['LIB_%s' % var] = libs