Boost logo

Boost Users :

From: robertpsather (tropostropos_at_[hidden])
Date: 2002-09-12 05:00:49


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.
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
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.)
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!

(Don't know yet if it works properly, of course. The examples don't
build.)

Bob Sather
bob.sather_at_lloydstsb.delete_this_part.co.uk


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net