I was able to get the current CVS version of OpenSG working on Mac OS X Tiger today, but I had to make some changes to account for changes in the OS. The changes are as follows:
* GCC 4.0 in OS X 10.4 does not have the option -fexport-coalesced, so
I had to modify CommonConf/common.powerpc-apple-darwin-g++.in
accordingly. I suppose that there should probably be a new file
CommonConf/common.powerpc-apple-darwin-g++4.in created to avoid
breaking OpenSG on OS X 10.3.
* Tiger finally includes dlopen(3), and the dlcompat-based code in
Source/Base/OSHelpers/darwin does not compile with GCC 4.0. I
removed the reference to that directory in CommonConf/common.libs.in.
I do not know what the correct fix would be to allow proper use on
OS X 10.3.
* GCC 4.0 complains about trying to use int* when a socklen_t* is
expected, so I modified Source/Base/Network/Socket/OSGSocket.h to
account for that. The change is attached as a patch.
I have only tested the optimized build of OpenSG on Tiger at this point, but
so far, it is working wonderfully.
-Patrick
P.S. -Ddarwin is still missing from the output of 'osg-config --cflags'.
This compiler option is needed to satisfy expectations of
OpenSG/OSGConfig.h. I would agree with a previous post suggesting that
__APPLE__ should be used instead of testing for the 'darwin' symbol since
__APPLE__ seems to be defined by default all the time, thus requiring no
extra work for anyone.
--
Patrick L. Hartling | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
? Source/Base/Network/Socket/.OSGSocket.h.swp
Index: Source/Base/Network/Socket/OSGSocket.h
===================================================================
RCS file: /cvsroot/opensg/OpenSG/Source/Base/Network/Socket/OSGSocket.h,v
retrieving revision 1.4
diff -u -r1.4 OSGSocket.h
--- Source/Base/Network/Socket/OSGSocket.h 30 Jan 2004 12:01:16 -0000
1.4
+++ Source/Base/Network/Socket/OSGSocket.h 5 May 2005 20:58:52 -0000
@@ -142,7 +142,7 @@
/*! Socket length type. Used to hide the different interface
implementations
**/
-#if defined __linux
+#if defined __linux || defined(__APPLE__)
typedef socklen_t SocketLenT;
#else
typedef int SocketLenT;
signature.asc
Description: OpenPGP digital signature
