C++ Boost bjam不';t将编译器版本放入文件名

C++ Boost bjam不';t将编译器版本放入文件名,c++,boost,bjam,C++,Boost,Bjam,过去,b2/bjam会构建这样的库: libboost_wserialization-gcc48-mt-d-1_60.so(注-gcc48-) 我刚刚从git克隆了boost,并尝试使用G++8.3.0进行编译, 但它生成的库名为: libboost_原子-gcc-mt-d-x64-1_66.so(注意-gcc-) 我(和CMake)希望它被命名为: libboost_原子-gcc83-mt-d-x64-1_66.so (注意-gcc83-) 为了建造,我做了: ./bootstrap.sh -

过去,b2/bjam会构建这样的库:

libboost_wserialization-gcc48-mt-d-1_60.so(注-gcc48-)

我刚刚从git克隆了boost,并尝试使用G++8.3.0进行编译, 但它生成的库名为:

libboost_原子-gcc-mt-d-x64-1_66.so(注意-gcc-)

我(和CMake)希望它被命名为:

libboost_原子-gcc83-mt-d-x64-1_66.so (注意-gcc83-)

为了建造,我做了:

./bootstrap.sh --with-libraries="atomic" --prefix=`pwd`/install
./b2 --layout=versioned link=shared variant=debug threading=multi cflags=-fPIC cxxflags=-fPIC
我尝试过谷歌搜索,但没有发现任何迹象表明我做错了什么,我的理解是--layout=versioned应该在库名称中显示编译器和版本号


谢谢

邮件列表中的答案:

Possibly, it's related to the change in GCC 5+ versioning.
This was accommodated in Boost.Build in October 2018
https://github.com/boostorg/build/pull/349
that is, in Boost 1.69
(boostorg/build should use milestones for issues, IMO)


BTW, there are also CMake's issues in FindCMake.cmake
related to the compiler  and architecture tag. So, you may have to
specify  Boost_COMPILER and Boost_ARCHITECTURE hints
in order to help FindBoost.cmake recognise versioned names.

解决方法提示:
邮件列表中的答案:

Possibly, it's related to the change in GCC 5+ versioning.
This was accommodated in Boost.Build in October 2018
https://github.com/boostorg/build/pull/349
that is, in Boost 1.69
(boostorg/build should use milestones for issues, IMO)


BTW, there are also CMake's issues in FindCMake.cmake
related to the compiler  and architecture tag. So, you may have to
specify  Boost_COMPILER and Boost_ARCHITECTURE hints
in order to help FindBoost.cmake recognise versioned names.

解决方法提示:

是否更新了子模块(如果有)?还要指定要编译的版本?根据我的经验,我发现
1.69.0
是最稳定的版本。但是我从boost.org.Hmm下载了这个库,我没有,所以我做了git-pull;git子模块更新;现在b2说:boost-install.jam:没有这样的文件或目录。。。接下来我将尝试编译一个tarball。好的,tarball确实为它添加了一个版本,但还不够。。。libboost_原子-gcc8-mt-d-x64-1_70。因此请注意其gcc8而非gcc83。。。你现在是用tarball编译的吗?是的。tar xfv boost_1_70_0.tar.bz2;cd boost_1_70_0//bootstrap.sh——使用libraries=“atomic”/b2——布局=版本链接=共享变量=调试线程=多cflags=-fPIC cxxflags=-fPIC;ls-l stage/lib==libboost_atomic-gcc8-mt-d-x64-1_70。您是否更新了子模块(如果有)?还要指定要编译的版本?根据我的经验,我发现
1.69.0
是最稳定的版本。但是我从boost.org.Hmm下载了这个库,我没有,所以我做了git-pull;git子模块更新;现在b2说:boost-install.jam:没有这样的文件或目录。。。接下来我将尝试编译一个tarball。好的,tarball确实为它添加了一个版本,但还不够。。。libboost_原子-gcc8-mt-d-x64-1_70。因此请注意其gcc8而非gcc83。。。你现在是用tarball编译的吗?是的。tar xfv boost_1_70_0.tar.bz2;cd boost_1_70_0//bootstrap.sh——使用libraries=“atomic”/b2——布局=版本链接=共享变量=调试线程=多cflags=-fPIC cxxflags=-fPIC;ls-l stage/lib==libboost_原子-gcc8-mt-d-x64-1_70.so