Hi all,

has anybody tried to install SDL on Mac OS X lately? I'm running into a lot of problems...

I have SDL version 1.2.7 installed as well as the newest version of Module::Build (I upgraded that as soon as I encountered problems).

Here's what is going on:

$ perl Build.PL

Checking whether your kit is complete...
Looks good
Can't use an undefined value as an ARRAY reference at make/lib/SDL/Build.pm line 154.


Turns out that in set_flags in that file, $links looks like this:

$links = {
'SDL' => {
'paths' => []
},
'SFont' => {
'paths' => []
},
'OpenGL' => {
'paths' => [
'-L/System/Library/Frameworks/OpenGL.framework/Libraries'
],
'libs' => [
'-lGLU',
'-lGL'
]
}
};


So I added the following code before the while loop:

        $links->{SDL}{libs} = [];
        $links->{SFont}{libs} = [];
        $defines->{SDL} = [];
        $defines->{SFont} = [];

Now, Build.PL runs fine. Of course, this is just a rather dirty workaround…

Next step:

$ ./Build
(...)
cc -I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE -I/opt/local/include/SDL -D_THREAD_SAFE -DUSE_THREADS -fPIC -c -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -o src/SDL/SFont.o src/SDL/SFont.c
src/SDL/SFont.xs:18:17: SDL.h: No such file or directory
In file included from src/SDL/SFont.xs:27:
src/SFont.h:11:17: SDL.h: No such file or directory
In file included from src/SDL/SFont.xs:27:
src/SFont.h:21: error: parse error before "SDL_Surface"
(...)


Just for fun, I run cc directly (copy+paste):

$ cc -I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE -I/opt/local/include/SDL -D_THREAD_SAFE -DUSE_THREADS -fPIC -c -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -o src/SDL/SFont.o src/SDL/SFont.c

No problems here.

Next try:

$ ./Build
ExtUtils::Mkbootstrap::Mkbootstrap('src/SDL/SFont')
env LD_RUN_PATH=/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib -o blib/arch/auto/SDL/SFont/SFont.bundle src/SDL/SFont.o -L/opt/local/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL
ld: warning -L: directory name (/opt/local/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL) does not exist
(...)


Huh? Probably some quoting issue makes ld think that everything after the last "-L" is one directory name. Again, copy+paste+return, thus running ld by hand, works. Same goes on for a few times, until Build does nothing anymore. Build test then fails because of undefined library files.

What's going on here?

Thanks for your help,
   Christian

--
[EMAIL PROTECTED] - http://www.web42.com/crenz/ - http://www.web42.com/



Reply via email to