Thought it was about time that I made a new announcement. And I have just the news....
One of the Scorched3D community (Darren Creutz) has ported Scorched3D version 35 onto the Mac (OS X) . This port is only available as a source patch as it is a source only port at the moment.
I am just wondering if anyone could give me a bit more direction on building an OSX version using the directions in the OSX patch. Been working on it off and on for a few weeks and keep thinking I am getting closer but am am no closer now than when I started.
I installed the binary SDL libs and the binary wxPython for OSX initially but the config in the scorched earth directory gave a ton of errors (pages of the same line plus some other stuff about .a4 files, etc.) I figured the binary versions weren't enough to build SE. So i compiled and installed the SDL source code from their main web site. I then attempted to build the python 2.4.2.4 (newest stuff) on OSX but kept getting a compile error in some header file. I then tried just pointing to the version of python (2.3) I found under the System/Library/Frameworks directory but no matter how many different types of environment paths I tried I still got the same old errors when running the SE3D autoconfig thing. I tried for a long time to do it manually without the auto thing but still no luck. I must be missing some obvious secret... I admit I am not an expert at building on OSX but I hoped I could figure it out reading the instructions with the patch. I am sure an expert could. Anyway, love the game and would like to run it on my Ti Powerbook but I am close to throwing in the towel.
Looks like I'm haveing the same build problems. I first thought it was a problem with aclocal/automake/autoconf versions, so I installed 1.5 from fink, but this resolved zero issues.
Here's a bunch of pertinent information:
aclocal --version
aclocal (GNU automake-1.5) 1.5
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Tom Tromey <tromey@cygnus.com>
automake --version
automake (GNU automake-1.5) 1.5
Written by Tom Tromey <tromey@cygnus.com>.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
autoconf --version
autoconf (GNU Autoconf) 2.57
Written by David J. MacKenzie and Akim Demaille.
Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
./autogen.sh
+ aclocal
aclocal: configure.ac: 18: macro `AM_PATH_SDL' not found in library
aclocal: configure.ac: 79: macro `AM_OPTIONS_WXCONFIG' not found in library
aclocal: configure.ac: 80: macro `AM_PATH_WXCONFIG' not found in library
+ automake --foreign
/sw/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
(repeats 65 times, total of 66 lines)
/sw/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL
/sw/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
(repeats 1190 times, total of 1191 lines)
/sw/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL
+ autoconf
configure.ac:7: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:18: error: possibly undefined macro: AM_PATH_SDL
configure.ac:79: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
configure.ac:80: error: possibly undefined macro: AM_PATH_WXCONFIG
+ ./configure
checking build system type... powerpc-apple-darwin7.0.0
checking host system type... powerpc-apple-darwin7.0.0
checking target system type... powerpc-apple-darwin7.0.0
./configure: line 1335: syntax error near unexpected token `scorched3d,'
./configure: line 1335: `AM_INIT_AUTOMAKE(scorched3d, 0.35.1)'
I have SDL installed via fink. sdl.m4 is in /sw/share/aclocal.
I did not have wxWindows installed, and am unable to do so: wxMac-2.4.2 fails to build with compiler errors on ./src/mac/dc.cpp using configure --with-opengl; wxWindows (ie wxAll) -2.4.2 fails to build with the same errors using configure --with-mac --with-opengl. I get the same results w/o opengl.
You don't need to configure wxWindows with opengl support, the opengl support comes from the SDL llibrary.
Do you need to use the wxMac-2.4.2 does the Mac have the gtk tool kit at all?
Other than that post the line from dc.cpp and I'll see if I can make sense of it.
Now, when I ./autogen.sh, i get:
...
checking for sdl-config... /sw/bin/sdl-config
checking for SDL - version >= 1.2.5... yes
configure: error: *** Can't find the SDL_mixer library. Try: http://www.libsdl.org/projects/SDL_mixer
So, seeing sdl-mixer in fink, i tried to install it there. On what appears to be the last build step, i get:
...
*** Warning: This library needs some functionality provided by -lSDLmain.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
gcc -dynamiclib -undefined dynamic_lookup -o .libs/libSDL_mixer-1.2.0.2.3.dylib load_aiff.lo load_voc.lo load_ogg.lo mixer.lo music.lo music_cmd.lo music_ogg.lo wavestream.lo effect_position.lo effect_stereoreverse.lo effects_internal.lo -all_load mikmod/.libs/libmikmod.al timidity/.libs/libtimidity.al native_midi/.libs/libnativemidi.al -L/sw/lib -lvorbisfile -lvorbis -logg -lSDL -lc -install_name /sw/lib/libSDL_mixer-1.2.0.dylib -compatibility_version 3 -current_version 3.3
ld: warning -dylib_install_name /sw/lib/libSDL_mixer-1.2.0.dylib not found in segment address table LD_SEG_ADDR_TABLE /sw/var/lib/fink/prebound/seg_addr_table
ld: warning prebinding disabled because dependent library: /sw/lib/libvorbisfile.3.dylib is not prebound
ld: native_midi/.libs/libnativemidi.al(native_midi_mac.lo) illegal reference to symbol: _CloseComponent defined in indirectly referenced dynamic library /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
ld: native_midi/.libs/libnativemidi.al(native_midi_mac.lo) illegal reference to symbol: _NAStuffToneDescription defined in indirectly referenced dynamic library /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libSDL_mixer.la] Error 1
make: *** [all-recursive] Error 1
### execution of make failed, exit code 2
Failed: compiling sdl-mixer-1.2.5-11 failed
I found a thread on this here, but am unable to get '-framework QuickTime' to show up on that last build line.
FYI, I am also getting errors about SMPEG during ./configure of sdl-mixer. (part of SDL from what I can tell):
...
checking for sdl-config... /sw/bin/sdl-config
checking for SDL - version >= 1.2.4... yes
checking for Ogg Vorbis headers and libraries... yes
checking for smpeg-config... /sw/bin/smpeg-config
checking for SMPEG - version >= 0.4.3... no
*** Could not run SMPEG test program, checking why...
*** The test program failed to compile or link. See the
file config.log for the
*** exact error that occured. This usually means SMPEG was
incorrectly installed
*** or that you have moved SMPEG since it was installed. In
the latter case, you
*** may want to edit the smpeg-config script:
/sw/bin/smpeg-config
updating cache ./config.cache
creating ./config.status
creating Makefile
...
I have reinstalled SMPEG using fink, but to no avail. It looks like it installs just fine, but these errors persist. It looks to me like a problem with sdl-mixer's configure script. Here's some pertinent information from sdl-mixer/config.log:
configure:2353: checking for smpeg-config
configure:2388: checking for SMPEG - version >= 0.4.3
configure:2479: gcc -o conftest -g -O2 -I/sw/include/SDL -D_THREAD_SAFE -DUSE_RWOPS -DCMD_MUSIC -DWAV_MUSIC -DMOD_MUSIC -I$(top_srcdir)/mikmod -DMID_MUSIC -DUSE_TIMIDITY_MIDI -I$(top_srcdir)/timidity -DUSE_NATIVE_MIDI -I$(top_srcdir)/native_midi -DOGG_MUSIC -I/sw/include -I/sw/include/smpeg -I/sw/include/SDL -D_THREAD_SAFE -I/sw/include/SDL -D_THREAD_SAFE -no-cpp-precomp -I/sw/include -L/sw/lib conftest.c -L/sw/lib -lsmpeg -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL 1>&5
configure:2461:14: missing terminating " character
configure: In function `SDL_main':
configure:2462: error: parse error before "minimum"
configure:2462: error: stray '\' in program
configure:2462:18: missing terminating " character
configure:2464:14: missing terminating " character
configure:2465: error: parse error before "correct"
configure:2465: error: stray '\' in program
configure:2465:22: missing terminating " character
configure:2467:14: missing terminating " character
configure:2468: error: parse error before "SMPEG_CONFIG"
configure:2468: error: stray '\' in program
configure:2468:15: missing terminating " character
configure:2469:14: missing terminating " character
configure:2470: error: stray '\' in program
configure:2470:11: missing terminating " character
I tried building the code that followed. All looked good to the compiler, but i could never get it to linke (ld said _main was an Undefined symbol, which I fould to be completely odd, as int main(...) was clearly in the source. I guess there's more code in temporary files created by the configure script that I don't have access to.
Perhaps I should be bugging the SDL-mixer project maintainers at this point....
Not sure about the error messages.
The only actual support scorched required from the mixer is for wave file support. You can turn off most of the other formats using commands to configure.
e.g. ./configure --enable-music-ogg=false --disable-smpegtest
Use configure --help for the list of all options.
I had to turn off quite a few to get it compile under Solaris.
I finally got fink to install sdl-mixer, so that's all set.
I am now how having problems with ./configure. I am not sure if this is a problem with SDL(-mixer) or with scorchh3d's comfigure process. To me it looks like an error in SDL_main.h Is there another app that uses SDL that I can test to make sure my SDL install is good?
I edited autogen.sh once again, adding --with-sdl-prefix=/sw to the end of ./configure $*. I also did 'setenv CPPFLAGS /sw/include' because the compile line from config.log had -I/sw/include/SDL, yet the source is include files with "<SDL/*>", which to my knowlege would cause the compiler to not find the headers (ie, there's one too many 'SDL's).
Here's the last few lines of ./configure's output:
checking for sdl-config... /sw/bin/sdl-config
checking for SDL - version >= 1.2.5... yes
configure: error: *** Can't find the SDL_mixer library. Try: http://www.libsdl.org/projects/SDL_mixer
Hmm, this looks like quite a nasty issue and I don't know why it is not affecting the other systems.
SDL expects the main to be defined
Code:
int main(int argc, char *argv[])
but the configure script generates the main in its test programs as
Code:
int main ()
SDL itself passes as it uses a custom compile macro which generates the proper main signature.
But SDL_mixer uses the standard AC_TRY_COMPILE macro and so fails. The question is why does this not fail on other systems. Perhaps the mac compiler is more picky.
Look for the lines
#include <SDL/SDL_mixer.h> and
#include <SDL/SDL_net.h>
in the configure script and change the main decleration after them to
int main(int argc, char *argv[])
I figured out the main()/main(int argc, char* argv[]) thing last night, that explains all the sdl-mixer/-net problems I was having. I think I tried every possible permutation of installing those things (fink, source, binary, etc.) before I looked in config.log. So, after making these chagnes, configure works.
Now I get A LOT of compile errors. Some stuff has been simple (like adding explicit casts from size_t to int in calls to NetBuffer::addToBuffer(), e.g. on TankShields.cpp:125 and TankWeapon.cpp:184). Also you should #incoude <sys/malloc.h> rather than <malloc.h>. I have a document with all the changes I have made so far.
Unfortunately, I have come across errors that I don't know how to fix because they appear to deal with bison code, which I have no education in. I've since been looking for the OS X source patch, but I can't find it anywhere.
FYI, I'm using gcc3.3 to build this stuff with. I find gcc to be a lot stricter and more compliant to the standards (c++ specifically) than Microsoft's compiler, which is a good thing. All code for gcc that I have written has worked under visual studio, except where there was a documented bug in visual studio.
Perhaps we should continue this discussion via email, as to not clog the forums, for it appears to be actuall errors in the source, and not any support-type issue. I'd be happy to put in the time and effort to support a Mac OS X port of this project.
Post subject: working OSX binaries - wxGTK patch for fink
Posted: Sat Dec 13, 2003 10:48 pm
I have successfully made some OSX bins that work great.
You need all the fink SDL stuff installed, and I've made a patch for wxGTK that allows it to play nice with darwin.
Everything works great, including network browsing and all the dialogs. There is one minor issue, that the backspace key does not work. This is the only bug I can find.
You will want to run it in fullscreen mode; somehow the screen doesn't seem to see the mouse left clicks when it's windowed.
I have a tar file with everything packaged up nicely... can I please have directions to upload it to this website?
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum