如何正确链接/构建Boost库?

问题描述 投票:0回答:1

伙计们,这个主题几乎疯了。

我有一个很大的软件要安装,其中一个要求是boost库。我使用intel工具集构建它,但总是在我尝试制作软件时它给了我这个错误:

./libsrnd/.libs/libsrnd.so: undefined reference to `boost::serialization::singleton_module::is_locked()'
/home/igor/bie/Galphat/.libs/libGalphat.so: undefined reference to `boost::system::system_category()'
/home/igor/bie/Galphat/.libs/libGalphat.so: undefined reference to `boost::system::generic_category()'
make[3]: *** [bie_server_cli] Error 1
make[3]: *** Waiting for unfinished jobs....
../libsrnd/.libs/libsrnd.so: undefined reference to `boost::serialization::singleton_module::is_locked()'
/home/igor/bie/Galphat/.libs/libGalphat.so: undefined reference to `boost::system::system_category()'
/home/igor/bie/Galphat/.libs/libGalphat.so: undefined reference to `boost::system::generic_category()'
make[3]: *** [bie_server] Error 1
cli.o: In function `__sti__$E':
cli.cc:(.text+0xa3d2): undefined reference to `boost::system::generic_category()'
cli.cc:(.text+0xa3de): undefined reference to `boost::system::generic_category()'
cli.cc:(.text+0xa3ea): undefined reference to `boost::system::system_category()'
../libVector/.libs/libvector.so: undefined reference to `boost::serialization::singleton_module::is_locked()'

我的boost库是使用以下命令构建的:

./bootstrap.sh
./b2 toolset=intel address-model=64 cxxflags="-std=c++11 fPIC" --layout=versioned link=static variant=debug,release

我正在构建软件:

./configure --prefix=/usr/local/galphat --with-boost-libdir=/home/igor/boost_1_69_0/stage/lib

在增强测试似乎没有问题:

checking for boostlib >= 1.56.0... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem-il-mt-x64-1_69... yes
configure: WARNING: BOOST_CPPFLAGS -I/usr/include
checking whether the Boost::Serialization library is available... yes
checking for exit in -lboost_serialization-il-mt-d-x64-1_69... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex-il-mt-d-x64-1_69... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options-il-mt-d-x64-1_69... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-il-mt-x64-1_69... yes

操作系统是CentOS Linux版本7.4.1708(核心)

有人能指出进一步尝试的方向吗?

boost makefile centos7 intel boost-system
1个回答
0
投票

由于没有人给出任何反馈,我正在尝试进一步测试。似乎软件兼容较新的升级版本存在问题。我通过1.63 - 1.69构建所有版本,只有1.61工作,而其他所有版本都给出了几乎相同的错误。

© www.soinside.com 2019 - 2024. All rights reserved.