Mac & Trunk trouble

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Mac & Trunk trouble

Post by Z-Man »

Ok, so now it's my turn to make one of THOSE posts :) I can't get trunk to build on the Mac. Part of the trouble may be that I'm stuck on a PPC Mac with Tiger and thus XCode 2.5, part of it is that I hate the Mac keyboard with a passion, especially the way errant keypresses turn into TWO characters I have to delete on the console, and that I'm no friend of XCode's UI paradigm of opening a new Window for everything. Anyway.

I have the latest Mac Libs package (I think), bison 2.5 from MacPorts, XCode 2.5, Client Debug builds work fine. Building from 0.2.8 also fully works. The problems start with the Client Release build on trunk, I get linker errors (massively snipped, similar lines with just different symbols/libraries follow):

Code: Select all


Ld "/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/Objects-normal/i386/Armagetron Advanced" normal i386
    cd /Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS
    /Developer/usr/bin/g++-4.0 -o /Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron\ Advanced.build/Release/Armagetron\ Advanced.build/Objects-normal/i386/Armagetron\ Advanced -L/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Release -L/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Release -L/Library/Frameworks/ArmagetronAdvanced/current -F/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Release -F/Library/Frameworks/ArmagetronAdvanced/current -filelist /Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron\ Advanced.build/Release/Armagetron\ Advanced.build/Objects-normal/i386/Armagetron\ Advanced.LinkFileList -larmaprotobuf -framework Cocoa -framework OpenGL -lfreetype -lftgl -framework libpng -framework SDL_image -framework SDL -framework Growl-WithInstaller -framework ApplicationServices -framework CoreFoundation -lprotobuf -arch i386 -Wl,-s -Wl,-Y,1455 -lxml2 -lz -lpthread -liconv -lm
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /System/Library/Frameworks/OpenGL.framework/OpenGL cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
... (^that looks like the root of the problem right there)
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning fat file: /usr/lib/libSystem.B.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_errno
_exit
_mach_init_routine
...
.objc_class_name_NSArray referenced from SDL expected to be defined in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
.objc_class_name_NSAssertionHandler referenced from SDL expected to be defined in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
.objc_class_name_NSAutoreleasePool referenced from SDL expected to be defined in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
.objc_class_name_NSBitmapImageRep referenced from SDL expected to be defined in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
.objc_class_name_NSCursor referenced from SDL expected to be defined in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
...
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../crt1.o reference to undefined ___keymgr_dwarf2_register_sections
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../crt1.o reference to undefined __cthread_init_routine
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../crt1.o reference to undefined _errno
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../crt1.o reference to undefined _exit
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../crt1.o reference to undefined _mach_init_routine
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined __keymgr_get_and_lock_processwide_ptr
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined __keymgr_get_and_lock_processwide_ptr_2
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined __keymgr_set_and_unlock_processwide_ptr
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined _calloc
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined _dlopen
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined _dlsym
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined _free
/Developer/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o reference to undefined _malloc
/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/Objects-normal/i386/eAdvWall.o reference to undefined std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const
/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/Objects-normal/i386/eAdvWall.o reference to undefined std::basic_ios<char, std::char_traits<char> >::eof() const
...
/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/Objects-normal/i386/tCommandLine.o reference to undefined ___gxx_personality_v0
more references to undefined symbols ...
collect2: ld returned 1 exit status
so yeah, it seems it doesn't find the correct version of some standard libraries.

Edit: The successful linker command line for 0.2.8 is

Code: Select all

/Developer/usr/bin/g++-4.0 -o /Users/manuel/Desktop/Tron/Develop/0.2.8/armagetronad/MacOS/build/Armagetron\ Advanced.build/Release/Armagetron\ Advanced.build/Objects-normal/i386/Armagetron\ Advanced -L/Users/manuel/Desktop/Tron/Develop/0.2.8/armagetronad/MacOS/build/Release -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib -L/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ArmagetronAdvanced/current -F/Users/manuel/Desktop/Tron/Develop/0.2.8/armagetronad/MacOS/build/Release -F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ArmagetronAdvanced/current -filelist /Users/manuel/Desktop/Tron/Develop/0.2.8/armagetronad/MacOS/build/Armagetron\ Advanced.build/Release/Armagetron\ Advanced.build/Objects-normal/i386/Armagetron\ Advanced.LinkFileList -framework Cocoa -framework OpenGL -framework libpng -framework SDL_image -framework SDL -framework CoreServices -framework SDL_mixer -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.3 -framework\ SDL -framework\ SDL_image -framework\ SDL_mixer -lxml2 -lz -lpthread -liconv -lm -isysroot /Developer/SDKs/MacOSX10.4u.sdk
I assume the lack of references to /Developer/SDKs/MacOSX10.4u.sdk would be the reason the trunk linkage fails.
Edit2: and the lack is because of a customized, but empty, SDK path in the client release configuration. Removing that fixes the build. Of course, I can't check whether the i386 side of the resulting universal binary works; so is that path there on purpose?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Mac & Trunk trouble

Post by Z-Man »

Ok, another problem. Once the client is built, packing it into the dmg fails with this:

Code: Select all

    /bin/sh -c \"/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/build/Armagetron\ Advanced.build/Release/Create\ Client\ Release.build/Script-9B3139B40EFD0586009690D0.sh\"
mktemp: cannot make temp file /tmp/armagetronad: File exists
(in /Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS)
** Invoke release:dmg (first_time)
** Execute release:dmg
rake aborted!
wrong number of arguments (3 for 2)
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:725:in `fu_check_options'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:725:in `sh'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh'
/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/rakelib/release.rake:8:in `create_dmg'
/Users/manuel/Desktop/Tron/Develop/trunk/armagetronad/MacOS/rakelib/release.rake:52
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/opt/local/bin/rake:18:in `load'
/opt/local/bin/rake:18
Rake is version 0.7.1 (duh), ruby 1.8.7. This is when building from bzr.

Building from a tarball fails much earlier now, the first time rake is invoked:

Code: Select all

    /bin/sh -c \"/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/build/Armagetron\ Advanced.build/Release/Armagetron\ Advanced.build/Script-9BD7DB490A2CBA7A00D7033C.sh\"
(in /Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS)
rake aborted!
undefined method `[]' for nil:NilClass
/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/rakelib/config.rb:15:in `[]'
/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/rakelib/config.rb:146:in `version'
/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/rakelib/xcode.rake:9:in `initialize'
/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/rakelib/xcode.rake:62:in `new'
/Users/manuel/Desktop/Tron/Builds/armagetronad-experimental-0.3_alpha_z1582_20110912/MacOS/rakelib/xcode.rake:62
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1346:in `load'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1346:in `load'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1863:in `load_imports'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1832:in `load_rakefile'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1900:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/opt/local/bin/rake:18:in `load'
/opt/local/bin/rake:18
(could be that this was already from a build attempt where I tried to just circumvent the problem, but the error and backtrace was the same.)
Edit: ah yes, that would be because nobody cared for mac builds from tarballs for too long and they broke. Trying my best to fix them.
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Mac & Trunk trouble

Post by Jip »

Bump. Any success here?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Mac & Trunk trouble

Post by Z-Man »

Not much. I honestly can only bear working with XCode in short bursts. I still can do client debug builds just fine to test integration of new stuff, so as long as dlh can do proper builds, I'm not all that annoyed.
PokeMaster
Match Winner
Posts: 638
Joined: Mon Jun 14, 2010 5:36 am

Re: Mac & Trunk trouble

Post by PokeMaster »

no worries zman! in hopefully 4 short years i might know shit about how to do stuff and may be of assistance!

</chrisd>
Image Image Image Image Image Image Image Image
Image Image Image Image Image Image Image Image Image
User avatar
ElmosWorld
Match Winner
Posts: 610
Joined: Wed Jun 16, 2010 5:38 pm

Re: Mac & Trunk trouble

Post by ElmosWorld »

PokeMaster wrote:no worries zman! in hopefully 4 short years i might know shit about how to do stuff and may be of assistance!

</chrisd>
chrisd wouldn't curse
Image
Post Reply