I downloaded the 0.92.6-2 release and ran into issues
building on Mac OS X 10.3. I was able to hack n' patch my
way through to a functioning system.
Attached are the changes I made, I'll leave it into you guy's
more capable hands to figure out how to cleanly and more
appropriately merge it in with all your supported
architectures and previous versions of OS X that are
different. Below are unified format diffs for your
entertainment.
First problem was with OpenThreads, typedef for timespec
conflicted with the system (so I used the define in
pthread.h):
--- PThreadCondition.c++~ Thu Oct 2 10:56:31 2003
+++ PThreadCondition.c++ Mon Dec 22 15:13:48 2003
@@ -27,6 +27,8 @@
# include <sys/time.h>
#endif
+#include <pthread.h>
#include <assert.h>
#include <OpenThreads/Condition>
#include "PThreadConditionPrivateData.h"
@@ -34,8 +36,8 @@
using namespace OpenThreads;
-#ifdef __APPLE__
+#if 0
typedef ::timespec OpenThreads::timespec;
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
<<< END
Next I ran into a problem with Producer, and this one almost
made me give up. The main issue I ran into was that you
insist on using glXGetProcAddressARB, which is not on 10.3.
I hunted headers and greped libraries for symbols to no
"productive" result. Then I found the problem. Fortunately,
that function is now a "standard extension" and I was able to
simply rename to glXGetProcAddrss and all was happy.
--- src/RenderSurface_X11.cpp~ Fri Aug 29 21:44:16 2003
+++ src/RenderSurface_X11.cpp Mon Dec 22 15:42:
22 2003
@@ -12,13 +12,19 @@
#include <X11/Xlib.h>
#include <X11/Xmd.h>
+extern void (*glXGetProcAddress(const GLubyte
*procName))( void );
+#define GLX_GLXEXT_LEGACY
+
+#define GL_GLXEXT_PROTOTYPES 1
+#include <GL/glx.h>
+#include <GL/glxext.h>
using namespace Producer;
// HP, SGI and SUN don't implement
glXGetProcAddressARB...
#if defined (__sgi) || defined (sun) || defined( __hpux )
#include <dlfcn.h>
-void (*glXGetProcAddressARB(const GLubyte
*procName))(void)
+void (*glXGetProcAddress(const GLubyte
*procName))(void)
{
static void *handle = dlopen( (const char *)0L,
RTLD_LAZY );
return (void (*)(void))dlsym(handle,(const char
*)procName);
@@ -331,11 +337,11 @@
{
unsigned int frame = 0;
__glxGetRefreshRateSGI = reinterpret_cast<int
(*)(unsigned int *)>
- (glXGetProcAddressARB((GLubyte
*)"glXGetRefreshRateSGI" ));
+ (glXGetProcAddress((GLubyte
*)"glXGetRefreshRateSGI" ));
__glxWaitVideoSyncSGI =
reinterpret_cast<int(*)(int,int,unsigned int *)>
- (glXGetProcAddressARB((GLubyte
*)"glXWaitVideoSyncSGI" ));
+ (glXGetProcAddress((GLubyte
*)"glXWaitVideoSyncSGI" ));
__glxGetVideoSyncSGI =
reinterpret_cast<int(*)(unsigned int *)>
- (glXGetProcAddressARB((GLubyte *
)"glXGetVideoSyncSGI"));
+ (glXGetProcAddress((GLubyte *
)"glXGetVideoSyncSGI"));
if( __glxGetRefreshRateSGI != NULL )
__glxGetRefreshRateSGI(&_refreshRate);
<<< END
Almost positive that none of the header garbage I was trying
is necessary or did anything useful, but I don't have time to
go back and retry without it. This, of course, is not a good
permanent solution without dropping support for older
platforms, but I suspect you can #ifdef your way around that
issue easily enough.
Finally, I'm happy to say that the actual build of
OpenSceneGraph went much much better. I did run into a
problem when it failed to find libxml (though I did have
libxml2 installed) headers. I had to force-feed a little to get
it to find those headers (had to manually create a symlink
from /sw/include/libxml to /sw/include/gnome-xml/libxml
then everything worked.
Cheers!