Opened 14 years ago
Closed 12 years ago
#2762 closed Bugs (fixed)
impossible to build boost 1.38 for iphone
Reported by: | anonymous | Owned by: | René Rivera |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | Cc: | John Maddock |
Description
I'm seeing the following error:
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,
from ./boost/math/special_functions/fpclassify.hpp:20, from libs/math/build/../src/tr1/fmin.cpp:8:
./boost/detail/endian.hpp:69:3: error: #error The file boost/detail/endian.hpp needs to be set up for your CPU type.
I've edited darwin.jam file to reflect new SDKs paths for iphoneos
199 local rule init-available-sdk-versions ( condition * : root ? ) 200 { 201 root ?= /Developer/Platforms/iPhoneOS.platform/Developer ; 202 local sdks-root = $(root)/SDKs ;
and got the following user-config.jam file in my ~ dir.
using darwin : 4.0.1~iphone
: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1
-arch arm
: <striper> : <architecture>arm <target-os>iphone <macosx-version>iphone-2.2 ;
using darwin : 4.0.1~iphonesim
: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ : <striper> : <architecture>x86 <target-os>iphone <macosx-version>iphonesim-2.2 ;
Removing user-config.jam results in bjam not being able to find arm g++.
Change History (11)
comment:1 by , 14 years ago
Cc: | added |
---|---|
Component: | Building Boost → config |
Owner: | set to |
follow-up: 4 comment:2 by , 14 years ago
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?
John.
comment:3 by , 14 years ago
I forgot to mention that a temporary workaround would be to build with -D_LITTLE_ENDIAN=1
John.
comment:4 by , 14 years ago
Replying to johnmaddock:
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?
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 <https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.hpp>.
comment:5 by , 13 years ago
Owner: | changed from | to
---|
Sending this back to JM since I think I answered the questions.. Although I'm correcting for a name change <https://svn.boost.org/trac/boost/browser/sandbox/predef/boost/predef/architecture/arm.h>.
follow-up: 7 comment:6 by , 13 years ago
Errr... so what do I actually have to do to fix this?
John.
PS boost/endian.hpp isn't really part of Boost.Config, not sure what it is a part of though...
comment:7 by , 13 years ago
Replying to anonymous:
Errr... so what do I actually have to do to fix this?
John.
PS boost/endian.hpp isn't really part of Boost.Config, not sure what it is a part of though...
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 :-)
comment:8 by , 13 years ago
Owner: | changed from | to
---|
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!!
John.
comment:9 by , 12 years ago
gcc defines BIG_ENDIAN or LITTLE_ENDIAN I think the boost header should check for those too since it already checks for _BIG_ENDIAN and _LITTLE_ENDIAN.
comment:10 by , 12 years ago
(about previous post, the wiki ate the double underscores around the identifiers)
comment:11 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It seems detail/endian.hpp 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?