Boost C++ Libraries: Ticket #10742: context library don't compile for iOS ARM https://svn.boost.org/trac10/ticket/10742 <p> I'm trying to use boost::coroutine on iphone, but some compile time error occurs. </p> <p> libs (random,regex,graph,random,chrono,thread,signals,filesystem,system,date_time) are ok. </p> <p> Main error: </p> <pre class="wiki"> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "armv7" "-arch" "armv7s" "-arch" "arm64" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-std=c++11" "-stdlib=libc++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -arch arm -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -D_LITTLE_ENDIAN -I"." -c -o "iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-32/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/make_arm_aapcs_macho_gas.o" "libs/context/src/asm/make_arm_aapcs_macho_gas.S" ...failed darwin.compile.asm iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-32/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/make_arm_aapcs_macho_gas.o... darwin.compile.asm iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-32/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/jump_arm_aapcs_macho_gas.o libs/context/src/asm/jump_arm_aapcs_macho_gas.S:94:11: error: invalid operand for instruction pop v1 ^ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "armv7" "-arch" "armv7s" "-arch" "arm64" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-std=c++11" "-stdlib=libc++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -arch arm -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -D_LITTLE_ENDIAN -I"." -c -o "iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-32/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/jump_arm_aapcs_macho_gas.o" "libs/context/src/asm/jump_arm_aapcs_macho_gas.S" ...failed darwin.compile.asm iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-32/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/jump_arm_aapcs_macho_gas.o... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10742 Trac 1.4.3 anonymous Tue, 04 Nov 2014 06:05:28 GMT attachment set https://svn.boost.org/trac10/ticket/10742 https://svn.boost.org/trac10/ticket/10742 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build-iphone-stage.log</span> </li> </ul> Ticket anonymous Tue, 04 Nov 2014 06:07:22 GMT attachment set https://svn.boost.org/trac10/ticket/10742 https://svn.boost.org/trac10/ticket/10742 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build.sh</span> </li> </ul> Ticket anonymous Tue, 04 Nov 2014 06:10:59 GMT <link>https://svn.boost.org/trac10/ticket/10742#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:1</guid> <description> <p> more info </p> <pre class="wiki">Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix Xcode 6.1 Build version 6A1052d </pre><p> and attackment build.sh line number 175 missing http address, cause boost trac attachment should not contains links. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Tue, 04 Nov 2014 07:39:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:2</guid> <description> <p> You specify address-model=32 at bjam's commandline - but in the output I see "arm64" (seems not to be correct for me). 64bit for ARM is not supported (might work but untested because lack of hardware). </p> <p> Could you add following to build/Jamfile.v2? </p> <p> ECHO "OS =" [ os.name ] ; </p> <p> And tell me the value of 'OS'? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 04 Nov 2014 11:21:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:3</guid> <description> <p> Sure. </p> <pre class="wiki"> $ ./bjam -j16 --build-dir=iphone-build -sBOOST_BUILD_USER_CONFIG=/Users/ryan/Developer/build/src/boost_1_57_0/tools/build/example/user-config.jam --stagedir=iphone-build/stage --prefix=/Users/ryan/Developer/build/ios/prefix abi=aapcs binary-format=mach-o address-model=32 toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-8.1 define=_LITTLE_ENDIAN link=static stage OS = MACOSX </pre><p> I specify address-model=32 because I see that <a href="http://www.boost.org/doc/libs/1_57_0/libs/context/doc/html/context/requirements.html">boost::context Requirements</a> says for cross-compiling I should specify target-os, abi, binary-format, architecture and address-model. Within or without address-model=32. The error will be same" </p> <pre class="wiki">libs/context/src/asm/jump_arm_aapcs_macho_gas.S:94:11: error: invalid operand for instruction pop v1 ^ </pre><p> But if I ignore abi , binary-formant and address-model. Only architecture specified. Error will be 'platform not supported' </p> <pre class="wiki"> $ ./bjam -j16 --build-dir=iphone-build -sBOOST_BUILD_USER_CONFIG=/Users/ryan/Developer/build/src/boost_1_57_0/tools/build/example/user-config.jam --stagedir=iphone-build/stage --prefix=/Users/ryan/Developer/build/ios/prefix toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-8.1 define=_LITTLE_ENDIAN link=static stage OS = MACOSX Performing configuration checks - 32-bit : yes (cached) - lockfree boost::atomic_flag : no (cached) - has_icu builds : no (cached) ...some thing ignore.... libs/context/src/unsupported.cpp:7:2: error: "platform not supported" #error "platform not supported" ^ 1 error generated. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Tue, 04 Nov 2014 12:24:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:4</guid> <description> <p> unfortunately boost.build does not distinguish between Mac OS X an iOS (iphone) in 'os.name' - so you are forced to add the bjam-properties at command-line. </p> <p> Could you check new version of boost.context? I've updated the missing curly brackets in the asm-file and tell me if it's working?! </p> </description> <category>Ticket</category> </item> <item> <author>n3v3r54y10v3@…</author> <pubDate>Wed, 05 Nov 2014 01:20:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:5</guid> <description> <p> you mean commit 8bc0c17489142f7f7fa698d7142e9085bc845092 on github ? It works. I have this tested on my iphone5s. </p> <p> BTW. Will this support arm64 later ? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Thu, 06 Nov 2014 08:05:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:6</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10742#comment:5" title="Comment 5">n3v3r54y10v3@…</a>: </p> <blockquote class="citation"> <p> you mean commit 8bc0c17489142f7f7fa698d7142e9085bc845092 on github ? It works. I have this tested on my iphone5s. </p> </blockquote> <p> thx </p> <blockquote class="citation"> <p> BTW. Will this support arm64 later ? </p> </blockquote> <p> unfortunately no - the register size is different (4byte vsa 8byte on arm64). do you have access to an arm64 system and you like to test some code? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Thu, 06 Nov 2014 08:05:11 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10742#comment:7 https://svn.boost.org/trac10/ticket/10742#comment:7 <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> Ticket n3v3r54y10v3@… Thu, 06 Nov 2014 08:15:11 GMT <link>https://svn.boost.org/trac10/ticket/10742#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:8</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10742#comment:6" title="Comment 6">olli</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10742#comment:5" title="Comment 5">n3v3r54y10v3@…</a>: </p> <blockquote class="citation"> <p> you mean commit 8bc0c17489142f7f7fa698d7142e9085bc845092 on github ? It works. I have this tested on my iphone5s. </p> </blockquote> <p> thx </p> <blockquote class="citation"> <p> BTW. Will this support arm64 later ? </p> </blockquote> <p> unfortunately no - the register size is different (4byte vsa 8byte on arm64). do you have access to an arm64 system and you like to test some code? </p> </blockquote> <p> Sure, I'm strongly glad to test this. The iphone5s use apple A7 processor and iphone6 use apple A8 processor, Both armv7s and arm64 supported. I don't know arm assembly but I can test your code on both of them. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Thu, 06 Nov 2014 09:25:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10742#comment:8" title="Comment 8">n3v3r54y10v3@…</a>: </p> <blockquote class="citation"> <p> Sure, I'm strongly glad to test this. The iphone5s use apple A7 processor and iphone6 use apple A8 processor, Both armv7s and arm64 supported. I don't know arm assembly but I can test your code on both of them. </p> </blockquote> <p> fine - but you have to wait till I've finished the ARM64 version </p> </description> <category>Ticket</category> </item> <item> <author>n3v3r54y10v3@…</author> <pubDate>Tue, 11 Nov 2014 02:51:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:10</guid> <description> <p> Great :) </p> <p> May the force be with you! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Wed, 12 Nov 2014 18:48:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:11</guid> <description> <p> Could you compile and test the sources from branch develop on ARM64/MACH-O (iPhone)? It might be that the exception handling will not work. </p> </description> <category>Ticket</category> </item> <item> <author> n3v3r54y10v3@…</author> <pubDate>Tue, 09 Dec 2014 09:07:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10742#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10742#comment:12</guid> <description> <p> I'm so sorry that I didn't see you post since now. Got lots of of email addresses, and this one doesn't connect to my main box, I have fixed it. I cloned boost from github yesterday and saw your commits, this cannot compile correct. </p> <pre class="wiki">ryan@T4F-MBP-13594: ~/code/boost master! $ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-std=c++11" "-stdlib=libc++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_CONTEXT_SOURCE -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN -I"." -c -o "/Users/ryan/Developer/boost_build_for_cocos2d-x/iphone-build/boost/bin.v2/libs/context/build/darwin-8.1~iphone/release/abi-aapcs/address-model-64/architecture-arm/link-static/macosx-version-iphone-8.1/target-os-iphone/threading-multi/asm/jump_arm64_aapcs_macho_gas.o" "libs/context/src/asm/jump_arm64_aapcs_macho_gas.S" libs/context/src/asm/jump_arm64_aapcs_macho_gas.S:66:7: error: unexpected token at start of statement @ save LR as PC ^ libs/context/src/asm/jump_arm64_aapcs_macho_gas.S:67:11: error: vector register expected push {lr} ^ libs/context/src/asm/jump_arm64_aapcs_macho_gas.S:68:7: error: unexpected token at start of statement </pre><p> we can compile after replace "-arch" "arm64" to "-arch" "armv7s" or "-arch" "arm", but that result not arm64 version. </p> </description> <category>Ticket</category> </item> </channel> </rss>