openscenegraph / OpenSceneGraph

OpenSceneGraph git repository
http://www.openscenegraph.org
Other
3.19k stars 1.41k forks source link

OpenSceneGraph 3.6.5 or master branch will not build on Solaris 10 #1182

Open Astal4 opened 1 year ago

Astal4 commented 1 year ago

Hello, I have a Solaris 10 SPARCv9 machine I'm trying to build and install OSG on, it is erring due to the lack of GLsizeiptr and other OpenGL functions, I have GCC 8.5 with GNU binutils 2.38, and the video card is OpenGL 1.2 complaint (XVR-500). Here are the cmake log and the make log

I used cmake . -DOSG_GL1_AVAILABLE=1 -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ to configure. make.txt

cmake.txt

Thanks everyone.

robertosfield commented 1 year ago

Wow, it's a long time since I heard of anyone working with Solaris. If the modern versions of the OSG don't build it very likely down to no one in the community actively using a platform.

I don't know how much work it will be to fix. There are definitions for GLsizeiptr and GLintptr in include/osg/GLDefines. The code is:

// for compatibility with gl.h headers that don't support VBO,
//GL_VERSION_1_5 and GL_ARB_vertex_buffer_object provide these types for OpenGL
//all ES versions except GL_OES_VERSION_1_0 provide these types for OpenGL ES
#if !defined(GL_VERSION_1_5) && !defined(GL_ARB_vertex_buffer_object) \
&& !defined(GL_ES_VERSION_2_0) && !defined(OPENGLES_1_1_FOUND)

    #if 1
        // experimental defination.
        typedef ptrdiff_t GLsizeiptr;
        typedef ptrdiff_t GLintptr;
    #else

        #if defined(_WIN64)
            typedef __int64 GLintptr;
            typedef __int64 GLsizeiptr;
        #elif defined(__ia64__) || defined(__x86_64__) || defined(__ANDROID__)
            typedef long int GLintptr;
            typedef long int GLsizeiptr;
        #else
            typedef int GLintptr;
            typedef int GLsizeiptr;
        #endif
    #endif
#endif

So you'll need to figure out why this isn't being invoked on your system.

Astal4 commented 1 year ago

I was able to get those errors to go away by hard defining GLintptr/GLintptr without the conditional statements. After this, however it then started to throw another error, signed to unsigned conversion with -Fpermissive. make.txt