Page 1 of 1

Mac OS X GLUT Library

Posted: Sun Nov 04, 2007 4:41 pm
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.

Posted: Wed Nov 07, 2007 3:18 am
by ace123
Unfortunately I have no idea why that might be happening.
I see an extra "-L" there which is causing the error....

Posted: Wed Nov 07, 2007 9:50 pm
by bgaskey
what does a -L do and can I kill it?

Posted: Fri Nov 09, 2007 5:34 am
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.

Posted: Sun Nov 11, 2007 12:05 am
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.

Posted: Sun Nov 11, 2007 12:56 am
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: 

X11 vs OSX Frameowkr

Posted: Mon Dec 24, 2007 10:28 am
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.

Posted: Mon Dec 24, 2007 2:28 pm
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

Posted: Mon Dec 24, 2007 3:18 pm
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 :)