Jump to content

Build environment and deployment on the Mac


Recommended Posts

That looks like the new Spidermonkey lib failed to build. It shouldn't even get to the game build in that case, are you just test building the game separately? (make sure you re-run build-osx-libs.sh in that case, either with --force-rebuild or delete the .already-built file in libraries/source/spidermonkey - which is quicker. I created a ticket for that bug: #2551).

Link to comment
Share on other sites

Okay. I don't have the 10.7SDK anywhere anymore, apparently, my Xcode is too up-to-date. So I can make the bundle, but for 10.8. 10.7 is the least used version though (less so than 10.6 afaik) so it's likely not too bad.

I'm giving this a go on Mavericks on my MBA because my iMac is really outdated. I'll update this post later.

Edit: getting this error:

../../../source/scriptinterface/ScriptTypes.h:71:10: fatal error: 'jspubtd.h'      file not found#include "jspubtd.h"

Btw. thats exactly the same error I got in 10.9.2 few weeks ago, when testing the new build scripts.

Edited by nylki
Link to comment
Share on other sites

I tried to build and it failed too (http://pastebin.com/bFM9vXjT).

I'm willing to help out, I'll drop by on IRC throughout the week.

1) Why are you building a bundle? 2) Why is it using 10.6 as the API version?

You can't just run the scripts, you have to change the options according to your system :) I'm pretty sure you can't use the 10.6 (maybe not even 10.7?) API anymore with the 10.9 SDK. Even though it should be no problem in theory. If you're on Mavericks, you should set it for 10.9 SDK and 10.9 API. Anything else is only for compatibility with older systems, which you might not care about.

Link to comment
Share on other sites

Not me, I'm on Mavericks 10.9.3 using the below clang version and I get the use_facet() related build issue with the icu library. It's related to the stdlib in use, which for some reason isn't being correctly set from the build environment for that library.

.../Applications/Xcode.app/Contents/Developer/usr/bin/make[1]: Making `all' in `icuinfo'   clang++	 ...  ../../../tools/icuinfo/icuinfo.cppclang++ -std=c++11  -arch x86_64 -fvisibility=hidden -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -Qunused-arguments -Wno-parentheses-equality -stdlib=libstdc++ -arch x86_64  -o icuinfo icuinfo.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm   Undefined symbols for architecture x86_64:  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:      KnownIssues::print() in libicutu.a(udbgutil.ao)      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libicutu.a(udbgutil.ao)      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libicutu.a(udbgutil.ao)      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char) in libicutu.a(udbgutil.ao)
$ clang++ --versionApple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)Target: x86_64-apple-darwin13.2.0Thread model: posix

To be clear, I had followed the instructions on the BuildInstructions page per:

  • A workaround may be to run the following commands in the terminal before building: export CFLAGS="-stdlib=libstdc++" LDFLAGS="-stdlib=libstdc++"
    export CC=clang CXX=clang++
  • Add toolset=clang to the Boost.Build (b2) flags in build-osx-libs.sh.
Edited by Echelon9
Link to comment
Share on other sites

Ben I made changes to the target os but that also ended in an error. Here's a failed build after I started from scratch (force-rebuild of libraries, etc.)

That link is dead, please post directly on the forum next time :(

Not me, I'm on Mavericks 10.9.3 using the below clang version and I get the use_facet() related build issue with the icu library. It's related to the stdlib in use, which for some reason isn't being correctly set from the build environment for that library.

The "-std=c++11" flag looks out of place, since we don't use it anywhere else, mixing that with libstdc++ could be a problem. Actually, I don't think I had a chance to test the build after internationalization was merged in (which brought the ICU dependency), on Mavericks anyway, I did test it as a git branch, but I believe it was on Lion or Mountain Lion. So it may well be the ICU build needs tweaking.
Link to comment
Share on other sites

Is it not possible to disable i18n (like I used to do with atlas) so I can continue to play the game?

attachicon.giffailedbuild.txt

This tells me that at least Boost is still using libc++ (notice the ../lib/c++/v1/vector in there?) Did you export the variables to set -stdlib=libstdc++? Note that if you close the terminal, reboot, etc. they will be lost and you have to set them again. Note also that if you change these flags, you need a full rebuild including build-osx-libs.sh

In file included from ../../../source/renderer/ModelRenderer.cpp:1:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../source/pch/graphics/precompiled.h:18:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../source/lib/precompiled.h:76:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../source/lib/pch/pch_boost.h:35:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../libraries/osx/boost/include/boost/filesystem.hpp:16:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../libraries/osx/boost/include/boost/filesystem/path.hpp:25:In file included from /Users/Mishra/0ad/build/workspaces/gcc/../../../libraries/osx/boost/include/boost/filesystem/path_traits.hpp:26:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:502:5: error:       implicit instantiation of undefined template '__static_assert_test<false>'    static_assert((is_same<typename allocator_type::value_type, value_ty...    ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:490:35: note:       expanded from macro 'static_assert'    typedef __static_assert_check<sizeof(__static_assert_test<(__B)>)> \                                  ^
Link to comment
Share on other sites

Last login: Sun May 25 08:57:27 on ttys000Mac-mini:~ Mishra$ cd 0adMac-mini:0ad Mishra$ svn update 0adUpdating '0ad':At revision 15216.Mac-mini:0ad Mishra$ export CFLAGS="-stdlib=libstdc++" LDFLAGS="-stdlib=libstdc++"Mac-mini:0ad Mishra$ export CC="clang"CXX=clang++Mac-mini:0ad Mishra$ cd libraries/osxMac-mini:osx Mishra$ ./build-osx-libs.sh --force-rebuild -j5Building zlib...~/0ad/libraries/osx/zlib/zlib-1.2.8 ~/0ad/libraries/osx/zlib ~/0ad/libraries/osxpatching file configureCompiler error reporting is too harsh for ./configure (perhaps remove -Werror).** ./configure aborting.ERROR: zlib build failedMac-mini:osx Mishra$ 

So if I want to build the game I export cflags> force rebuild libraries> clean workspaces> update workspaces > cd gcc > make, right? All in one Terminal window.

Link to comment
Share on other sites

Sorry guys I was unaware that the post actually made it. My browser crashed so I figured oh... it was never updated. My bad.

Please upload logs as files (or to some paste site) instead of inlining them in posts.

Can you try passing 'toolset=clang' to the b2 script? (Line 320 in build-osx-libs.sh currently)

This what I have

(./bootstrap.sh --with-libraries=filesystem,system,signals --prefix=$INSTALL_DIR && ./b2 cflags="$CFLAGS toolset=clang " cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" ${JOBS} -d2 --layout=tagged --debug-configuration link=static threading=multi variant=release,debug install) || die "Boost build failed"
Link to comment
Share on other sites

Try this one:

(./bootstrap.sh --with-libraries=filesystem,system,signals --prefix=$INSTALL_DIR && ./b2 cflags="$CFLAGS" toolset=clang cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" ${JOBS} -d2 --layout=tagged --debug-configuration link=static threading=multi variant=release,debug install) || die "Boost build failed"
Link to comment
Share on other sites

Some parts of icu still build against libc++, which leads it to fail when linking with libstdc++ later on. Can you change line 584 in build-osx-libs.sh to

 (CXX="clang -stdlib=libstdc++" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" ../runConfigureICU MacOSX --prefix=$INSTALL_DIR --disable-shared --enable-static --disable-samples --enable-extras --enable-icuio --enable-layout --enable-tools && make ${JOBS} && make install) || die "ICU build failed"
(This is a hack, but it is likely to fix this one issue)
Link to comment
Share on other sites

Successful building libraries on Mavericks (10.9.3)

Changed the following lines in build-osx-libs.sh:

(./bootstrap.sh --with-libraries=filesystem,system,signals --prefix=$INSTALL_DIR && ./b2 cflags="$CFLAGS" toolset=clang cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" ${JOBS} -d2 --layout=tagged --debug-configuration link=static threading=multi variant=release,debug install) || die "Boost build failed"
(CXX="clang -stdlib=libstdc++" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS -lstdc++" ../runConfigureICU MacOSX --prefix=$INSTALL_DIR --disable-shared --enable-static --disable-samples --enable-extras --enable-icuio --enable-layout --enable-tools && make ${JOBS} && make install) || die "ICU build failed"
Failed build overall

SuccesLibsFailBuild.txt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...