Martin Spott wrote:

> I might offer AIX-5.1 with GCC-4.0.0 - which has, in the past, proven
> to be a quite 'tricky' platform ....  I'm uncertain of you really want
> me to try it  ;-)

Ok, unless I'm getting contradictory test results tomorrow, this looks like
a working procedure to build OSG 2.8 on AIX >= 5 with GCC.

1.) Point CMake to CURL- and probably other libraries like:

  -D CURL_LIBRARY=/opt/freeware/lib/libcurl.a \
  -D CURL_INCLUDE_DIR=/opt/freeware/include/curl


2.) Apparently the test for 'libm' fails on my AIX machine (I'm unable to
tell why), so call CMake with:

  -D MATH_LIBRARY=/lib/libm.a


3.) I suspect there's an old workaround for AIX releases _before_ AIX 5.
Presumably the previous releases had their OpenGL headers stored in
/usr/include/OpenGL/. Therefore I had to modify a little compile time
switch:

diff -urNb include/osg.release/GLU include/osg/GLU
--- include/osg.release/GLU     Wed Oct  3 22:21:01 2007
+++ include/osg/GLU     Sun Feb 22 21:59:07 2009
@@ -16,7 +16,8 @@
 
 #include <osg/GL>
 
-#if defined(__APPLE__) || defined (_AIX)
+#if defined(__APPLE__) || \
+    (defined (_AIX) && !defined (_AIX51))
     #include <OpenGL/glu.h>
 #else
     #include <GL/glu.h>


4.) Finally, almost all of the floating point types seem to be undefined on
AIX, at least with GCC - I decided to re-use some switches which are alredy
in place for the use on other commercial Unix systems:

diff -urNb include/osg.release/Math include/osg/Math
--- include/osg.release/Math    Sun Nov 23 12:35:43 2008
+++ include/osg/Math    Sun Feb 22 22:24:46 2009
@@ -44,7 +44,9 @@
     #include <float.h>
 #endif

-#if defined (sun) || defined (__APPLE__)
+#if defined (sun) || \
+    defined (__APPLE__) || \
+    (defined (_AIX) && defined (__GNUC__))

     #include <float.h>

@@ -93,7 +95,8 @@

 #if defined (sun) || \
     defined (__hpux) || \
-    defined (APPLE_PRE_10_2)
+    defined (APPLE_PRE_10_2) || \
+    (defined (_AIX) && defined (__GNUC__))

     #ifndef floorf
     inline float floorf(float value) { return 
static_cast<float>(floor(value)); }


Even though my server has 8 CPU's, they only run at 200 MHz each, so I don't
expect the build to be ready before tomorrow  :-)

Cheers,
        Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to