[osg-users] [GL ES2] Compilation errors on master branch
Robert Osfield
robert.osfield at gmail.com
Fri May 8 01:55:02 PDT 2015
Hi Jean,
I have just had a look on my Kubuntu 15.04 system and do a build using:
cd OpenSceneGraph
cmake . -DOPENGL_PROFILE=GLES2
make
And I get the same errors as you. Previously I've used GLES2 other
headers rather than the ones that now come as part of Kubuntu/Ubuntu
and there are older and different. The new headers add the GLuint64
definition, unfortunately I haven't yet spotted an easy way to detect
which set of headers are in use and enable/disable the typedef
accordingly.
I'd welcome suggestions.
Robert.
On 8 May 2015 at 09:48, Jean Baptiste Poquelin <coudboule at yahoo.fr> wrote:
>
> robertosfield wrote:
>> HI Jean,
>>
>> Others have been using GLES2 with OSG svn/trunk without problems so
>> there must be an issue relating to specific combination of headers.
>>
>> How did you go about installing your GLES2 version? What source is it from?
>>
>
> Hi Robert,
>
> I am using Ubuntu 14.04 64 bit. I was able to reproduce this issue by following those steps:
> git clone https://github.com/openscenegraph/osg.git
> cd osg
> mkdir build
> cd build
> cmake -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=OFF -DOSG_GLES2_AVAILABLE=ON -DOPENGL_INCLUDE_DIR=/usr/include -DOPENGL_LIBRARY=/usr/lib/x86_64-linux-gnu/libGLESv2.so -DOPENGL_egl_LIBRARY=/usr/lib/x86_64-linux-gnu/libEGL.so -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=OFF -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF ..
> make
>
>
>> At what point do you get the compile errors you are reporting?
>
> Right at the start:
>
> Code:
>
> Scanning dependencies of target OpenThreads
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThread.o
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadBarrier.o
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadCondition.o
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThreadMutex.o
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Version.o
> [ 0%] Building CXX object src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.o
> Linking CXX shared library ../../../lib/libOpenThreads.so
> [ 0%] Built target OpenThreads
> Scanning dependencies of target osg
> [ 0%] Building CXX object src/osg/CMakeFiles/osg.dir/AlphaFunc.o
> In file included from /home/boule/Code/osg2/include/osg/GLDefines:25:0,
> from /home/boule/Code/osg2/include/osg/GLExtensions:18,
> from /home/boule/Code/osg2/include/osg/Shader:25,
> from /home/boule/Code/osg2/include/osg/StateAttribute:20,
> from /home/boule/Code/osg2/include/osg/AlphaFunc:17,
> from /home/boule/Code/osg2/src/osg/AlphaFunc.cpp:14:
> /home/boule/Code/osg2/build/include/osg/GL:123:31: error: conflicting declaration 'typedef long long int GLint64'
> typedef long long int GLint64;
> ^
> In file included from /home/boule/Code/osg2/build/include/osg/GL:109:0,
> from /home/boule/Code/osg2/include/osg/GLDefines:25,
> from /home/boule/Code/osg2/include/osg/GLExtensions:18,
> from /home/boule/Code/osg2/include/osg/Shader:25,
> from /home/boule/Code/osg2/include/osg/StateAttribute:20,
> from /home/boule/Code/osg2/include/osg/AlphaFunc:17,
> from /home/boule/Code/osg2/src/osg/AlphaFunc.cpp:14:
> /usr/include/GLES2/gl2.h:63:25: error: 'GLint64' has a previous declaration as 'typedef khronos_int64_t GLint64'
> typedef khronos_int64_t GLint64;
> ^
> In file included from /home/boule/Code/osg2/include/osg/GLDefines:25:0,
> from /home/boule/Code/osg2/include/osg/GLExtensions:18,
> from /home/boule/Code/osg2/include/osg/Shader:25,
> from /home/boule/Code/osg2/include/osg/StateAttribute:20,
> from /home/boule/Code/osg2/include/osg/AlphaFunc:17,
> from /home/boule/Code/osg2/src/osg/AlphaFunc.cpp:14:
> /home/boule/Code/osg2/build/include/osg/GL:124:40: error: conflicting declaration 'typedef long long unsigned int GLuint64'
> typedef unsigned long long int GLuint64;
> ^
> In file included from /home/boule/Code/osg2/build/include/osg/GL:109:0,
> from /home/boule/Code/osg2/include/osg/GLDefines:25,
> from /home/boule/Code/osg2/include/osg/GLExtensions:18,
> from /home/boule/Code/osg2/include/osg/Shader:25,
> from /home/boule/Code/osg2/include/osg/StateAttribute:20,
> from /home/boule/Code/osg2/include/osg/AlphaFunc:17,
> from /home/boule/Code/osg2/src/osg/AlphaFunc.cpp:14:
> /usr/include/GLES2/gl2.h:64:26: error: 'GLuint64' has a previous declaration as 'typedef khronos_uint64_t GLuint64'
> typedef khronos_uint64_t GLuint64;
> ^
> make[2]: *** [src/osg/CMakeFiles/osg.dir/AlphaFunc.o] Erreur 1
> make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Erreur 2
> make: *** [all] Erreur 2
>
>
>
>
> Thanks for helping me.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=63669#63669
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list