This topic contains 88 replies, has 0 voices, and was last updated by  dipalina 7 years, 10 months ago.

  • Author
    Posts
  • #2205

    imported_gcamp
    Participant

    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) :D. This port is only available as a source patch as it is a source only port at the moment.

    So all you Mac fans you can download now, and join in the fun:-
    http://sourceforge.net/project/showfiles.php?group_id=85144

    #9585

    Anonymous
    Participant

    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.

    Any words of advise for a novice? Thanks!!

    Gary Glover, Utah, USA

    #9586

    gglover
    Participant

    Sorry, forgot to register before my OSX post question…
    -Gary

    #9587

    GoochRules
    Participant

    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

    automake –version
    automake (GNU automake-1.5) 1.5
    Written by Tom Tromey .

    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)’

    #9588

    imported_gcamp
    Participant

    These errors are because the build system cannot find and include the configs for the wx windows and sdl libraries. Do you have them installed?

    I think there are several wxwindows libraries, it is the development one you need.
    The one with the /usr/share/aclocal/wxwin.m4 file in it.

    #9589

    GoochRules
    Participant

    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.

    here’s the errors:
    c++ -c -I./lib/wx/include/mac-2.4 -I../include -I../src/png -I../src/jpeg -I../src/tiff -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -no-cpp-precomp -fpascal-strings -I../src/mac/morefile -I/Developer/Headers/FlatCarbon -D__WXMAC__ -DWXMAKINGDLL -O2 -MMD -fno-common -Wall -dynamic -fPIC -o dc.o ../src/mac/dc.cpp
    ../src/mac/dc.cpp:1259: error: parse error before `< <' token
    ../src/mac/dc.cpp:1263: error: parse error before `short’
    make: *** [dc.o] Error 1

    what version of wxWindows works?

    #9590

    imported_gcamp
    Participant

    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.

    #9591

    GoochRules
    Participant

    wxMac is supposedly the ‘Mac OS’ distrubution of wxWindows. The errors from dc.cpp were fixed in cvs, so i co’ed that module, and it built.

    Now my problem is with SDL-mixer.

    I had edit autogen.sh a bit for it to see my .a4 files. I changed

    aclocal

    to

    aclocal -I /sw/share/aclocal -I /usr/local/share/aclocal

    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….

    #9592

    imported_gcamp
    Participant

    Wo,

    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.

    #9593

    GoochRules
    Participant

    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 ““, 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

    Here’s the relevant lines from config.log:

    configure:3268: checking for sdl-config
    configure:3299: result: /sw/bin/sdl-config
    configure:3307: checking for SDL – version >= 1.2.5
    configure:3398: gcc -o conftest -g -O2 -I/sw/include/SDL -D_THREAD_SAFE -I/sw/include conftest.c -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL >&5
    configure:3401: $? = 0
    configure:3403: ./conftest
    configure:3406: $? = 0
    configure:3424: result: yes
    configure:3540: gcc -c -g -O2 -I/sw/include/SDL -D_THREAD_SAFE -I/sw/include conftest.c >&5
    configure: In function `SDL_main’:
    configure:3538: error: number of arguments doesn’t match prototype
    /sw/include/SDL/SDL_main.h:56: error: prototype declaration
    configure:3543: $? = 1
    configure: failed program was:
    | #line 3519 “configure”
    | /* confdefs.h. */
    |
    | #define PACKAGE_NAME “”
    | #define PACKAGE_TARNAME “”
    | #define PACKAGE_VERSION “”
    | #define PACKAGE_STRING “”
    | #define PACKAGE_BUGREPORT “”
    | #define PACKAGE “scorched3d”
    | #define VERSION “0.35.1”
    | #ifdef __cplusplus
    | #include
    | #endif
    | /* end confdefs.h. */
    |
    | #include
    | #include

    |
    | int
    | main ()
    | {
    |
    |
    | ;
    | return 0;
    | }
    configure:3562: error: *** Can’t find the SDL_mixer library. Try: http://www.libsdl.org/projects/SDL_mixer

    #9594

    imported_gcamp
    Participant

    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

    int main(int argc, char *argv[])

    but the configure script generates the main in its test programs as

    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 and
    #include

    in the configure script and change the main decleration after them to
    int main(int argc, char *argv[])

    Then run ./configure and see if that works.

    #9595

    GoochRules
    Participant

    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 rather than . 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.

    #9596

    imported_gcamp
    Participant

    I think you can include stdlib rather than malloc.h

    I use gcc on solaris and linux and it seems ok. Have you got strict compilation turned on?

    Ok, the best e-mail to use is glcamp@ntlworld.com

    #9597

    Anonymous
    Participant

    I love the look of this game. Any chance of a binary release?

    Would be appreicated.

    Wonea

    #9598

    Anonymous
    Participant

    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?

    Thank you,

    C. Thomas

Viewing 15 posts - 1 through 15 (of 90 total)

The forum ‘news’ is closed to new topics and replies.