Here's what I had to do to compile CVS on OS X Tiger. Install dependencies. I got plib from macports, simgear from CVS, and OSG 2.0 binaries from the OSG website.
Tiger includes OpenAL 1.1, but not ALUT, so there is no alut.h on the system. According to Apple[1] you should install freealut to get alut.h, but Apple in their infinite wisdom decided to include the ALUT symbols in their OpenAL framework, so if you try to install freealut you get symbol conflicts. See [2] for the gory details. The simplest solution seems to be to grab alut.h from the OpenAL 1.0 distribution and put it in /System/Library/Frameworks/OpenAL.framework/Headers As mentioned in a previous email, there is a compilation problem due to glut.h undefining APIENTRY. I hope that we can find a workaround for that in FlightGear source, but in the meantime the easiest fix is to hack your plib/pu.h to define APIENTRY after including glut.h (or hack glut.h to not undefine it). The following patch is required: --- a/src/Instrumentation/render_area_2d.cxx +++ b/src/Instrumentation/render_area_2d.cxx @@ -30,7 +30,8 @@ # include <windows.h> #endif -#include <GL/gl.h> +#include <simgear/compiler.h> +#include SG_GL_H #include "render_area_2d.hxx" Since OSG binaries are frameworks, the linkage needs to be changed to use -framework instead of -l. If you build OSG by hand, -l is correct, however you have to set OSG_LIBRARY_PATH=/usr/local/lib/osgPlugins-2.0.0 because the make install target and the source code aren't on the same page as to where plugins should be installed. I have reported that to the OSG list and hopefully in future releases it will be fixed. In any case, users will rather use the binaries (frameworks) and developers can build frameworks from SVN, so -framework seems to me to be the most correct. Whether using -l or -framework for osg libraries, I had to link in osgGA and osgText explicitly or it would not link. Are we working towards total independence from plib? If so the APIENTRY problem will disappear on its own. The -framework issue I am happy to provide a patch for, as soon as I can figure out the right way to hack the autoconf/automake stuff to do so. Currently src/Main/Makefile.am includes the -l phrases explicitly, that will probably need to be changed to something more generic, probably in configure.ac. Does anyone know the right place for this? I'm inclined to take the OpenAL test in configure.ac as a basis. Thanks References 1. http://developer.apple.com/qa/qa2006/qa1504.html 2. http://opensource.creative.com/pipermail/openal/2006-August/009761.html -- Hans Fugal Fugal Computing ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel