Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Install on Mac OS X using GCC
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2011-05-02 17:11:04


> Hello, I'm trying to install boost on mac using the gcc compiler. I
> encounter these errors during installation for all libraries:

I am getting the same errors [2], however, the suggested solution of
using the darwin toolset isn't option, because I need to pass the
-std=c++0x flag on the command line to bjam for C++0x support. I am
trying to build Boost with the latest g++ 4.6.1 on Mac OS X Snow
Leopard:

    ./bootstrap.sh --with-toolset=gcc
    ./bjam cxxflags=-std=c++0x

This was suggest by Vincente on stackoverflow [1]. Does anyone know a
workaround for this problem?

    Matthias

[1] http://stackoverflow.com/questions/2887707/how-to-build-boost-with-c0x-support
[2] bjam build error snippet:

gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/gzip.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/bzip2.o
gcc.link.dll stage/lib/libboost_iostreams.dylib
ld: unknown option: -R
collect2: ld returned 1 exit status

    "g++" -Wl,-R -Wl,"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib" -Wl,-R -Wl,"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config" -o "stage/lib/libboost_iostreams.dylib" -Wl,-h -Wl,libboost_iostreams.dylib -shared -Wl,--start-group "bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/file_descriptor.o" "bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/mapped_file.o" "bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/zlib.o" "bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/gzip.o" "bin.v2/libs/iostreams/build/gcc-4.6.1/release/threading-multi/bzip2.o" -Wl,-Bstatic -Wl,-Bdynamic -lbz2 -lz -Wl,--end-group

...failed gcc.link.dll stage/lib/libboost_iostreams.dylib...
gcc.compile.c++.pch bin.v2/libs/math/build/gcc-4.6.1/release/threading-multi/../src/tr1/pch.hpp.gch
gcc.compile.c++ bin.v2/libs/math/build/gcc-4.6.1/release/threading-multi/assoc_laguerre.o
gcc.compile.c++ bin.v2/libs/math/build/gcc-4.6.1/release/threading-multi/assoc_legendre.o


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