Boost C++ Libraries: Ticket #9774: [libs/coroutine] Undefined symbols for architecture i386: _make_fcontext / _jump_fcontext https://svn.boost.org/trac10/ticket/9774 <p> This bug also affects 1.55, libs/couroutine is the only module I can't build for a target-os=darwin with clang-darwin-4.2.1 </p> <p> Command used: </p> <pre class="wiki">b2 -j1 -d2 -q toolset=clang-darwin variant=release abi=sysv address-model=32_64 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -arch i386 -arch x86_64" linkflags="-w -arch i386 -arch x86_64 -lstdc++" --stagedir=stage32_64 --with-coroutine </pre><p> Returns: </p> <pre class="wiki"> "X:/libs/gcc-clang-3.4-x86_64-apple-darwin10/bin/clang.exe" -w -arch i386 -arch x86_64 -lstdc++ -w -arch i386 -arch x86_64 -lstdc++ -o "bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\add ress-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\libboost_coroutine-clang-darwin42-mt-1_56.dylib" -single_module -dynamiclib -install_name "libboost_co routine-clang-darwin42-mt-1_56.dylib" "bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-mu lti\detail\coroutine_context.o" "bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\ex ceptions.o" "bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\protected_stack_alloca tor_posix.o" "bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\standard_stack_alloca tor.o" "bin.v2\libs\chrono\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\libboost_chrono-clang-darwin42 -mt-1_56.dylib" "bin.v2\libs\thread\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\libboost_thread_pthre ad-clang-darwin42-mt-1_56.dylib" "bin.v2\libs\system\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\libb oost_system-clang-darwin42-mt-1_56.dylib" "bin.v2\libs\context\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading- multi\libboost_context-clang-darwin42-mt-1_56.dylib" Undefined symbols for architecture i386: "_make_fcontext", referenced from: boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(long), boost::coroutines::stack_context const&amp;) in bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model- 32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\detail\coroutine_context.o boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(long), boost::coroutines::stack_context const&amp;) in bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model- 32_64\binary-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\detail\coroutine_context.o "_jump_fcontext", referenced from: boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&amp;, long, bool) in bin.v2\libs\coroutine\build\clang-darwin-4.2.1\release\abi-sysv\address-model-32_64\binar y-format-mach-o\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\detail\coroutine_context.o ld: symbol(s) not found for architecture i386 clang.exe: error: linker command failed with exit code 1 (use -v to see invocation) </pre><p> Off-Topic: You mention to report to boost-track successfull builds but I don't know where is this so please note that I have tested to remove the untested.cpp from the libs\context\build\Jamfile.v2 for address-model=32_64 binary-format=mach-o and it worked fine! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9774 Trac 1.4.3 class101 <ad@…> Thu, 13 Mar 2014 00:08:40 GMT <link>https://svn.boost.org/trac10/ticket/9774#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:1</guid> <description> <p> To note that it affects the shared lib only, the static lib is properly generated for both arch i386/x86_64 in libboost_coroutine-clang-darwin42-mt-1_56.a </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Thu, 13 Mar 2014 07:19:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:2</guid> <description> <p> Could you try the version from branch develop, please? </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Thu, 13 Mar 2014 10:50:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:3</guid> <description> <p> Hello olli, I have followowed the instruction to get the modularboost from git working based on this article <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> I'm already on the branche develop right ? </p> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/wiki/TryModBoost"><span class="icon">​</span>https://svn.boost.org/trac/boost/wiki/TryModBoost</a> </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Thu, 13 Mar 2014 12:08:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:4</guid> <description> <p> Nvm I got your last changes I did a pull of develop and then a submodules update </p> <p> The changes you have made litterally fixed all my problems, Good job !!! </p> <p> Success builds: </p> <p> target: x86_64-w64-mingw32-seh =&gt; OK </p> <pre class="wiki">SET PATH=X:\libs\gcc-4.8.2-x86_64-w64-mingw32-seh\bin;%PATH% b2 -j10 -d0 toolset=gcc variant=release abi=ms address-model=64 link=static,shared strip=on target-os=windows threading=multi threadapi=win32 cxxflags=-w linkflags=-w --stagedir=stage64 --without-python --without-mpi </pre><p> target: i686-w64-mingw32-dw4 =&gt; OK </p> <pre class="wiki">SET PATH=X:\libs\gcc-4.8.2-i686-w64-mingw32-dw4\bin;%PATH% b2 -j10 -d0 toolset=gcc variant=release abi=ms address-model=32 link=static,shared strip=on target-os=windows threading=multi threadapi=win32 cxxflags=-w linkflags=-w --stagedir=stage32 --without-python --without-mpi </pre><p> target: x86_64-unknown-linux-gnu =&gt; OK </p> <pre class="wiki">SET PATH=X:\libs\gcc-4.8.2-x86_64-unknown-linux\bin;%PATH% b2 -j10 -d0 toolset=gcc variant=release abi=sysv address-model=64 binary-format=elf link=static,shared pch=off strip=on target-os=linux threading=multi threadapi=pthread cxxflags="-w -m64" linkflags="-w -m64" --stagedir=stage64 --without-python --without-mpi </pre><p> target: i686-unknown-linux-gnu =&gt; OK (now passes) </p> <pre class="wiki">SET PATH=X:\libs\gcc-4.8.2-x86_64-unknown-linux\bin;%PATH% b2 -j10 -d0 toolset=gcc variant=release abi=sysv address-model=32 binary-format=elf link=static,shared pch=off strip=on target-os=linux threading=multi threadapi=pthread cxxflags="-w -m32" linkflags="-w -m32" --stagedir=stage32 --without-python --without-mpi </pre><p> target: x86_64-apple-darwin10 (no-multiarch) =&gt; OK (now passes) </p> <pre class="wiki">SET PATH=X:\libs\gcc-clang-3.4-x86_64-apple-darwin10\bin;%PATH% b2 -j10 -d0 toolset=clang-darwin variant=release abi=sysv address-model=64 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -arch x86_64" linkflags="-w -arch x86_64 -lstdc++" --stagedir=stage64 --without-python --without-mpi </pre><p> target: i686-apple-darwin10 (no-multiarch) =&gt; OK (now passes) </p> <pre class="wiki">SET PATH=X:\libs\gcc-clang-3.4-x86_64-apple-darwin10\bin;%PATH% b2 -j10 -d0 toolset=clang-darwin variant=release abi=sysv address-model=32 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -arch i386" linkflags="-w -arch i386 -lstdc++" --stagedir=stage32 --without-python --without-mpi </pre><p> target: x86_64-apple-darwin10 (MULTIARCH) =&gt; OK (now passes) </p> <pre class="wiki">SET PATH=X:\libs\gcc-clang-3.4-x86_64-apple-darwin10\bin;%PATH% b2 -j10 -d0 toolset=clang-darwin variant=release abi=sysv address-model=32_64 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -arch i386 -arch x86_64" linkflags="-w -arch i386 -arch x86_64 -lstdc++" --stagedir=stage32_64 --without-python --without-mpi </pre><p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> the windows toolchains : <a class="ext-link" href="https://drive.google.com/folderview?id=0B4dcRcayW88VNmRtZDEybEZoLTQ&amp;usp=sharing"><span class="icon">​</span>https://drive.google.com/folderview?id=0B4dcRcayW88VNmRtZDEybEZoLTQ&amp;usp=sharing</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Thu, 13 Mar 2014 12:22:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9774#comment:5 https://svn.boost.org/trac10/ticket/9774#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> OK, thx </p> Ticket class101 <ad@…> Fri, 04 Apr 2014 14:08:15 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/9774#comment:6 https://svn.boost.org/trac10/ticket/9774#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Tested today with the same parameters as my original ticket and it is failing </p> <p> Fails only for 32_64, is ok for 64 or 32 only arch </p> <p> On </p> <pre class="wiki">Revision: db370aae7542bdaa1a7fe3a13a918eccc3b49727 Author: Automated Commit &lt;automated@calamity.org.uk&gt; Date: 04/04/2014 09:00:06 Message: Update fusion from develop. ---- Modified: libs/fusion </pre><p> Params: </p> <pre class="wiki">b2 -j1 -d2 -q toolset=clang-darwin variant=release abi=sysv address-model=32_64 binary-format=mach-o link=static,shared pch=off target-os=darwin threadapi=pthread cxxflags="-w -O2 -arch i386 -arch x86_64" linkflags="-w -arch i386 -arch x86_64 -lstdc++" --with-coroutine </pre> Ticket class101 <ad@…> Fri, 04 Apr 2014 14:09:08 GMT <link>https://svn.boost.org/trac10/ticket/9774#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:7</guid> <description> <p> More readable params </p> <pre class="wiki">b2 -j1 -d2 -q toolset=clang-darwin \ variant=release \ abi=sysv \ address-model=32_64 \ binary-format=mach-o \ link=static,shared \ pch=off \ target-os=darwin \ threadapi=pthread \ cxxflags="-w -O2 -arch i386 -arch x86_64" linkflags="-w -arch i386 -arch x86_64 -lstdc++" --with-coroutine </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 04 Apr 2014 15:00:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:8</guid> <description> <p> can you post the error and the output of b2 cmd like: </p> <ul><li>symlinks supported : yes (cached) </li><li>32-bit : no (cached) </li><li>64-bit : yes (cached) </li><li>arm : no (cached) </li><li>mips1 : no (cached) </li><li>power : no (cached) </li><li>sparc : no (cached) </li><li>x86 : yes (cached) </li></ul><p> and the output if you call your b2 cmdline with additional option --debug-building </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 15:30:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:9</guid> <description> <p> <a class="ext-link" href="http://pastebin.com/Ff11VsfZ"><span class="icon">​</span>boost_issue_9774.txt</a> </p> <p> <a class="ext-link" href="https://drive.google.com/file/d/0B4dcRcayW88VN3VPbVdLaGdtQ0U/edit?usp=sharing"><span class="icon">​</span>boost_issue_9774_debug_building.txt</a> </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 15:52:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:10</guid> <description> <p> In case it is of any help </p> <p> The last libboost_coroutine-clang-darwin42-mt-1_56.dylib I have been able to generate was from 26 March 2014 4:37PM CET/CEST and if I look the revision it is corresponding to this one </p> <pre class="wiki">Revision: dfee167c036a78139eafa37227081537d019fee1 Author: Automated Commit &lt;automated@calamity.org.uk&gt; Date: 26/03/2014 15:00:06 Message: Update multiprecision from develop. ---- Modified: libs/multiprecision </pre><p> So technically the regression comes from a changes made after, let me know if I can be of any small help </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 04 Apr 2014 17:06:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:11</guid> <description> <p> did you fetch the latest version of boost.context? </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 17:37:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:12</guid> <description> <p> yes (at least I think) </p> <p> this is was the last log is about in libs/context </p> <pre class="wiki">Revision: cd49a86006e967e40820828faa4649c31d2811bc Author: Oliver Kowalke &lt;oliver.kowalke@gmx.de&gt; Date: 30/03/2014 19:41:04 Message: Revert "change labels for i386/mach-o/darwi" This reverts commit c338020df9cf480e4012e588dffbe6f1e662c145. ---- Modified: src/asm/jump_i386_sysv_macho_gas.S Modified: src/asm/make_i386_sysv_macho_gas.S </pre> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 18:06:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:13</guid> <description> <p> I can give more infos </p> <p> I reverted context + coroutine before the 26th , still failing I revert tools/build to 9732c695d1160c2a35c8dc7634de5ff02a7e82f2 , it works </p> <p> so the issue lies in a boost/build change from 26 to now </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Fri, 04 Apr 2014 18:20:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:14</guid> <description> <p> It was broken by <a class="ext-link" href="https://github.com/boostorg/build/commit/5c1a97b92854e35ca35c68365babe418d44979ed"><span class="icon">​</span>https://github.com/boostorg/build/commit/5c1a97b92854e35ca35c68365babe418d44979ed</a>. Passing cxxflags to the assembler is wrong and will not work for most toolsets. cflags appears to be correct according to the docs, even though it's still weird. </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 18:24:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:15</guid> <description> <p> yes with elimination I was able to find out it was from this revision the failure </p> <pre class="wiki">Revision: 5c1a97b92854e35ca35c68365babe418d44979ed Author: Steven Watanabe &lt;steven@providere-consulting.com&gt; Date: 28/03/2014 23:45:40 Message: cxxflags should not apply to C files. Fixes #9815. ---- Modified: src/tools/borland.jam Modified: src/tools/clang-darwin.jam Modified: src/tools/intel-darwin.jam Added: test/feature_cxxflags.py Modified: test/test_all.py </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 04 Apr 2014 20:40:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:16</guid> <description> <p> means that this ticket can be closed? </p> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Fri, 04 Apr 2014 22:50:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9774#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9774#comment:17</guid> <description> <p> Imo yes, it is just a configuration change on boost.build I missed, I fixed it here on the command line by duplicating what I have put in cxxflags to cflags. thx steven for helping out </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sat, 05 Apr 2014 04:47:38 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9774#comment:18 https://svn.boost.org/trac10/ticket/9774#comment:18 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket olli Wed, 09 Jul 2014 08:26:47 GMT component changed https://svn.boost.org/trac10/ticket/9774#comment:19 https://svn.boost.org/trac10/ticket/9774#comment:19 <ul> <li><strong>component</strong> <span class="trac-field-old">coroutine</span> → <span class="trac-field-new">context</span> </li> </ul> Ticket