Boost C++ Libraries: Ticket #10442: Boost Context library fails for MIPS architecture https://svn.boost.org/trac10/ticket/10442 <p> Tried with all combinations (all of the fail): </p> <ul><li>uClib/glibc </li><li>MIPS32/MIPS32r2 </li><li>Big <a class="missing wiki">Endian/Little</a> Endian </li><li>Hard <a class="missing wiki">Float/Soft</a> Float </li></ul><p> This is a regression. boost-1.55.0 works fine. </p> <p> The failure is: </p> <blockquote class="citation"> <blockquote class="citation"> <blockquote class="citation"> <p> boost 1.56.0 Installing to staging directory </p> </blockquote> </blockquote> </blockquote> <p> (cd /br/output/build/boost-1.56.0 &amp;&amp; ./bjam -j5 -d+1 --user-config=/br/output/build/boost-1.56.0/user-config.jam toolset=gcc threading=multi variant=release link=shared runtime-link=shared --prefix=/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr --layout=system install) Performing configuration checks </p> <ul><li>32-bit : yes (cached) </li><li>arm : no (cached) </li><li>mips1 : yes (cached) </li></ul><p> Component configuration: </p> <ul><li>atomic : not building </li><li>chrono : not building </li><li>container : building </li><li>context : building </li><li>coroutine : not building </li><li>date_time : not building </li><li>exception : not building </li><li>filesystem : not building </li><li>graph : not building </li><li>graph_parallel : not building </li><li>iostreams : not building </li><li>locale : not building </li><li>log : not building </li><li>math : not building </li><li>mpi : not building </li><li>program_options : not building </li><li>python : not building </li><li>random : not building </li><li>regex : not building </li><li>serialization : not building </li><li>signals : not building </li><li>system : not building </li><li>test : not building </li><li>thread : not building </li><li>timer : not building </li><li>wave : not building </li></ul><p> ...found 21649 targets... ...updating 4 targets... gcc.compile.c++ bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported" </p> <blockquote> <p> #error "platform not supported" </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <blockquote> <blockquote> <blockquote> <p> "/br/output/host/usr/bin/mips-linux-gnu-g++" -ftemplate-depth-128 </p> </blockquote> </blockquote> </blockquote> <p> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp" </p> <p> ...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o... ...skipped &lt;pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi&gt;libboost_context.so.1.56.0 for lack of &lt;pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi&gt;unsupported.o... ...skipped &lt;p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib&gt;libboost_context.so.1.56.0 for lack of &lt;pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi&gt;libboost_context.so.1.56.0... ...skipped &lt;p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib&gt;libboost_context.so for lack of &lt;p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib&gt;libboost_context.so.1.56.0... ...failed updating 1 target... ...skipped 3 targets... make: <strong>* <a href="https://svn.boost.org/trac10/br/output/build/boost-1.56.0/.stamp_staging_installed">br/output/build/boost-1.56.0/.stamp_staging_installed</a> Error 1 </strong></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10442 Trac 1.4.3 Vincent.Riera@… Tue, 02 Sep 2014 13:00:17 GMT attachment set https://svn.boost.org/trac10/ticket/10442 https://svn.boost.org/trac10/ticket/10442 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-0001-fix-mips.patch</span> </li> </ul> <p> boost-0001-fix-mips.patch </p> Ticket Vincent.Riera@… Tue, 02 Sep 2014 13:01:58 GMT <link>https://svn.boost.org/trac10/ticket/10442#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:1</guid> <description> <p> The attached patch fixes the problem. I know is not correct to apply it upstream, but it will help you to identify faster where is the problem. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Tue, 02 Sep 2014 17:23:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:2</guid> <description> <p> sorry - the patch is invalid. </p> <p> could you post the output of b2 ... --debug-building </p> </description> <category>Ticket</category> </item> <item> <author>Vincent.Riera@…</author> <pubDate>Wed, 03 Sep 2014 09:13:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:2" title="Comment 2">olli</a>: </p> <blockquote class="citation"> <p> sorry - the patch is invalid. </p> </blockquote> <p> I know the patch is invalid. The only purpose of that patch is to help you to identify the problem faster, as I said in my previous comment. </p> <blockquote class="citation"> <p> could you post the output of b2 ... --debug-building </p> </blockquote> <p> I'm sorry, b2? </p> </description> <category>Ticket</category> </item> <item> <author>Vincent.Riera@…</author> <pubDate>Wed, 03 Sep 2014 09:35:27 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/10442 https://svn.boost.org/trac10/ticket/10442 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">b2.log</span> </li> </ul> <p> b2 --debug-building log </p> Ticket Vincent.Riera@… Wed, 03 Sep 2014 09:37:12 GMT <link>https://svn.boost.org/trac10/ticket/10442#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:4</guid> <description> <p> I have attached a file with the output of this command: </p> <p> ./b2 -j1 -d+2 --user-config=/br/output/build/boost-1.56.0/user-config.jam toolset=gcc threading=multi variant=release link=shared runtime-link=shared --prefix=/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr --layout=system install --debug-building </p> <p> Is that what you need? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 03 Sep 2014 10:05:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:5</guid> <description> <p> in the log output I can read: &lt;abi&gt;sysv </p> <p> it's the wrong property for MIPS (only o32 is valid) </p> <p> seams that you try a cross-compile try abi=o32 on bjam/b2 command-line </p> </description> <category>Ticket</category> </item> <item> <author>Vincent.Riera@…</author> <pubDate>Wed, 03 Sep 2014 10:49:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:6</guid> <description> <p> Yes, I'm cross-compiling for MIPS32 architecture, so the ABI is o32. From your comment I understand that the boost build system is using the host's ABI instead of the target's one. </p> <p> If I pass the "abi=o32" option as you suggested, it works. But the thing is that the build system should be smart enough to detect when I'm cross compiling and using the target's ABI instead of the host's ABI. </p> <p> That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 03 Sep 2014 11:56:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:6" title="Comment 6">Vincent.Riera@…</a>: </p> <blockquote class="citation"> <p> If I pass the "abi=o32" option as you suggested, it works. But the thing is that the build system should be smart enough to detect when I'm cross compiling and using the target's ABI instead of the host's ABI. </p> </blockquote> <p> this isn't trivial - I suspect that you can detect at runtime for which ABI your are compiling (you can have multiple like on MIPS) </p> <blockquote class="citation"> <p> That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine. </p> </blockquote> <p> because the default is SYSV </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 03 Sep 2014 11:57:08 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10442#comment:8 https://svn.boost.org/trac10/ticket/10442#comment:8 <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">invalid</span> </li> </ul> Ticket anonymous Wed, 03 Sep 2014 12:10:06 GMT <link>https://svn.boost.org/trac10/ticket/10442#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:7" title="Comment 7">olli</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:6" title="Comment 6">Vincent.Riera@…</a>: </p> <blockquote class="citation"> <p> That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine. </p> </blockquote> <p> because the default is SYSV </p> </blockquote> <p> So, you mean that the sysv ABI is valid for powerpc and arm, but not form MIPS? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 03 Sep 2014 16:55:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10442#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10442#comment:10</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:9" title="Comment 9">anonymous</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:7" title="Comment 7">olli</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10442#comment:6" title="Comment 6">Vincent.Riera@…</a>: </p> <blockquote class="citation"> <p> That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine. </p> </blockquote> <p> because the default is SYSV </p> </blockquote> <p> So, you mean that the sysv ABI is valid for powerpc and arm, but not form MIPS? </p> </blockquote> <p> no, SYSV ABI is used for x86/non-Windows, powerpc on LINUX etc. ARM uses AAPCS and MIPS O32/N32/N64 etc. </p> </description> <category>Ticket</category> </item> </channel> </rss>