Subject: [Boost-bugs] [Boost C++ Libraries] #8256: Wave tests fail to build on OSX+GCC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-06 18:20:02
#8256: Wave tests fail to build on OSX+GCC
--------------------------------+-------------------------------------------
Reporter: chris0@⦠| Owner: hkaiser
Type: Bugs | Status: new
Milestone: To Be Determined | Component: wave
Version: Boost 1.53.0 | Severity: Problem
Keywords: |
--------------------------------+-------------------------------------------
When attempting to build & run the Boost (1.53.0) wave tests on OSX 10.8.2
with GCC 4.2.1 the build fails at the link stage.
I built with:[[BR]]
cd boost_1_53_0/libs/wave/test/build[[BR]]
b2 variant=debug
The invocation:
{{{
g++-4.2 -o
"../../../../../build/libs/wave/test/build/test_re2c_lexer.test/gcc-4.2/debug
/link-static/runtime-link-static/threading-multi/test_re2c_lexer"
"../../../../../build/libs/wave/test/build/test_re2c_lexer.test/gcc-4.2/debug
/link-static/runtime-link-static/threading-multi/test_re2c_lexer.o"
"../../../../../build/libs/date_time/build/gcc-4.2/debug/link-static
/runtime-link-static/threading-multi/libboost_date_time.a"
"../../../../../build/libs/thread/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_thread.a"
"../../../../../build/libs/filesystem/build/gcc-4.2/debug/link-static
/runtime-link-static/threading-multi/libboost_filesystem.a"
"../../../../../build/libs/system/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_system.a"
"../../../../../build/libs/program_options/build/gcc-4.2/debug/link-static
/runtime-link-static/threading-multi/libboost_program_options.a"
"../../../../../build/libs/wave/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_wave.a"
"../../../../../build/libs/chrono/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_chrono.a"
"../../../../../build/libs/date_time/build/gcc-4.2/debug/link-static
/runtime-link-static/threading-multi/libboost_date_time.a"
"../../../../../build/libs/thread/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_thread.a"
"../../../../../build/libs/filesystem/build/gcc-4.2/debug/link-static
/runtime-link-static/threading-multi/libboost_filesystem.a"
"../../../../../build/libs/system/build/gcc-4.2/debug/link-static/runtime-
link-static/threading-multi/libboost_system.a" -g -static -isysroot
/Developer/SDKs/MacOSX10.5.sdk
}}}
produces the message:
{{{
ld_classic: can't locate file for: -lcrt0.o
collect2: ld returned 1 exit status
}}}
However, removing the '-static' flag fixes the problem.[[BR]]
(On OSX 'man ld' reports "-static Produces a mach-o file that does not
use the dyld. Only used building the kernel.".)
The problem appears to be in boost_1_53_0/tools/build/v2/tools/gcc.jam.
Due to these lines (767):
{{{
if [ os.name ] != HPUX
{
toolset.flags gcc.link OPTIONS <runtime-link>static : -static ;
}
}}}
I was forced to change this, like so, to work around the problem:
{{{
#if [ os.name ] != HPUX && [ os.name ] != darwin # Doesn't work
#if [ os.name ] != HPUX && [ os.name ] != posix # Doesn't work
if [ os.name ] != HPUX
{
# toolset.flags gcc.link OPTIONS <runtime-link>static : -static ;
# Had to comment out above line for OSX/darwin
}
}}}
Once built the tests all run successfully.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8256> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC