1 (edited by kpj 2010-08-30 17:35:33)

Topic: [HELP] Compiling on a Mac

Hi,
I am using Snow Leopard, and tried to compile the Teeworlds-Source.
I followed this tutorial: http://www.teeworlds.com/?wiki=CompilingEverything

But when I enter the last command: ../bam/src/bam server_release
I just get an error.

This is the text:


My-MacBook-Pro:teeworlds-0.5.2-src Me$ ../bam-0.2.0/src/bam server_release
--- Auto Configuration ---
compiler: gcc
stackprotector: yes
zlib: (in system path)
sdl: using osx framework
saving configuration to 'config.bam'
---
bam: building 'server_release'
[ 1/52] #1 c src/osxlaunch/server.m
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi
src/osxlaunch/server.m:1:24: error: Cocoa/Cocoa.h: No such file or directory
src/osxlaunch/server.m:4: error: cannot find interface declaration for ‘NSTextView’, superclass of ‘ServerView’
src/osxlaunch/server.m:5: error: expected specifier-qualifier-list before ‘NSTask’
src/osxlaunch/server.m:6: error: expected specifier-qualifier-list before ‘NSFileHandle’
src/osxlaunch/server.m:8: error: expected ‘)’ before ‘NSTask’
src/osxlaunch/server.m:12: error: expected ‘)’ before ‘NSTask’
src/osxlaunch/server.m: In function ‘-[ServerView listenTo:]’:
src/osxlaunch/server.m:14: error: ‘NSPipe’ undeclared (first use in this function)
src/osxlaunch/server.m:14: error: (Each undeclared identifier is reported only once
src/osxlaunch/server.m:14: error: for each function it appears in.)
src/osxlaunch/server.m:14: error: ‘pipe’ undeclared (first use in this function)
src/osxlaunch/server.m:15: error: ‘task’ undeclared (first use in this function)
src/osxlaunch/server.m:18: error: ‘file’ undeclared (first use in this function)
src/osxlaunch/server.m:20: error: ‘NSNotificationCenter’ undeclared (first use in this function)
src/osxlaunch/server.m:20: error: ‘NSFileHandleReadCompletionNotification’ undeclared (first use in this function)
src/osxlaunch/server.m: At top level:
src/osxlaunch/server.m:25: error: expected ‘)’ before ‘NSNotification’
src/osxlaunch/server.m: In function ‘-[ServerView outputNotification:]’:
src/osxlaunch/server.m:27: error: ‘NSData’ undeclared (first use in this function)
src/osxlaunch/server.m:27: error: ‘data’ undeclared (first use in this function)
src/osxlaunch/server.m:27: warning: no ‘-userInfo’ method found
src/osxlaunch/server.m:27: warning: (Messages without a matching method signature
src/osxlaunch/server.m:27: warning: will be assumed to return ‘id’ and accept
src/osxlaunch/server.m:27: warning: ‘...’ as arguments.)
src/osxlaunch/server.m:27: error: ‘NSFileHandleNotificationDataItem’ undeclared (first use in this function)
src/osxlaunch/server.m:27: warning: no ‘-objectForKey:’ method found
src/osxlaunch/server.m:27: warning: no ‘-retain’ method found
src/osxlaunch/server.m:28: error: ‘NSString’ undeclared (first use in this function)
src/osxlaunch/server.m:28: error: ‘string’ undeclared (first use in this function)
src/osxlaunch/server.m:28: error: ‘NSASCIIStringEncoding’ undeclared (first use in this function)
src/osxlaunch/server.m:29: error: ‘NSAttributedString’ undeclared (first use in this function)
src/osxlaunch/server.m:29: error: ‘attrstr’ undeclared (first use in this function)
src/osxlaunch/server.m:31: warning: ‘ServerView’ may not respond to ‘-textStorage’
src/osxlaunch/server.m:31: warning: no ‘-appendAttributedString:’ method found
src/osxlaunch/server.m:32: warning: ‘ServerView’ may not respond to ‘-textStorage’
src/osxlaunch/server.m:32: warning: no ‘-length’ method found
src/osxlaunch/server.m:32: warning: initialization makes integer from pointer without a cast
src/osxlaunch/server.m:33: error: ‘NSRange’ undeclared (first use in this function)
src/osxlaunch/server.m:33: error: expected ‘;’ before ‘range’
src/osxlaunch/server.m:34: error: ‘range’ undeclared (first use in this function)
src/osxlaunch/server.m:34: warning: ‘ServerView’ may not respond to ‘-scrollRangeToVisible:’
src/osxlaunch/server.m:38: error: ‘file’ undeclared (first use in this function)
src/osxlaunch/server.m:32: warning: unused variable ‘length’
src/osxlaunch/server.m: At top level:
src/osxlaunch/server.m:41: error: expected ‘)’ before ‘NSNotification’
src/osxlaunch/server.m: In function ‘-[ServerView windowWillClose:]’:
src/osxlaunch/server.m:43: error: ‘task’ undeclared (first use in this function)
src/osxlaunch/server.m:44: error: ‘NSApp’ undeclared (first use in this function)
src/osxlaunch/server.m: In function ‘runServer’:
src/osxlaunch/server.m:50: error: ‘NSAutoreleasePool’ undeclared (first use in this function)
src/osxlaunch/server.m:50: error: ‘pool’ undeclared (first use in this function)
src/osxlaunch/server.m:51: error: ‘NSApp’ undeclared (first use in this function)
src/osxlaunch/server.m:51: error: ‘NSApplication’ undeclared (first use in this function)
src/osxlaunch/server.m:52: error: ‘NSBundle’ undeclared (first use in this function)
src/osxlaunch/server.m:52: error: ‘mainBundle’ undeclared (first use in this function)
src/osxlaunch/server.m:53: error: ‘NSTask’ undeclared (first use in this function)
src/osxlaunch/server.m:53: error: ‘task’ undeclared (first use in this function)
src/osxlaunch/server.m:58: error: ‘NSOpenPanel’ undeclared (first use in this function)
src/osxlaunch/server.m:58: error: ‘openDlg’ undeclared (first use in this function)
src/osxlaunch/server.m:59: error: ‘YES’ undeclared (first use in this function)
src/osxlaunch/server.m:61: error: ‘nil’ undeclared (first use in this function)
src/osxlaunch/server.m:61: error: ‘NSOKButton’ undeclared (first use in this function)
src/osxlaunch/server.m:64: error: ‘NSArray’ undeclared (first use in this function)
src/osxlaunch/server.m:64: error: ‘filenames’ undeclared (first use in this function)
src/osxlaunch/server.m:68: error: ‘NSString’ undeclared (first use in this function)
src/osxlaunch/server.m:68: error: ‘filename’ undeclared (first use in this function)
src/osxlaunch/server.m:69: error: ‘arguments’ undeclared (first use in this function)
src/osxlaunch/server.m:72: error: ‘NSWindow’ undeclared (first use in this function)
src/osxlaunch/server.m:72: error: ‘window’ undeclared (first use in this function)
src/osxlaunch/server.m:74: error: ‘NSRect’ undeclared (first use in this function)
src/osxlaunch/server.m:74: error: expected ‘;’ before ‘graphicsRect’
src/osxlaunch/server.m:76: error: ‘graphicsRect’ undeclared (first use in this function)
src/osxlaunch/server.m:76: warning: implicit declaration of function ‘NSMakeRect’
src/osxlaunch/server.m:80: error: ‘NSTitledWindowMask’ undeclared (first use in this function)
src/osxlaunch/server.m:81: error: ‘NSClosableWindowMask’ undeclared (first use in this function)
src/osxlaunch/server.m:82: error: ‘NSMiniaturizableWindowMask’ undeclared (first use in this function)
src/osxlaunch/server.m:83: error: ‘NSBackingStoreBuffered’ undeclared (first use in this function)
src/osxlaunch/server.m:84: error: ‘NO’ undeclared (first use in this function)
src/osxlaunch/server.m:88: warning: ‘ServerView’ may not respond to ‘+alloc’
src/osxlaunch/server.m:88: warning: no ‘-initWithFrame:’ method found
src/osxlaunch/server.m:88: warning: no ‘-autorelease’ method found
src/osxlaunch/server.m:89: warning: ‘ServerView’ may not respond to ‘-setEditable:’
src/osxlaunch/server.m:90: warning: ‘ServerView’ may not respond to ‘-setRulerVisible:’
bam: command returned error: 256
bam: error during build


Content of config.bam:


compiler.value = 'gcc'
stackprotector.value = 1
zlib.value = 1
zlib.include_path = nil
sdl.value = 1
sdl.use_sdlconfig = nil
sdl.use_win32sdl = nil
sdl.use_osxframework = 1

2

Re: [HELP] Compiling on a Mac

i guess your SDK version 10.6 right?

so u need to change 2 lines in default.bam

settings.cc.flags:Add("-mmacosx-version-min=10.4", "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
settings.link.flags:Add("-mmacosx-version-min=10.4", "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")

need to be changed to:

settings.cc.flags:Add("-mmacosx-version-min=10.4", "-isysroot /Developer/SDKs/MacOSX10.6.sdk")
settings.link.flags:Add("-mmacosx-version-min=10.4", "-isysroot /Developer/SDKs/MacOSX10.6.sdk")
uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

3

Re: [HELP] Compiling on a Mac

It's done this way since I wanted to provide support for older OSX versions and PPC, But it should probably be taken from a config file smile

Languages shapes the way we think, or don't.

4

Re: [HELP] Compiling on a Mac

the best would be when it would detect the version?!

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

5

Re: [HELP] Compiling on a Mac

Well, it could be done. But it's there to force compiled versions to support 10.4 so that it's not forgotten smile

Languages shapes the way we think, or don't.

6

Re: [HELP] Compiling on a Mac

Didn't want to open a new topic, so i post my question here.
Can someone compile the newest version ( https://github.com/teeworlds/teeworlds ) for me in Mac OS X (Universal Binary)?

Would be great, thanks!

7 (edited by Sushi Tee 2010-10-18 00:34:03)

Re: [HELP] Compiling on a Mac

hmm someone really should fix the buildbot xD

anyway... here the download: tw trunk for mac
it contains the client and the server including all datafiles... in short: download->extrac->doubleclick->be happy smile

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

8

Re: [HELP] Compiling on a Mac

Thank you!