--- In Boost-Users@y..., "robertpsather"
Building Boost on AIX is difficult. Here's a recipe that worked for me, for building on the following platform: Boost source download version 28 AIX 4.3.3 on RS/6000 VisualAge 5.0 Jam: downloaded binary of Boost.Jam Version 3.1.0. OS=AIX. bash shell
Building Boost
Setup: Downloaded version 28 tar.gz file to ~/boost. Un-gzipped and untarred. Set export BOOST_ROOT=/home/satherb/boost/boost_1_28_0 Attempt: jam "-sTOOLS=vacpp" Result: Many compilation errors, in building of regexp library. For example: Error: "libs/regex/build/../src/cpp_regex_traits.cpp", line 196.39: 1540-0257 (S) An object or reference of type "std::messages_base::catalog" cannot be initialized with an expression of type "int". Attempt: in cpp_regex_traits.cpp", line 196, changed "-1" to "(size_t) 1" Result: compiler says "cannot be initialised with type unsigned long." for the same line. Attempt: Noted that www.boost.org says that threads lib does not depend on regex or python. Edited Jamfile to comment out unnecessary targets python and regex.
Not needed. If you need to compile only a part of Boost using bjam, all you have to do is switch to the appropriate build directory (in this case $BOOST_ROOT/libs/thread/build) and execute bjam there.
Result: Most errors are "Thread support is unavailable". Looking at source indicates this is because BOOST_HAS_THREADS macro is undefined. Attempt: export BOOST_HAS_THREADS=1
Generally a bad idea. BOOST_HAS_THREADS should be defined by
Result: same errors. Attempt: run ./configure Result: configure gives error message that says "compiler does not produce output" (or something like that) However, running configure again worked! Here were the recent settings of environmental variables: export BOOST_ROOT=/home/satherb/boost/boost_1_28_0 export _MT=1 export CC=xlC_r export CXX=xlC export _POSIX_THREADS=1 export LIBS=-lpthread
(I don't know which of these was the key. If you discover the answer, please let me know.)
Several of those are important. My understanding is that xlC_r turns on MT support for your platform, while _MT and _POSIX_THREADS are what cause BOOST_HAS_THREADS to be defined and -lpthread is the magic that makes linking a multi-threaded application work.
Attempt: Did as configure suggested: "Adjustments to boost configuration have been written to user.hpp, copy this to boost/config/user.hpp to use "as is" " Result: jam still gives "Thread support is unavailable" errors. Attempt: added a line to boost/config/user.hpp: #define BOOST_HAS_THREADS Result: builds!
That sounds like it might be a minor bug in the configure script, but Mr. Maddock can talk more authoritatively about that.
(Don't know yet if it works properly, of course. The examples don't build.)
If the library builds, the examples (and more importantly, the tests) should. Bill Kempf