Install boost on OS X via homebrew with c++11 and libc++
I'm trying to install boost on OS X with c++11 and libc++. I'm using
homebrew (boost formular with the --build-from-source argument) and
have tried various options with adding stuff like
* toolset=clang
* cxxflags="-stdlib=libc++ -std=c++11"
* cxxflags="-stdlib=libc++"
* linkflags="-stdlib=libc++ -std=c++11"
* linkflags="-stdlib=libc++"
as arguments to bjam, but it all fails.
Now... The "toolset" part doesn't do anything to make it fail though,
its the cxx- and linkflags part that does.
This is what I get when it fails
clang-darwin.archive
bin.v2/libs/exception/build/clang-darwin-4.2.1/release/link-
static/threading-multi/libboost_exception-mt.a
common.copy /usr/local/Cellar/boost/1.50.0/lib/libboost_exception-mt.a
clang-darwin.compile.c++
bin.v2/libs/wave/build/clang-darwin-4.2.1/release/link-
static/threading-multi/cpplexer/re2clex/cpp_re.o
clang-darwin.archive
bin.v2/libs/wave/build/clang-darwin-4.2.1/release/link-static/threading-multi/libboost_wave-mt.a
common.copy /usr/local/Cellar/boost/1.50.0/lib/libboost_wave-mt.a
...failed updating 2 targets...
...skipped 4 targets...
...updated 10592 targets...
Error: #
AMDG On 09/12/2012 04:10 AM, christoffer.buchholz@gmail.com wrote:
I'm trying to install boost on OS X with c++11 and libc++. I'm using homebrew (boost formular with the --build-from-source argument) and have tried various options with adding stuff like
<snip>
This is what I get when it fails
<snip> ...failed updating 2 targets... ...skipped 4 targets... ...updated 10592 targets...
How do I get boost installed on OS X Mountain Lion with c++11 and libc++ preferably via homebrew for the ease it adds.
Almost everything built correctly as you can see from the summary. Some library probably doesn't compile with this compiler/standard library combination. However, I can't tell which one, since you snipped the actual error message and only showed the end of the build log. In Christ, Steven Watanabe
I opted for trying to compile it without homebrew to see if that
worked, and it worked better; now I also got up to the latest version
of boost, not 1.50 which homebrew used.
I call b2 with these arguments:
./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++"
linkflags="-std=c++11 -stdlib=libc++" link=static
and it compiles all file. Then I have this[1] piece of code which I
try to compile with:
clang++ -std=c++11 -stdlib=libc++ -g -Wall -v
-I/Users/cb/Downloads/boost_1_51_0 tests/arithmetic.cpp -o
tests/arithmetic
/Users/cb/Downloads/boost_1_51_0/stage/lib/libboost_unit_test_framework.a
And it fails miserably, giving me this[2] error.
Any ideas?
[1]: https://gist.github.com/3710079
[2]: https://gist.github.com/3712206
On Thu, Sep 13, 2012 at 6:14 AM, Steven Watanabe
AMDG
On 09/12/2012 04:10 AM, christoffer.buchholz@gmail.com wrote:
I'm trying to install boost on OS X with c++11 and libc++. I'm using homebrew (boost formular with the --build-from-source argument) and have tried various options with adding stuff like
<snip>
This is what I get when it fails
<snip> ...failed updating 2 targets... ...skipped 4 targets... ...updated 10592 targets...
How do I get boost installed on OS X Mountain Lion with c++11 and libc++ preferably via homebrew for the ease it adds.
Almost everything built correctly as you can see from the summary. Some library probably doesn't compile with this compiler/standard library combination. However, I can't tell which one, since you snipped the actual error message and only showed the end of the build log.
In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
This guy figure the fault: http://stackoverflow.com/a/12402121/499997
To summarize, it set a define for using the dynamic library, but I
compiled and linked it statically.
On Thu, Sep 13, 2012 at 8:06 AM, christoffer.buchholz@gmail.com
I opted for trying to compile it without homebrew to see if that worked, and it worked better; now I also got up to the latest version of boost, not 1.50 which homebrew used.
I call b2 with these arguments:
./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-std=c++11 -stdlib=libc++" link=static
and it compiles all file. Then I have this[1] piece of code which I try to compile with:
clang++ -std=c++11 -stdlib=libc++ -g -Wall -v -I/Users/cb/Downloads/boost_1_51_0 tests/arithmetic.cpp -o tests/arithmetic /Users/cb/Downloads/boost_1_51_0/stage/lib/libboost_unit_test_framework.a
And it fails miserably, giving me this[2] error.
Any ideas?
[1]: https://gist.github.com/3710079 [2]: https://gist.github.com/3712206
On Thu, Sep 13, 2012 at 6:14 AM, Steven Watanabe
wrote: AMDG
On 09/12/2012 04:10 AM, christoffer.buchholz@gmail.com wrote:
I'm trying to install boost on OS X with c++11 and libc++. I'm using homebrew (boost formular with the --build-from-source argument) and have tried various options with adding stuff like
<snip>
This is what I get when it fails
<snip> ...failed updating 2 targets... ...skipped 4 targets... ...updated 10592 targets...
How do I get boost installed on OS X Mountain Lion with c++11 and libc++ preferably via homebrew for the ease it adds.
Almost everything built correctly as you can see from the summary. Some library probably doesn't compile with this compiler/standard library combination. However, I can't tell which one, since you snipped the actual error message and only showed the end of the build log.
In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
christoffer.buchholz@gmail.com
-
Steven Watanabe