Thursday January 26, 2006 This HOWTO describes Boost - 1.32.0. This version with applied patch is supported by Sun Studio C++ compiler so I recommend to use it now. I do not plan to make a patch for Boost 1.33.1 because upcoming Boost 1.34 works with Sun C++ well out of the box. Please note, Sun Microsystems does not support Boost library, i.e. we do not and we will not fix bugs in it. Please ask Boost developers.
This file contains all necessary fixes to Boost 1.32.0. You should use gnu patch.
tar xfj boost_1_32_0.tar.bz2
cd boost_1_32_0
gpatch -p1 < ../boost_1_32_0.patch
The Boost build system uses BJam, an extension of the Perforce Jam portable make replacement. Unfortunately there is no prebuilded binary version of bjam for Solaris. But we are professionals, aren't we? So let's build bjam. Suppose BOOST is the Boost's root folder. If you gonna use a compiler, which isn't in the /opt/SUNWspro folder you have to point to it by setting BOOST_JAM_TOOLSET_ROOT. It should point to the directory that contains folders like bin, lib, prod. For example for Studio Express export BOOST_JAM_TOOLSET_ROOT=/opt/SPROexpress/opt/SUNWspro/. Note trailing slash is important. All preparations are done. Let's make the rest few steps:
cd $BOOST/tools/jam/src
./build.sh sunpro
ln -s bin.solaris bin # to run regression tests later
Have you builded the bjam? Let's continue. Now you are almost ready to build the Boost. Suppose BOOST is the Boost's root folder and jam is on your path. You can start building the Boost.
If your compiler is installed in the standard folder just run:
cd $BOOST
bjam -sTOOLS=sunpro stage
If you need to setup compiler options, point to non-standard compiler installation folder run the following extended version of build command:
cd $BOOST
bjam -sTOOLS=sunpro \
-sSUNPRO_ROOT_DIRECTORY="/opt/SPROexpress/opt/SUNWspro/" \
-sSUNPRO_CXX="CC <options>" \
-j8 -d2 stage
Boost uses bjam to build and run tests and two additional programs to parse log and produce html formatted results. Let's run tests. As usually suppose BOOST is the Boost's root folder and bjam is on your path. Note if you want to produce html formatted log you cannot use -jn.
cd $BOOST/status
bjam -sTOOLS=sunpro --dump-tests &> test_log
If you want to work with html formatted results instead of raw data from test_log you need to build two additional utilities and run them.
cd $BOOST/tools/regression/build
bjam -sTOOLS=sunpro -sBUILD=release run
You've got two utilites process_jam_log and compiler_status in the $BOOST/tools/regression/build/run. To produce formatted log run them one by one. Important note: $BOOST should start with a domain name.
cd $BOOST/status
cat test_log | process_jam_log
compiler_status $BOOST log.html log-links.html
Test results are in the log.html and log-links.html. That's all.
When you work with Boost you should use the following command line options: -library=stlport4 -features=tmplife -features=tmplrefstatic. Also you may use -Qoption ccfe -complextmplexp. But C++ compiler from Sun Studio 11 does not fully support complex expression in template arguments so this option sometimes might lead to incorrect mangling names. Full support of complex template expression has been implemented in the development version of Sun C++.
Permalink
Comments [6]
Posted by 216.254.74.245 on August 24, 2006 at 01:15 PM MSD #
Posted by 204.57.116.62 on August 25, 2006 at 09:30 PM MSD #
Posted by Guy Peleg on November 30, 2006 at 01:10 PM MSK #
Posted by Simon Atanasyan on November 30, 2006 at 05:12 PM MSK #
I have been trying to build boost for Solaris 10 x64 and the studio12 compilers and I fail to apply the options. Although I have faithfully carried out the instructions listed above, the command line given in the text is not propagating the options.
So I get errors during the compilation and I have no idea how to make bjam see the options which are necessary for this setup.
I am trying to build 1.34.x
Posted by lydia heck on March 03, 2008 at 07:45 PM MSK #
Have you tried following instructions?
http://blogs.sun.com/sga/entry/boost_and_sun_studio_12
What errors do you get?
Posted by 194.8.176.164 on March 03, 2008 at 09:55 PM MSK #