Mac OS X GLUT Library

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Mac OS X GLUT Library

Post by bgaskey »

Hi all. I have returned to give compiling on my Mac another try. I got it once before but I think i can get it to work better. Yesterday, I compiled it on my linux box in about five minutes, so i see why compiling on mac is considered difficult.

Getting down to business, I'm on an iMac G5 running OSX 10.4.10 with xCode 2 installed from the operating system DVD. The Configure fails because it says GLUT is too old a version. This is the output of stdout:

Code: Select all

checking for XmuGetHostname in -lXmu... no
checking for XListInputDevices in -lXi... no
checking for glut32 library... -F/Developer/SDKs/MacOSX10.3.0.sdk/System/Library/Frameworks -framework OpenGL -framework GLUT -framework CoreAudio -lobjc -L -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/GLUT.framework/ -framework GLUT
no
checking for glut library... -F/Developer/SDKs/MacOSX10.3.0.sdk/System/Library/Frameworks -framework OpenGL -framework GLUT -framework CoreAudio -lobjc -L -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/GLUT.framework/ -framework GLUT
no
configure: WARNING: Glut might fail because of missing libXmu-dev and/or headers!
configure: WARNING: Glut might fail because of missing libXi-dev and/or headers!
configure: error: GLUT library not found or too old version. 3.7 (beta) or later required.
Ill attach my config.log too. Hope someone can shed some light.
You do not have the required permissions to view the files attached to this post.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Unfortunately I have no idea why that might be happening.
I see an extra "-L" there which is causing the error....
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

what does a -L do and can I kill it?
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

-L is good if it has a path afterwards, but for some reason it has a blank "-L" option so that's the problem.

I;m not sure what's causing that... I'm not much of a MAC expert.

One thing to try is to take out all of the "--with-..." arguments to configure.
If you need to specify a path to a library, do that in LDFLAGS, like this:

export LDFLAGS="-L /path/to/library1 -L /path/to/library2"
./configure

and then do not pass any arguments to ./configure.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

ace: thanks for your help, unfotunately, whatever i pass to LDFLAGS, the configure fails much earlier with "gcc cannot create executable files" :(
I think it cannot find gcc correctly, but i dont know how to correct this.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

i got it to configure. I do not know why it suddenly decided to work

Code: Select all

./configure --with-gl-libs=/usr/X11R6/lib --with-gl-inc=/usr/X11R6/include/GL --with-python-libs=/sw/lib/python2.3/config --with-expat-libs=/usr/X11R6/lib --with-expat-inc=/usr/X11R6/include --with-png-libs=/sw/lib --with-png-inc=/sw/include/libpng12 --enable-macosx-bundle --with-jpeg-libs=/sw/lib --with-jpeg-inc=/sw/include --with-vorbis-libs=/sw/libs --with-vorbis-inc=/sw/include
Now it gets back to the error in this thread :http://vegastrike.sourceforge.net/forum ... php?t=9336

Also, vssetup builds but fails with

Code: Select all

(.:9608): Gtk-WARNING **: cannot open display: 
spatialguru
Insys Pilot
Insys Pilot
Posts: 2
Joined: Thu Jan 01, 1970 1:00 am

X11 vs OSX Frameowkr

Post by spatialguru »

bgaskey wrote:i got it to configure. I do not know why it suddenly decided to work

Code: Select all

./configure --with-gl-libs=/usr/X11R6/lib --with-gl-inc=/usr/X11R6/include/GL 
Isn't the above actually a bad idea, since it references the X11 libraries instead of the OS X Framework files?

Thanks for sharing this.. it got me past the configure stage, though I guess I will get stuck at your next problem too, since it looks X11 related. Sounds like you'll need to run it in an X11 window to get it to complete.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

This thread includes the fix for my next error if indeed you do get it. basically, you need to --with-python-inc too
http://vegastrike.sourceforge.net/forum ... hp?t=10035
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

Here is a config that references the osx frameworks. it seems to work better once compiled.

Code: Select all

./configure --with-gl-libs=/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries --with-gl-inc=/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers --with-python-libs=/sw/lib/python2.4/config --with-expat-libs=/usr/X11R6/lib --with-expat-inc=/usr/X11R6/include --with-png-libs=/sw/lib --with-png-inc=/sw/include/libpng12 --with-jpeg-libs=/sw/lib --with-jpeg-inc=/sw/include --with-vorbis-libs=/sw/lib --with-vorbis-inc=/sw/include --with-python-inc=/sw/include/python2.4
On my box it configures and runs much faster than the one with X11 and has shader support
Good luck, post if u have any other issues and i'll do my best to help out :)
Post Reply