Arthur,

I have built FlightGear on Mac OS X. After a LOT of trial and error
building SimGear and FlightGear without the X11 SDK.


Great!

It seems all that needed to be done was change GL/gl.h and GL/glu.h in
all the source files which contained those includes to OpenGL/*.


I was really concerned why I could build without these Gl errors and you couldn't on mac os x so I did some research


I have open GL headers in

/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers

and

/System/Library/Frameworks/AGL.framework/Versions/A/Headers

If I do a 'grep -r "GL" * from ./src/flightgear/src, I get (among other things)

FDM/.deps/MagicCarpet.Po: /FlightGear/fgdev9.6/include/GL/gl.h \
FDM/.deps/MagicCarpet.Po: /System/Library/Frameworks/OpenGL.framework/Headers/gl.h \
FDM/.deps/MagicCarpet.Po:/FlightGear/fgdev9.6/include/GL/gl.h:
FDM/.deps/MagicCarpet.Po:/System/Library/Frameworks/OpenGL.framework/ Headers/gl.h:
FDM/.deps/UFO.Po: /FlightGear/fgdev9.6/include/GL/gl.h \
FDM/.deps/UFO.Po: /System/Library/Frameworks/OpenGL.framework/Headers/gl.h \
FDM/.deps/UFO.Po:/FlightGear/fgdev9.6/include/GL/gl.h:
FDM/.deps/UFO.Po:/System/Library/Frameworks/OpenGL.framework/Headers/ gl.h:
FDM/Balloon/.deps/BalloonSim.Po: /FlightGear/fgdev9.6/include/GL/gl.h \
FDM/Balloon/.deps/BalloonSim.Po: /System/Library/Frameworks/OpenGL.framework/Headers/gl.h \
FDM/Balloon/.deps/BalloonSim.Po:/FlightGear/fgdev9.6/include/GL/gl.h:
FDM/Balloon/.deps/BalloonSim.Po:/System/Library/Frameworks/ OpenGL.framework/Headers/gl.h:


Ouch! It turns out I have a GL directory in fgdev9.6/include that contains:

/FlightGear/fgdev9.6/include] ima% ls -l Gl
total 32
-rwxrwxr-x  1 ima  staff  232 14 Dec  2002 gl.h
-rwxrwxr-x  1 ima  staff   26 14 Dec  2002 glext.h
-rwxrwxr-x  1 ima  staff   24 14 Dec  2002 glu.h
-rwxrwxr-x  1 ima  staff   23 14 Dec  2002 glut.h

Yes, they're nearly two years old! Maybe that's why I could build and you couldn't? 8-(

The real headers are:

[Four-Computer:frameworks/opengl.framework/headers] ima% ls -l gl*
-rw-r--r--  1 root  wheel  124202 12 Sep  2003 gl.h
-rw-r--r--  1 root  wheel  200923 12 Sep  2003 glext.h
-rw-r--r--  1 root  wheel     294 12 Sep  2003 gliContext.h
-rw-r--r--  1 root  wheel   47720 12 Sep  2003 gliDispatch.h
-rw-r--r--  1 root  wheel   16259 12 Sep  2003 glu.h
-rw-r--r--  1 root  wheel    2597 12 Sep  2003 gluContext.h
-rw-r--r--  1 root  wheel    2242 12 Sep  2003 gluMacro.h

The AGL headers are:

ls -l /System/Library/Frameworks/AGL.framework/Versions/A/Headers
total 248
-rw-r--r-- 1 root wheel 16716 13 Sep 2003 agl.h
-rw-r--r-- 1 root wheel 889 13 Sep 2003 aglContext.h
-rw-r--r-- 1 root wheel 71046 13 Sep 2003 aglMacro.h
-rw-r--r-- 1 root wheel 1244 13 Sep 2003 aglRenderers.h
lrwxr-xr-x 1 root wheel 56 25 Jan 2004 gl.h -> /System/Library/Frameworks/OpenGL.framework/Headers/gl.h
lrwxr-xr-x 1 root wheel 64 25 Jan 2004 gliContext.h -> /System/Library/Frameworks/OpenGL.framework/Headers/gliContext.h
lrwxr-xr-x 1 root wheel 65 25 Jan 2004 gliDispatch.h -> /System/Library/Frameworks/OpenGL.framework/Headers/gliDispatch.h
-rw-r--r-- 1 root wheel 4327 13 Sep 2003 glm.h
lrwxr-xr-x 1 root wheel 57 25 Jan 2004 glu.h -> /System/Library/Frameworks/OpenGL.framework/Headers/glu.h


When I remove this GL directory in fgdev9.6/include and rebuild, I get:

Making all in tests
source='est-epsilon.c' object='est-epsilon.o' libtool=no \
depfile='.deps/est-epsilon.Po' tmpdepfile='.deps/est-epsilon.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I../src/Include -I/Users/ima/Desktop/FlightGear/fgdev9.6/include -g -O2 -D_REENTRANT -c `test -f 'est-epsilon.c' || echo './'`est-epsilon.c
est-epsilon.c:11:19: GL/glut.h: No such file or directory
est-epsilon.c: In function `main':
est-epsilon.c:15: error: `GLfloat' undeclared (first use in this function)
est-epsilon.c:15: error: (Each undeclared identifier is reported only once
est-epsilon.c:15: error: for each function it appears in.)
est-epsilon.c:15: error: parse error before "a"
est-epsilon.c:17: error: `a' undeclared (first use in this function)
est-epsilon.c:22: error: `t' undeclared (first use in this function)
make[1]: *** [est-epsilon.o] Error 1
make: *** [all-recursive] Error 1


Sound familiar?

So yes, it sounds like your patch is something needed for mac os x, either that or symlinks in ./include/GL to point to the real headers 8-) Just kidding, the patch is a MUCH better idea. Chalk it up to apple having non-standard locations for the opengl header files.

I don't know where I came up with the idea of creating a GL directory, but there you go, it's there so go figure... I guess I 'll be getting rid of it as soon as your patch is ready.

What needs to be done is to make a patch that include GL/* on other
systems but OpenGL/* on Mac OS X. I believe this would make compiling
SimGear and FlightGear on Mac OS X pain less.
I had to make, make clean, make again in order to find all the
problems.  A patch is coming!

So, next I'll be making a Mac OS X package of FlightGear, and make a
double-clickable application for it.

Sounds cool! Like I think I mentioned, I believe someone else on the list did this at one time. I don't remember if there were any gotchas to look out for that he (Jonathan?) found while building this clickable app for mac os x.


Sorry for the confusion. Thanks for catching this error for mac os x!

Ima


_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to