The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
November 13, 2024, 03:16:22 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Configuring for OS X
« previous next »
Pages: [1] Print
Author Topic: Configuring for OS X  (Read 3630 times)
Bryce McKinlay
Guest


Email
Configuring for OS X
« on: December 10, 2002, 03:54:38 pm »

I have downloaded the UQM source code from CVS and thought I'd have a go at building it on OS X.

Unfortunately I have found myself frustrated by the rather non-standard configuration/build procedure. build.sh complains about all the dependent libraries being missing (they are all there under /usr/include). After defining things like LIB_SDL_PRESENT in config_functions it doesn't complain any more, but not just exits before displaying any menu or building anything. Example:

$ ./build.sh uqm
build/build.config: k#!/bin/sh: No such file or directory
Sed stream editor found.
tr found.
Make found.
GNU C compiler found.
Big-endian machine.
Vorbisfile found.
Symbol 'strupr' not found.
Symbol 'stricmp' not found.
Header 'getopt.h' found.

Is anybody working with uqm on mac os X? If so can you give me some hints as to how to get the build scripts to work?

Additionally, has anyone considered switching the project to use autoconf? While i'm sure the current build scripts work great (on linux) it is frustrating for developers porting to other platforms to deal with the unfamiliar system. I do not think the majority of arguments against autoconf given in build.doc are valid:

- autoconf _does_ support source files in subdirectories (older versions of _automake_ however did not, requiring recursive makes, but that limitation is gone in recent releases)

- separate src/build directories and multiple object directories _are_ supported (just do mkdir build; cd build; ../configure)

- autoconf is not and does not require using libtool, so libtool's slowness is irrelevant.

thanks for any help

Bryce.
Logged
quux
Zebranky food
*
Offline Offline

Posts: 10


I love YaBB 1G - SP1!


View Profile
Re: Configuring for OS X
« Reply #1 on: December 10, 2002, 09:22:54 pm »

The version in CVS builds and runs on OSX with only a minor change to the build scripts. I needed to change build/config.proginfo to tell it where to find vorbisfile.

They were using autoconf, but rolled their own build system because they felt autoconf was too slow and inflexible. Look at build/build.docs.
Logged
Bryce McKinlay
Zebranky food
*
Offline Offline

Posts: 3


I love YaBB 1G - SP1!


View Profile
Re: Configuring for OS X
« Reply #2 on: December 10, 2002, 11:51:10 pm »

Thanks Quux, I have read the explanation in build.doc but as mentioned above I disagree with the arguments against autoconf. I can't imagine how someone could describe autoconf as inflexible!

But since you report sucess, I will persevere.  

I am running on Mac OS X 10.2.2 with the dev tools installed. SDL, SDL_image, libogg and libvorbis are built from source and installed in their default locations under /usr/local.

Here is what happens when I run the build script with a completely clean CVS tree from today:

$ ./build.sh uqm
Sed stream editor found.
tr found.
Make found.
GNU C compiler found.
Big-endian machine.
Simple DirectMedia Layer not found.
$

Obviously SDL is there:

[bryce@kiteless sc2]$ sdl-config --cflags
-I/usr/local/include/SDL -D_THREAD_SAFE

[bryce@kiteless sc2]$ ls /usr/local/lib/*SDL*
/usr/local/lib/libSDL-1.2.0.0.5.dylib
/usr/local/lib/libSDL-1.2.0.dylib
/usr/local/lib/libSDL.a
/usr/local/lib/libSDL.dylib
/usr/local/lib/libSDL.la
/usr/local/lib/libSDL_mixer-1.2.0.2.2.dylib
/usr/local/lib/libSDL_mixer-1.2.0.dylib
/usr/local/lib/libSDLmain.a
[bryce@kiteless sc2]$ ls /usr/local/include/*SDL*
SDL.h            SDL_endian.h    SDL_keysym.h  SDL_quit.h    ....
[bryce@kiteless sc2]$


Is there anything obvious I'm doing wrong? Otherwise I guess I need some hints as to how to debug the build scripts.

Thanks for any help

Bryce.

Logged
Bryce McKinlay
Zebranky food
*
Offline Offline

Posts: 3


I love YaBB 1G - SP1!


View Profile
Re: Configuring for OS X
« Reply #3 on: December 13, 2002, 07:20:50 am »

OK, I've discovered why build.sh isn't working on Mac OS X.

build.sh checks for working libraries by compiling a "null" program:

int main(int argc, char* argv[]) {
     return 0;
}

and linking it against each library. In the case of SDL, this will not work on Mac OS X because the SDL library defines its own "main" function, and we get an error about duplicated symbols. The solution would be to #include <SDL.h> in the test program, but since the build script uses the same test program for all library tests, it isn't easy to change it just for the SDL checks, and it will cause problems if SDL.h is included without a corresponding -I flag for SDL on the compile command line.

I'm very curious to hear how other OS X users have managed to get around this. Please help!
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!