我想使用gcc 4.5.2在Ubuntu 11.04上构建所有Boost库。所以我去下载tar.bz2文件。我扩展了它。我运行bootstrap.sh并注意到它抱怨unicode,所以我安装了:
sudo apt-get install libicu-dev
现在看起来很高兴用unicode构建。麻烦的是我想要链接OpenMPI。哦,哦。所以我将using mpi ;
添加到./tools/build/v2/user-config.jam
并运行我的构建命令:
./bjam --layout=versioned --build-type=complete
并且提示打印错误(我缩写了大段落):
error: Duplicate name of actual target: <pstage/lib>mpi.so
error: previous virtual target { common%common.copy-mpi.so.PYTHON_EXTENSION {
...然后几页......
error: created from ./stage-proper
error: another virtual target { common%common.copy-mpi.so.PYTHON_EXTENSION {
...然后再多几页......
error: created from ./stage-proper
error: added properties: <debug-symbols>off <define>NDEBUG <inlining>full <library>object(file-target)@3501 <library>object(file-target)@3568 <library>object(file-target)@4171 <library>object(file-target)@4184 <library>object(searched-lib-target)@4066 <library>object(searched-lib-target)@4072 <library>object(searched-lib-target)@4078 <optimization>speed <runtime-debugging>off <variant>release <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/mpi/build/gcc-4.5.2/release/threading-multi <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/python/build/gcc-4.5.2/release/threading-multi <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/serialization/build/gcc-4.5.2/release/threading-multi
error: removed properties: <debug-symbols>on <inlining>off <library>object(file-target)@1244 <library>object(file-target)@1350 <library>object(file-target)@2378 <library>object(file-target)@2393 <library>object(searched-lib-target)@2217 <library>object(searched-lib-target)@2223 <library>object(searched-lib-target)@2229 <optimization>off <runtime-debugging>on <variant>debug <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/mpi/build/gcc-4.5.2/debug/threading-multi <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/python/build/gcc-4.5.2/debug/threading-multi <xdll-path>/home/mtibbits/src/boost_1_46_1/bin.v2/libs/serialization/build/gcc-4.5.2/debug/threading-multi
/home/mtibbits/src/boost_1_46_1/tools/build/v2/build/virtual-target.jam:490: in actualize-no-scanner from module object(file-target)@4661
/home/mtibbits/src/boost_1_46_1/tools/build/v2/build/virtual-target.jam:135: in object(file-target)@4661.actualize from module object(file-target)@4661
/home/mtibbits/src/boost_1_46_1/tools/build/v2/build-system.jam:748: in load from module build-system
/home/mtibbits/src/boost_1_46_1/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/mtibbits/src/boost_1_46_1/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/mtibbits/src/boost_1_46_1/boost-build.jam:17: in module scope from module
似乎是bug可追溯到Boost 1.40?但我知道其他人已经开始工作了。有没有人知道让Boost 1.46.1与openmpi玩得很好所需的伏都教?
注意:我一直在谷歌搜索,这似乎不是Ubuntu特定的问题 - 它出现在gentoo和其他地方。但我没有找到任何具体的解决方案,除了 build without mpi ... 我不能。
我很乐意发布整个日志,包版本等。
答案 0 :(得分:0)
从其他论坛,我发现在/ tools / build / CMake / externals中,应该有一个MPI.cmake文件。 添加以下行应该允许您使用OpenMPI构建Boost:
set(MPI_INCLUDE_PATH /usr/include/openmpi-x86_64)
set(MPI_COMPILE_FLAGS -I/usr/include/openmpi-x86_64)
set(MPI_LINK_FLAGS -L/usr/lib64/openmpi/lib -L/usr/lib64/openmpi/lib/openmpi
-lmpi_cxx -lmpi)
set(MPI_LIBRARIES /usr/lib64/openmpi/lib/libmpi.so
/usr/lib64/openmpi/lib/libmpi_cxx.so)
set(MPI_FOUND 1)