Opened 9 years ago

Last modified 9 years ago

#9306 new Bugs

Linking failure - Building BOOST with gcc-4.8 on Mac OSX — at Version 4

Reported by: karunreddy30@… Owned by:
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description (last modified by Mateusz Loskot)

Hi,

I am trying to compile boost on mac using gcc-4.8 and getting link errors. I have few reasons for this to be built with gcc and not clang which will deviate the actual issue. I have built boost with these steps:

  1. Edited user-config.jam in /tools/build/v2 and added the following

using gcc : 3.2 : /usr/local/bin/g++-3.2 ;

  1. ./bootstrap --prefix=/custom/path
  2. ./b2 -d 2 toolset=gcc-4.8

Errors are as below:

ld: unknown option: -h
collect2: error: ld returned 1 exit status
...failed gcc.link.dll bin.v2/libs/serialization/build/gcc-4.8/release/threading-multi/libboost_serialization.dylib...
...skipped <pstage/lib>libboost_wserialization.dylib for lack of <pbin.v2/libs/serialization/build/gcc-4.8/release/threading-multi>libboost_serialization.dylib...
gcc.link.dll stage/lib/libboost_signals.dylib

    "/usr/local/bin/g++-4.8"  -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib" -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config"  -o "stage/lib/libboost_signals.dylib" -Wl,-h -Wl,libboost_signals.dylib -shared  "bin.v2/libs/signals/build/gcc-4.8/release/threading-multi/trackable.o" "bin.v2/libs/signals/build/gcc-4.8/release/threading-multi/connection.o" "bin.v2/libs/signals/build/gcc-4.8/release/threading-multi/named_slot_map.o" "bin.v2/libs/signals/build/gcc-4.8/release/threading-multi/signal_base.o" "bin.v2/libs/signals/build/gcc-4.8/release/threading-multi/slot.o"        

ld: unknown option: -R
collect2: error: ld returned 1 exit status
...failed gcc.link.dll stage/lib/libboost_signals.dylib...
gcc.link.dll stage/lib/libboost_prg_exec_monitor.dylib

    "/usr/local/bin/g++-4.8"  -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib" -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config"  -o "stage/lib/libboost_prg_exec_monitor.dylib" -Wl,-h -Wl,libboost_prg_exec_monitor.dylib -shared  "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/execution_monitor.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/debug.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/cpp_main.o"        

ld: unknown option: -R
collect2: error: ld returned 1 exit status
...failed gcc.link.dll stage/lib/libboost_prg_exec_monitor.dylib...
gcc.link.dll stage/lib/libboost_unit_test_framework.dylib

    "/usr/local/bin/g++-4.8"  -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib" -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config"  -o "stage/lib/libboost_unit_test_framework.dylib" -Wl,-h -Wl,libboost_unit_test_framework.dylib -shared  "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/execution_monitor.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/debug.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/compiler_log_formatter.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/exception_safety.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/framework.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/interaction_based.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/logged_expectations.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/plain_report_formatter.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/progress_monitor.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/results_collector.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/results_reporter.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/test_tools.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/unit_test_log.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/unit_test_main.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/unit_test_monitor.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/unit_test_parameters.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/unit_test_suite.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/xml_log_formatter.o" "bin.v2/libs/test/build/gcc-4.8/release/threading-multi/xml_report_formatter.o"        

ld: unknown option: -R
collect2: error: ld returned 1 exit status
...failed gcc.link.dll stage/lib/libboost_unit_test_framework.dylib...
...skipped <pstage/lib>libboost_timer.dylib for lack of <pbin.v2/libs/chrono/build/gcc-4.8/release/threading-multi>libboost_chrono.dylib...
...skipped <pstage/lib>libboost_wave.dylib for lack of <pbin.v2/libs/thread/build/gcc-4.8/release/threading-multi>libboost_thread.dylib...
...failed updating 23 targets...
...skipped 14 targets...

Change History (4)

comment:1 by karunreddy30@…, 9 years ago

sorry! the change in user-config.jam is as below:

using gcc : 4.8 : /usr/local/bin/g++-4.8 ;

comment:2 by viboes, 9 years ago

Component: NoneBuilding Boost

comment:3 by anonymous, 9 years ago

any pointers here?? am really stuck here

comment:4 by Mateusz Loskot, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.