Giter Club home page Giter Club logo

boost-xcode5-iosx's People

Contributors

mgrebenets avatar s-lee-kwong avatar sevostianovivansis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boost-xcode5-iosx's Issues

Just some questions...

I'm more of a java/ruby/py guy, so this boost build stuff is really out of my wheelhouse. These are probably noob problems.

I've got Xcode 5.0.2 on os x 10.9.1, compiling boost 1.54 against the iOS 7 sdk. First issue was, I tried running the script unmodified, which attempted to build almost all of the boost libs. I hit a "cannot use precompiled-header output with multiple arch options" issue. Google seemed to think some header files were being passed as compiler inputs, but I couldn't figure out which of the boost libs was the culprit. I changed boost libs to just "serializer system", which are all we use, and that error went away.

Next issue was that in the built boost.framework, all the header files are in the Headers folder. In older boost.frameworks we'd built using other variants of this script, the headers were in Headers/boost/. In our source, include statements like <boost/whatever> were failing because boost/ was no longer in the header's relative path.

I altered your script to put the headers under a boost folder, and then hit the next snag: when compiling my project, Xcode choked on boost/detail/endian.hpp, which attempts to include sys/endian.h. Looks like in iossdk, it should be arm/endian.h or machine/endian.h.

I'm not using the c++11 flags. I'm going to try 1.53 and 1.55 now.

Building for boost locale only

So I modified the script to only build the boost locale module.

I replaced

: ${BOOST_LIBS:="chrono context filesystem graph_parallel iostreams locale mpi program_options python regex serialization signals system thread timer wave"}
BOOST_LIBS="$BOOST_LIBS date_time graph math random test exception"

to
${BOOST_LIBS:="locale"}
BOOST_LIBS="$BOOST_LIBS"

then ran ./boost.sh clean -v 1.55.0, having the boost_1_55_0.tar.bz2 in the same folder

and it completed successfully but when I use it as a framework in iOS, I would get undefined symbol errors for arm7, i386 etc

Undefined symbols for architecture i386:
"boost::locale::base_message_format<char>::id", referenced from:
  boost::locale::basic_message<char>::write(std::__1::locale const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in 

I looked at the framework and got this:

file boost.framework/boost
boost.framework/boost: Mach-O universal binary with 5 architectures
boost.framework/boost (for architecture armv7): current ar archive random library
boost.framework/boost (for architecture armv7s):    current ar archive random library
boost.framework/boost (for architecture i386):  current ar archive random library
boost.framework/boost (for architecture x86_64):    current ar archive random library
boost.framework/boost (for architecture cputype (16777228) cpusubtype (0)): current ar archive

so I looked more closely to the log and found this

/Users/shawnlee-kwong/work/code/boost-xcode5-iosx/osx/build/x86_64: libboost_locale.a   obj
rm: /Users/shawnlee-kwong/work/code/boost-xcode5-iosx/osx/build/*/libboost.a: No such file or directory
...armv7
ar: obj/libboost_locale/*.o: No such file or directory
...armv7s 
ar: obj/libboost_locale/*.o: No such file or directory
...arm64
ar: obj/libboost_locale/*.o: No such file or directory
...i386
...x86_64
...osx-i386
...osx-x86_64
Completed successfully

so I investigated the stack trace and found this when trying to bjam the iphone build

Performing configuration checks
- iconv (libc)             : no
- iconv (separate)         : no
- icu                      : no
- icu (lib64)              : no
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.

For the other builds like simulator and osx it did find iconv, as an example

Performing configuration checks
- iconv (libc)             : no
- iconv (separate)         : yes
- icu                      : no
- icu (lib64)              : no

So I was wondering if anyone had an idea about iconv or ICU for the iphone build.

Undefined Symbols for architecture

Hey,

I am using xcode 5.1.1 and trying to deploy to an ios 7.1 device and am on a mac.

I was trying to use your script to build boost for my ios project but I ran into a little problem. I included the framework and followed all of your instructions as well as looked at the code examples and downloaded the vendor.tar so I was sure there wouldn't be a problem with me building the framework.

I opened the boost-xcode5-demo in xcode, linked to the boost framework that I mentioned above and built it under one of the simulators. It worked and I was happy but then I selected "iOS Device" and then I get the typical undefined symbols for architecture arm7s. I am familiar with this problem relating to the framework itself not being built properly. So I was wondering if you know what is wrong.

Thanks,

PS. Here is a snippet of the error

Undefined symbols for architecture armv7s:
"boost::atomics::detail::lockpool::get_lock_for(void const volatile*)", referenced from:
boost::thread_detail::enter_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
boost::thread_detail::commit_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
boost::thread_detail::rollback_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

File detection in build script

Hello,
If I put boost source file into root and run script I'm getting "file not found" because of using "-d". If I replace it with "-a" it works. Here is a place in script:

[ -d $BOOST_TARBALL ] || ( echo "No such file: $BOOST_TARBALL"; abort )

Maybe I'm doing something wrong and it requires not file but directory?

Errors during bjam init

Hi. Trying to build boost using the script for two days straight.
My configuration is Xcode 5.0.2 from appstore on macosx 10.8.5. Here is what i think is the important bit:

/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:493: in validate-value-string from module feature
error: "iphone-7.0" is not a known value of feature
error: legal values:
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:363: in expand-subfeatures-aux from module feature
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:424: in feature.expand-subfeatures from module feature
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/build-request.jam:20: in apply-to-property-set from module build-request
(builtin):-1: in sequence.transform from module sequence
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/build-request.jam:32: in build-request.expand-no-defaults from module build-request
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build-system.jam:594: in load from module build-system
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/kernel/modules.jam:289: in import from module modules
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/kernel/bootstrap.jam:139: in boost-build from module
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/boost-build.jam:17: in module scope from module

/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:493: in validate-value-string from module feature
error: "iphone-7.0" is not a known value of feature
error: legal values:
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:363: in expand-subfeatures-aux from module feature
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/feature.jam:424: in feature.expand-subfeatures from module feature
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/build-request.jam:20: in apply-to-property-set from module build-request
(builtin):-1: in sequence.transform from module sequence
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build/build-request.jam:32: in build-request.expand-no-defaults from module build-request
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/build-system.jam:594: in load from module build-system
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/kernel/modules.jam:289: in import from module modules
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/tools/build/v2/kernel/bootstrap.jam:139: in boost-build from module
/Users/godexsoft/Development/libs/boost-xcode5-iosx/src/boost_1_54_0/boost-build.jam:17: in module scope from module

As you can see bjam does not detect iphone sdk at all. Also i tried to add echo logs to darwin.jam in order to see what's going on. It selects the default root which is /Developer. I even tried to link my /Application/Xcode.app/... stuff into /Developer so that it hopefully will pick it up but no luck at all.

I found a prebuilt version which seems to work but the problem is i need a custom one built with gnu stdlib and gnu c++ 98 in order to make it work with my project which has a lot of legacy libs which wont work with c++11 on clang and it's way too much pain to make that stuff compile (the project is literally huge).

Please let me know if you got any ideas. Thanks!

compile fails boost 1.53.0

Hello ,

I am trying out your script but I got bunch of errors.
I am under OSX 10.8.4 and Xcode 5.0.1 with the command line tools no other xcode are available. I have the 1.53 tar for boost and I cloned your script and I ran

I got something like this when I execute ./boost.sh --version 1.53.0

sh: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++: No such file or directory
sh: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory

Component configuration:

- atomic                   : not building
- chrono                   : not building
- context                  : not building
- date_time                : not building
- exception                : not building
- filesystem               : not building
- graph                    : not building
- graph_parallel           : not building
- iostreams                : not building
- locale                   : not building
- math                     : not building
- mpi                      : not building
- program_options          : not building
- python                   : not building
- random                   : not building
- regex                    : not building
- serialization            : building
- signals                  : not building
- system                   : not building
- test                     : not building
- thread                   : not building
- timer                    : not building
- wave                     : not building

...patience...
...found 896 targets...
...updating 58 targets...
common.mkdir iphonesim-build
common.mkdir iphonesim-build/stage
common.mkdir iphonesim-build/boost
common.mkdir iphonesim-build/boost/bin.v2
common.mkdir iphonesim-build/stage/lib
common.mkdir iphonesim-build/boost/bin.v2/libs
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone
common.mkdir iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_archive.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_iarchive.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_iserializer.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_oarchive.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_oserializer.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_pointer_iserializer.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_pointer_oserializer.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_serializer_map.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory
darwin.compile.c++ iphonesim-build/boost/bin.v2/libs/serialization/build/darwin-6.1
iphonesim/release/architecture-x86/link-static/macosx-version-iphonesim-7.0/target-os-iphone/threading-multi/basic_text_iprimitive.o
/bin/sh: line 1: /Applications/Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++: No such file or directory

And after it compiles some of the headers I got this at the end

Splitting all existing fat binaries...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_serialization.a (No such file or directory)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_serialization.a (No such file or directory)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_serialization.a (No such file or directory)
cp: iphonesim-build/stage/lib/libboost_serialization.a: No such file or directory
Decomposing each architecture's .a files
Decomposing libboost_serialization.a...
ar: ../libboost_serialization.a: No such file or directory
ar: ../libboost_serialization.a: No such file or directory
ar: ../libboost_serialization.a: No such file or directory
ar: ../libboost_serialization.a: No such file or directory
Linking each architecture into an uberlib ( libboost_serialization.a => libboost.a )
...armv7
ar: obj/.o: No such file or directory
...armv7s
ar: obj/
.o: No such file or directory
...arm64
ar: obj/.o: No such file or directory
...i386
ar: obj/
.o: No such file or directory
...osx-i386
/usr/bin/ranlib: file: libboost.a(stl_port.o) has no symbols
...x86_64
/usr/bin/ranlib: file: libboost.a(stl_port.o) has no symbols
Framework: Building /Users/sabotage3d/LIB/boost-ios-xcode5/ios/framework/boost.framework from /Users/sabotage3d/LIB/boost-ios-xcode5/ios/build...
Framework: Setting up directories...
Framework: Creating symlinks...
Lipoing library into /Users/sabotage3d/LIB/boost-ios-xcode5/ios/framework/boost.framework/Versions/A/boost...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: empty archive with no architecture specification: /Users/sabotage3d/LIB/boost-ios-xcode5/ios/build/arm64/libboost.a (can't determine architecture for it)

Aborted: Lipo /Users/sabotage3d/LIB/boost-ios-xcode5/ios/framework failed

What environment has this Script been proven to work on?

I had to build boost for an iOS app 6 months ago and I used the Goodliffe script back then. I just updated to Mavericks and cant get the script to work, so I'm trying to nail down what changed between Mountain Lion and Mavericks that might have affected the build process.

Hardware: Late 2013 MacBookPro 2.7ghz i7 16gb

Environment:
OSX: 10.9 mavericks
Ruby 1.8.7 & 2.0.0 (using rbenv)
XCode 5.0.2
Compilers: Xcode llvm 5, gcc-4.2 (via homebrew), clang++
C++ Dialect / STDLIB: C++11 / libc++ (LLVM C++ stdlib with C11)

I actually got the .framework to compile late last night (following the Stack Overflow answer you cited in issue #1) and verified the FAT FILE using lipo -info boost which results in:

Architectures in the fat file: boost are: armv7 armv7s i386 x86_64 arm64

XCode Errors Building w/ compiled boost.framework

But Xcode 5 (iOS SDK 7.0) is still not happy

Undefined symbols for architecture armv7:
  "boost::thread::start_thread()", referenced from:
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

AND 

Undefined symbols for architecture armv7s:
  "boost::thread::start_thread()", referenced from:
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Boost.sh Errors

During the build process there are a few errors while "Decomposing libboost_thread.a" such as

Splitting all existing fat binaries...
Decomposing each architecture's .a files
Decomposing libboost_thread.a...
Unpacking libboost_thread from /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build
rm: /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build/armv7/obj/libboost_thread/*.o: No such file or directory
rm: /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build/armv7/obj/libboost_thread/*.SYMDEF*: No such file or directory
Unpacking libboost_thread from /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build
rm: /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build/armv7s/obj/libboost_thread/*.o: No such file or directory
rm: /Users/george/desktop/ruby-framework-scripts/boost-xcode5-iosx/ios/build/armv7s/obj/libboost_thread/*.SYMDEF*: No such file or directory

I'm going through the script now to verify everything is being placed in the correct directory during building (before we try to lipo them together). My feeling is that the libboost_thread library isn't being lipo'd correctly but the FAT file still shows armv7 and armv7s as bundled architectures.

Thanks for your help and all the work on this script, of all the available boost.sh scripts yours is the only one that seems to work with OSX 10.9 / XCode 5 / iOS 7!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.