Newbee Questions on Directory Structure of Boost Libs.
Hi there, I'm new to Boost and have some problems understanding the way Boost libs. are built and installed. I downloaded boost_1_30_0. unpacked the archive and built the test library (I had installed bjam previously). I did the build step on two different platforms and with different compilers: - On Linux (RedHat 7.3) with gcc/3.2.2 and - on Sun SPARC Solaris 2.7 with Sun's Forte 6.2 compiler. I created an installation directory /opt/boost_1.30.0. Into this directory I copied the directory tree below boost/test and libs/test: /opt/boost_1.30.0/boost/test/... /opt/boost_1.30.0/libs/test/... I think so far everything is correct, isn't it? I do not completely understand the directory structure generated during the build process: ../boost_1_30_0/libs/test/build/bin/libboost_prg_exec_monitor.a /libboost_prg_exec_monitor.so /libboost_test_exec_monitor.a /libboost_test_exec_monitor.so /libboost_unit_test_framework.a /libboost_unit_test_framework.so Below the directories given above a specific subdirectory tree was created. Example: .../libboost_prg_exec_monitor.a/ /sunpro/ /debug/ /runtime-link-dynamic/ /runtime-link-static/ /threading-multi/libboost_prg_exec_monitor.a /threading-single/libboost_prg_exec_monitor.a
From this I conclude:
1. The builds are separated from each other in compiler specific subdirectory trees, e.g. the "sunpro" subtree contains the build results from $ bjam "-sTOOLS=sunpro" i.e. the sun forte 6.2 compiler and the "gcc" subtree contains the build results from $ bjam "-sTOOLS=gcc" i.e. the gcc 3.2.2 compiler on Linux. Obviously there is no separation by OS platform (Solaris or Linux). What would I have to do to build the lib. with gcc on Solaris? Where would the products be installed? Furthermore there is no separation by compiler version (e.g. gcc 2.95.2 is not separated from gcc 3.2.2). Is this considered unnecessary? 2. The libs were built with debug symbols (-g option) only), correct? I'm not familiar with jam and therefore don't know what to do to get them built with optimization active. It seems to me as if this should be rather simple because in ../boost_1_30_0/tools/build/sunpro-tools.jam obviously two variants of the CFLAGS variable for optimization are defined: flags sunpro CFLAGS <optimization>speed : -fast -O4 ; flags sunpro CFLAGS <optimization>space : -O2 -xspace ; Any hints are welcome. Thanks, Adalbert Perbandt.
Hi Adalbert,
I'm new to Boost and have some problems understanding the way Boost libs. are built and installed. [...]
I do not completely understand the directory structure generated during the build process:
../boost_1_30_0/libs/test/build/bin/libboost_prg_exec_monitor.a /libboost_prg_exec_monitor.so /libboost_test_exec_monitor.a /libboost_test_exec_monitor.so /libboost_unit_test_framework.a /libboost_unit_test_framework.so
Below the directories given above a specific subdirectory tree was created. Example:
.../libboost_prg_exec_monitor.a/ /sunpro/ /debug/ /runtime-link-dynamic/ /runtime-link-static/ /threading-multi/libboost_prg_exec_monitor.a /threading-single/libboost_prg_exec_monitor.a
From this I conclude:
1. The builds are separated from each other in compiler specific subdirectory trees, e.g. the "sunpro" subtree contains the build results from
$ bjam "-sTOOLS=sunpro"
i.e. the sun forte 6.2 compiler and the "gcc" subtree contains the build results from
$ bjam "-sTOOLS=gcc"
i.e. the gcc 3.2.2 compiler on Linux.
Yep.
Obviously there is no separation by OS platform (Solaris or Linux). What would I have to do to build the lib. with gcc on Solaris? Where would the products be installed?
Is your directory shared between Solaris and Linux? Hmm... I'm afraid there's nothing you can do about it.
Furthermore there is no separation by compiler version (e.g. gcc 2.95.2 is not separated from gcc 3.2.2). Is this considered unnecessary?
In fact, that's important feature. Boost.Build V2 already has it.
2. The libs were built with debug symbols (-g option) only), correct?
I'm not familiar with jam and therefore don't know what to do to get them built with optimization active. It seems to me as if this should be rather simple because in ../boost_1_30_0/tools/build/sunpro-tools.jam obviously two variants of the CFLAGS variable for optimization are defined:
You should pass "-sBUILD=release" flag to jam. HTH, Volodya
"Volodya" == Vladimir Prus
writes:
Thanks a lot for your helpful hints. [...] >> Obviously there is no separation by OS platform (Solaris or >> Linux). What would I have to do to build the lib. with gcc on >> Solaris? Where would the products be installed? Volodya> Is your directory shared between Solaris and Linux? Volodya> Hmm... I'm afraid there's nothing you can do about it. I can get it configured in both ways, either the same directory shared by both platforms or separated from each other with a means to put identical parts of the data into a shared directory and place links from both separate dirs. into the shared one. So I'll use the platform separate variant for boost. >> Furthermore there is no separation by compiler version >> (e.g. gcc 2.95.2 is not separated from gcc 3.2.2). Is this >> considered unnecessary? Volodya> In fact, that's important feature. Boost.Build V2 already Volodya> has it. But for now it would be sufficient if I renamed the gcc and sunpro directories to gcc_3.2.2 and forte_6.2 respectively, wouldn't it? >> 2. The libs were built with debug symbols (-g option) only), >> correct? >> >> I'm not familiar with jam and therefore don't know what to do >> to get them built with optimization active. It seems to me as >> if this should be rather simple because in >> ../boost_1_30_0/tools/build/sunpro-tools.jam obviously two >> variants of the CFLAGS variable for optimization are defined: Volodya> You should pass "-sBUILD=release" flag to jam. Ah, that's great. Unfortunately the compilation in release mode fails with messages like this: [...] sunpro-C++-action ../../../libs/test/build/bin/libboost_unit_test_framework.so/sunpro/release/runtime-link-dynamic/unit_test_log.o Assertion failure in prep_dot
Assertion: (../links/prepexpression.cc, line 560) while processing ../src/unit_test_log.cpp at line 301.
CC -c -DNDEBUG -fast -O4 -xtarget=generic -features=rtti -features=except -I"../../../libs/test/build" -I"/home/hwadm/Boost/boost_1_30_0" -o "../../../libs/test/build/bin/libboost_unit_test_framework.so/sunpro/release/runtime-link-dynamic/unit_test_log.o" "../src/unit_test_log.cpp" ...failed sunpro-C++-action ../../../libs/test/build/bin/libboost_unit_test_framework.so/sunpro/release/runtime-link-dynamic/unit_test_log.o... [...] Is my assumption correct that this is due to a compiler bug, i.e. the assertion comes from the compiler's code? I could not find any "../links/prepexpression.cc" file among the boost 1.30.0 stuff. I already looked up the options given in the compile command in the docs. The forte 6.2 compiler seems to support all of them. Regards, Adalbert.
Vladimir Prus
Obviously there is no separation by OS platform (Solaris or Linux). What would I have to do to build the lib. with gcc on Solaris? Where would the products be installed?
Is your directory shared between Solaris and Linux? Hmm... I'm afraid there's nothing you can do about it.
sure there is. Just make sure that ALL_LOCATE_TARGET is pointing into a different build tree for each platform. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
Adalbert Perbandt
-
David Abrahams
-
Vladimir Prus