Boost C++ Libraries: Ticket #9306: Linking failure - Building BOOST with gcc-4.8 on Mac OSX https://svn.boost.org/trac10/ticket/9306 <p> Hi, </p> <p> 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: </p> <ol><li>Edited user-config.jam in /tools/build/v2 and added the following </li></ol><p> using gcc : 3.2 : /usr/local/bin/g++-3.2 ; </p> <ol start="2"><li>./bootstrap --prefix=/custom/path </li><li>./b2 -d 2 toolset=gcc-4.8 </li></ol><p> Errors are as below: </p> <pre class="wiki">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 &lt;pstage/lib&gt;libboost_wserialization.dylib for lack of &lt;pbin.v2/libs/serialization/build/gcc-4.8/release/threading-multi&gt;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 &lt;pstage/lib&gt;libboost_timer.dylib for lack of &lt;pbin.v2/libs/chrono/build/gcc-4.8/release/threading-multi&gt;libboost_chrono.dylib... ...skipped &lt;pstage/lib&gt;libboost_wave.dylib for lack of &lt;pbin.v2/libs/thread/build/gcc-4.8/release/threading-multi&gt;libboost_thread.dylib... ...failed updating 23 targets... ...skipped 14 targets... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9306 Trac 1.4.3 karunreddy30@… Sat, 26 Oct 2013 07:15:58 GMT <link>https://svn.boost.org/trac10/ticket/9306#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9306#comment:1</guid> <description> <p> sorry! the change in user-config.jam is as below: </p> <p> using gcc : 4.8 : /usr/local/bin/g++-4.8 ; </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 26 Oct 2013 15:18:53 GMT</pubDate> <title>component changed https://svn.boost.org/trac10/ticket/9306#comment:2 https://svn.boost.org/trac10/ticket/9306#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Building Boost</span> </li> </ul> Ticket anonymous Mon, 11 Nov 2013 06:27:00 GMT <link>https://svn.boost.org/trac10/ticket/9306#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9306#comment:3</guid> <description> <p> any pointers here?? am really stuck here </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mateusz Loskot</dc:creator> <pubDate>Mon, 11 Nov 2013 10:12:58 GMT</pubDate> <title>description changed https://svn.boost.org/trac10/ticket/9306#comment:4 https://svn.boost.org/trac10/ticket/9306#comment:4 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/9306?action=diff&amp;version=4">diff</a>) </li> </ul> Ticket Mateusz Loskot Mon, 11 Nov 2013 10:17:43 GMT <link>https://svn.boost.org/trac10/ticket/9306#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9306#comment:5</guid> <description> <p> Peraps, this related thread will be helpful: <a class="ext-link" href="http://thread.gmane.org/gmane.comp.lib.boost.user/65141/focus=67746"><span class="icon">​</span>Boost Install on Mac OS X using GCC</a> </p> <p> Otherwise, I'd suggest you to re-post your question on the boost-users mailing list in the first place (it's usually a good idea to confirm first it is actually a bug, then open a bug ticket). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 11 Nov 2013 11:20:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9306#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9306#comment:6</guid> <description> <p> Replace </p> <pre class="wiki"> using gcc : 3.2 : /usr/local/bin/g++-3.2 ; and ./b2 -d 2 toolset=gcc-4.8 </pre><p> by </p> <pre class="wiki"> using darwin : 3.2 : /usr/local/bin/g++-3.2 ; and ./b2 -d 2 toolset=darwin-4.8 </pre> </description> <category>Ticket</category> </item> </channel> </rss>