The International Simutrans Forum

Development => Technical Documentation => Topic started by: wernieman on May 07, 2009, 05:48:16 PM

Title: Compiling for MAC / Please Test
Post by: wernieman on May 07, 2009, 05:48:16 PM
Hey ...

I work on my cross-compiler for MAC and ... he work, but ....
===> LD  sim
/usr/i686-apple-darwin9/bin/i686-apple-darwin9-ld: Undefined symbols:
.objc_class_name_QTMovie
collect2: ld returned 1 exit status
make: *** [sim] Error 1
apple@kira ~/code $

Did somebody know this Problem and can help?

Ore can somebody, how has compile for a MAC, could help?

Werner
Title: Re: Compiling for MAC
Post by: prissi on May 07, 2009, 08:14:22 PM
Compile with SDL, forget about quicktime. Edit makefile to use no_midi/SDL_sound.
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 07, 2009, 08:47:14 PM
I only use SDL in the config.default

Wich do oyu mean I must edit in the makefile?

Edit:
You mea the part:
    # Core Audio (Quicktime) base sound system routines
    SOURCES += sound/core-audio_sound.mm
    SOURCES += music/core-audio_midi.mm


I testet now with
    SOURCES += music/no_midi.cc

Edit2:
Sch ...
===> LD  sim
/usr/i686-apple-darwin9/bin/i686-apple-darwin9-ld: Undefined symbols:
dr_load_sample(char const*)
dr_init_sound()
dr_play_sample(int, int)
collect2: ld returned 1 exit status
make: *** [sim] Error 1


Edit3:
Sorry .. to late for me today ;o)

I must use:
   SOURCES += sound/sdl_sound.cc
    SOURCES += music/no_midi.cc


Can somebody with a MAC test my Compilat on patches.simutrans-germany.com (http://patches.simutrans-germany.com)

But SDL for MAC must me install (see http://www.libsdl.org/ (http://www.libsdl.org/) or direkt download http://www.libsdl.org/release/SDL-1.2.13.dmg (http://www.libsdl.org/release/SDL-1.2.13.dmg)
Title: Re: Compiling for MAC / Please Test
Post by: MoTw on May 08, 2009, 12:51:01 PM
Hi!

I tried the test-version for Intel-Macs (from patches.simutrans-germany.com), and at the moment, it works. Which build is the version from?
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 08, 2009, 12:55:06 PM
I build it yesterday, so it is the code from yesterday (08.05.)

Wich MAC-Version do you have?

When it works O.K. (and get enough feedback) I check if I could put it in the nightly-automatisation
Title: Re: Compiling for MAC / Please Test
Post by: jamespetts on May 08, 2009, 01:02:54 PM
Wernieman,

would there be any possibility of doing the same for Simutrans-Experimental, too? I currently don't have a Mac build for it.
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 08, 2009, 01:14:02 PM
... could be ...

But I need much many timne to compile normal simutrans .... so let test the Version and the "normal" automatisation and THEN we could speak about other ...
Title: Re: Compiling for MAC / Please Test
Post by: jamespetts on May 08, 2009, 01:23:16 PM
That makes sense :-)
Title: Re: Compiling for MAC / Please Test
Post by: MoTw on May 08, 2009, 05:22:16 PM
Quote from: wernieman on May 08, 2009, 12:55:06 PM
1.) Wich MAC-Version do you have?

2.) When it works O.K. (and get enough feedback) I check if I could put it in the nightly-automatisation

1.) Mac OS X 10.5.6 (Leopard)
2.) This would be great!

Quote from: jamespettswould there be any possibility of doing the same for Simutrans-Experimental, too?

That would be even greater!  ;)
Title: Re: Compiling for MAC / Please Test
Post by: jtoomim on May 17, 2009, 10:40:27 PM
I confirm that this solution works on OS X 10.5.6 (Macbook Core 2 Duo 2 GHz) for simutrans-experimental commit 4377904e781558eee66f467466bbb070586911e4.  I support including these changes into the standard Makefile in both the regular and experimental simutrans trees.
Title: Re: Compiling for MAC / Please Test
Post by: jamespetts on May 17, 2009, 10:57:47 PM
Excellent - that makefile will be included in the next source upload of Simutrans-Experimental. Now, are there any volunteers for a Mac build of Simutrans-Experimental?
Title: Re: Compiling for MAC / Please Test
Post by: jtoomim on May 17, 2009, 11:35:11 PM
Btw, the exact Makefile I used (which jamespetts already has) is this one:

http://jtoomim.org/code/simutrans-fixed-makefile
Title: Re: Compiling for MAC / Please Test
Post by: MoTw on May 18, 2009, 08:25:26 AM
Well, I would be a volunteer. I already tried compiling it but I had problems with the Makefile.
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 18, 2009, 08:34:08 AM
Wich problem do you get?

I use the "Normal" Makefile with a "litte Patch" in the sound part
Title: Re: Compiling for MAC / Please Test
Post by: jamespetts on May 18, 2009, 10:18:39 AM
MoTw,

can you compile using Jtoomim's makefile?
Title: Re: Compiling for MAC / Please Test
Post by: prissi on May 18, 2009, 11:04:07 AM
The standard Makefile did work using Xcode's gcc. What is exactly the problem? THe quicktime libraries should be available on a MAC.

(Of course crosscompiling is somethingelse.)
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 18, 2009, 11:31:26 AM
For my crosscompiling I do a simple Trick:
I do not patch the Makefile (o.k. I do it for the sound, but I hope that we can use a flag for this so I do not need it). The changes I need for the Directorys I do in the sdl.config-script.

Title: Re: Compiling for MAC / Please Test
Post by: MoTw on May 18, 2009, 12:16:08 PM
Well, I don't really know how to handle the makefile - do I have to change things in it or do I have to write the right backend, the Colour_depths and the OS-type as an Option?
Title: Re: Compiling for MAC / Please Test
Post by: wernieman on May 18, 2009, 03:14:17 PM
copy config.template to config.default

read remarks in the config.default

edit the config.default

make
Title: Re: Compiling for MAC / Please Test
Post by: MoTw on May 18, 2009, 05:00:51 PM
Quote from: wernieman on May 18, 2009, 03:14:17 PM
copy config.template to config.default

read remarks in the config.default

edit the config.default

make

Do I have to delete the options which I won't use or what? That's the point I don't get.
Title: Re: Compiling for MAC / Please Test
Post by: Dwachs on May 18, 2009, 05:46:48 PM
lines starting with # will ignored, so in unwanted line write # at the beginning. Maybe you have to remove a # somewhere to activate that line.