Pages: [1]
|
|
|
Author
|
Topic: Configuring for OS X (Read 3654 times)
|
Bryce McKinlay
Guest
|
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
Posts: 10
I love YaBB 1G - SP1!
|
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
Posts: 3
I love YaBB 1G - SP1!
|
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
Posts: 3
I love YaBB 1G - SP1!
|
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]
|
|
|
|
|