Boost C++ Libraries: Ticket #2762: impossible to build boost 1.38 for iphone https://svn.boost.org/trac10/ticket/2762 <p> I'm seeing the following error: </p> <p> darwin.compile.c++ bin.v2/libs/math/build/darwin-4.0.1~iphone/release/architecture-arm/macosx-version-iphone-2.2/target-os-iphone/threading-multi/fmin.o In file included from ./boost/math/special_functions/detail/fp_traits.hpp:27, </p> <blockquote> <p> from ./boost/math/special_functions/fpclassify.hpp:20, from libs/math/build/../src/tr1/fmin.cpp:8: </p> </blockquote> <p> ./boost/detail/endian.hpp:69:3: error: #error The file boost/detail/endian.hpp needs to be set up for your CPU type. </p> <p> I've edited darwin.jam file to reflect new SDKs paths for iphoneos </p> <p> 199 local rule init-available-sdk-versions ( condition * : root ? ) 200 { 201 root ?= <a class="missing wiki">/Developer/Platforms</a>/iPhoneOS.platform/Developer ; 202 local sdks-root = $(root)/SDKs ; </p> <p> and got the following user-config.jam file in my ~ dir. </p> <p> using darwin : 4.0.1~iphone </p> <blockquote> <p> : <a class="missing wiki">/Developer/Platforms</a>/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1 </p> </blockquote> <p> -arch arm </p> <blockquote> <p> : &lt;striper&gt; : &lt;architecture&gt;arm &lt;target-os&gt;iphone &lt;macosx-version&gt;iphone-2.2 ; </p> </blockquote> <p> using darwin : 4.0.1~iphonesim </p> <blockquote> <p> : <a class="missing wiki">/Developer/Platforms</a>/iPhoneSimulator.platform/Developer/usr/bin/g++ : &lt;striper&gt; : &lt;architecture&gt;x86 &lt;target-os&gt;iphone &lt;macosx-version&gt;iphonesim-2.2 ; </p> </blockquote> <p> Removing user-config.jam results in bjam not being able to find arm g++. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2762 Trac 1.4.3 René Rivera Sun, 15 Feb 2009 19:59:58 GMT component changed; cc, owner set https://svn.boost.org/trac10/ticket/2762#comment:1 https://svn.boost.org/trac10/ticket/2762#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">John Maddock</span> added </li> <li><strong>owner</strong> set to <span class="trac-author">René Rivera</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">config</span> </li> </ul> <p> It seems <strong>detail/endian.hpp</strong> isn't usable for anything but Unix style with glibc systems. So I'm not sure how the math lib is supposed to work on anything other than glibc. I can certainly try and make it work for ARM using Xcode. But perhaps this is a bigger problem? </p> Ticket John Maddock Mon, 16 Feb 2009 10:37:06 GMT <link>https://svn.boost.org/trac10/ticket/2762#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:2</guid> <description> <p> Rene: detail/endian.hpp has cases for a wide range of processors not just for glibc based systems. Unfortunately it doesn't cover this specific case - from Googling around I've found that the iphone on arm is little-endian, but haven't found what predefined macros are defined by GCC that identify this platform. Any ideas? </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 16 Feb 2009 11:18:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2762#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:3</guid> <description> <p> I forgot to mention that a temporary workaround would be to build with -D_LITTLE_ENDIAN=1 </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Mon, 16 Feb 2009 13:21:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2762#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2762#comment:2" title="Comment 2">johnmaddock</a>: </p> <blockquote class="citation"> <p> Rene: detail/endian.hpp has cases for a wide range of processors not just for glibc based systems. Unfortunately it doesn't cover this specific case - from Googling around I've found that the iphone on arm is little-endian, but haven't found what predefined macros are defined by GCC that identify this platform. Any ideas? </p> </blockquote> <p> Oh, sorry... didn't read the CPP code correctly and thought the glibc condition applied to all the code. Yes I have and idea of what the defs are &lt;<a class="ext-link" href="https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.hpp"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.hpp</a>&gt;. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Fri, 19 Mar 2010 14:52:41 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/2762#comment:5 https://svn.boost.org/trac10/ticket/2762#comment:5 <ul> <li><strong>owner</strong> changed from <span class="trac-author">René Rivera</span> to <span class="trac-author">John Maddock</span> </li> </ul> <p> Sending this back to JM since I think I answered the questions.. Although I'm correcting for a name change &lt;<a class="ext-link" href="https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.h"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.h</a>&gt;. </p> Ticket anonymous Fri, 19 Mar 2010 16:37:22 GMT <link>https://svn.boost.org/trac10/ticket/2762#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:6</guid> <description> <p> Errr... so what do I actually have to <em>do</em> to fix this? </p> <p> John. </p> <p> PS boost/endian.hpp isn't really part of Boost.Config, not sure what it is a part of though... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Fri, 19 Mar 2010 17:12:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2762#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2762#comment:6" title="Comment 6">anonymous</a>: </p> <blockquote class="citation"> <p> Errr... so what do I actually have to <em>do</em> to fix this? </p> <p> John. </p> <p> PS boost/endian.hpp isn't really part of Boost.Config, not sure what it is a part of though... </p> </blockquote> <p> I guess it's not part of anything, since it's in boost/detail. And it seems various people have edited it, weirdly including myself. I can go a head and fix it since I'm one of the few people using ARM, but it might take a while. SO I guess if you think I should fix it send it back to me :-) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 19 Mar 2010 17:22:42 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/2762#comment:8 https://svn.boost.org/trac10/ticket/2762#comment:8 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">René Rivera</span> </li> </ul> <p> Rene, I don't mind fixing it, but I'm not clear what the fix is, and I can't test here... so I'm sending it back to you... sorry!! </p> <p> John. </p> Ticket Johan Boulé Mon, 24 May 2010 22:15:33 GMT <link>https://svn.boost.org/trac10/ticket/2762#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:9</guid> <description> <p> gcc defines <span class="underline">BIG_ENDIAN</span> or <span class="underline">LITTLE_ENDIAN</span> I think the boost header should check for those too since it already checks for _BIG_ENDIAN and _LITTLE_ENDIAN. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 24 May 2010 22:17:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2762#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2762#comment:10</guid> <description> <p> (about previous post, the wiki ate the double underscores around the identifiers) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Wed, 26 May 2010 21:10:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2762#comment:11 https://svn.boost.org/trac10/ticket/2762#comment:11 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62252" title="Add detection of __LITTLE/BIG_ENDIAN__ for GCC versions that define ...">[62252]</a>) Add detection of <span class="underline">LITTLE/BIG_ENDIAN</span> for GCC versions that define them. I.e. the Apple builds of Xcode/gcc. (fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2762" title="#2762: Bugs: impossible to build boost 1.38 for iphone (closed: fixed)">#2762</a>) </p> Ticket