Hi Martin,

On Sun, Feb 22, 2009 at 9:54 PM, Martin Spott <[email protected]> wrote:
> 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

Did you build libcurl and other libraries yourself?

It does sound like the CMake find modules don't have these paths
listed for AIX so it'd be worth contacting the CMake team about their
placement so they can adjust their search paths to find these libs.

> 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

Starting to sound like CMake hasn't been tested much under AIX...  so
it'd be worth pinging them about your findings, they are normally very
responsive about get things like this fixed, then hopefully you won't
have problems with future revs of CMake.

> 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)); }

Could you post the header file changes to osg-submissions, I can then
merge them with svn/trunk and the OSG-2.8 branch so that when we make
2.8.1 it should work better out the box under AIX.

> 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  :-)

I remember when such a machine would have been considered high end...
but over a decade has past since then!

Thanks for perceiving with this testing.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to