Error when compiling against Mesa 10.0

Error when compiling against Mesa 10.0

Postby zezinho » 14 Dec 2013, 11:13

While rebuilding STK for Mageia 4, I tried to include glxext.h to fix Mesa 10 changes :
{l Code}: {l Select All Code}
--- lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h.old  2013-12-14 09:47:43.628918977 +0100
+++ lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h      2013-12-14 09:49:47.982028315 +0100
@@ -60,6 +60,7 @@
        #endif
        #include <GL/gl.h>
        #include <GL/glx.h>
+       #include <GL/glxext.h>
        #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
        #include "glext.h"
        #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h


But it still fails :

{l Code}: {l Select All Code}
In file included from COpenGLDriver.h:25:0,
                 from COpenGLNormalMapRenderer.cpp:13:
COpenGLExtensionHandler.h:1238:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
   PFNGLBLENDEQUATIONPROC pGlBlendEquation;
   ^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2572:6: error: ‘pGlBlendEquation’ was not declared in this scope
  if (pGlBlendEquation)
      ^
<builtin>: recipe for target 'COpenGLNormalMapRenderer.o' failed
make: *** [COpenGLNormalMapRenderer.o] Error 1
make: ** Esperando que outros processos terminem.
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -fexpensive-optimizations -O3 -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1  -c -o CSceneNodeAnimatorTexture.o CSceneNodeAnimatorTexture.cpp
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -fexpensive-optimizations -O3 -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1  -c -o COpenGLDriver.o COpenGLDriver.cpp
In file included from COpenGLDriver.h:25:0,
                 from COpenGLDriver.cpp:5:
COpenGLExtensionHandler.h:1238:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
   PFNGLBLENDEQUATIONPROC pGlBlendEquation;
   ^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2572:6: error: ‘pGlBlendEquation’ was not declared in this scope
  if (pGlBlendEquation)
      ^
<builtin>: recipe for target 'COpenGLDriver.o' failed
make: *** [COpenGLDriver.o] Error 1
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -fexpensive-optimizations -O3 -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1  -c -o CNullDriver.o CNullDriver.cpp
erro: Código de saída inválido do /var/tmp/rpm-tmp.SLAygc (%build)
zezinho
 
Posts: 5
Joined: 07 Jan 2013, 15:45

Re: Error when compiling against Mesa 10.0

Postby kosmi » 14 Dec 2013, 15:18

That is known problem, seems like those headers are curently broken upstream (from khronos):

http://lists.freedesktop.org/archives/m ... 50173.html
http://lists.freedesktop.org/archives/m ... 50177.html
kosmi
 
Posts: 39
Joined: 25 Dec 2012, 15:52

Re: Error when compiling against Mesa 10.0

Postby zezinho » 16 Dec 2013, 09:29

That's the point : the headers fixed by Mesa need some fixes in STK code...
zezinho
 
Posts: 5
Joined: 07 Jan 2013, 15:45

Re: Error when compiling against Mesa 10.0

Postby MCMic » 13 Jan 2014, 22:48

Same problem here, I get the exact same error.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Error when compiling against Mesa 10.0

Postby MCMic » 15 Jan 2014, 20:58

I fixed the problem by deleting glext.h and symlining the system one instead.
But now I get an error from /usr/include/fribidi/fribidi-common.h about not finding glib.h.
I have the following glib.h : /usr/include/glib-2.0/glib.h

Any ideas?
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Error when compiling against Mesa 10.0

Postby vlj » 16 Jan 2014, 01:05

I'm aware of the issue.

You can fix it by adding this line before #include "glext.h" in CIrrDeviceLinux.h/cpp :

"typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);"
I will come with a proper solution a bit later.
vlj
 
Posts: 58
Joined: 27 Dec 2013, 04:22

Re: Error when compiling against Mesa 10.0

Postby Toams » 19 Feb 2014, 17:59

any progress on this? I need latest mesa for another game and i like testing latest stk from git. but applying this fix every time git updates is a bit annoying.
Toams
 
Posts: 13
Joined: 07 Sep 2011, 22:00

Re: Error when compiling against Mesa 10.0

Postby vlj » 20 Feb 2014, 17:19

It's theorically fixed, I have mesa (git) on my system and I can build vanilla git stk.
vlj
 
Posts: 58
Joined: 27 Dec 2013, 04:22

Postby Toams » 22 Feb 2014, 11:53

Ok then maybe something else is eating my kittens!

to make sure i'm on the latest and greatest i did the following(please correct me if i did something wrong)
{l Code}: {l Select All Code}
# git reset --hard
# git pull
# cd cmake_build/
# make clean
# cmake ../
# make -j5

but it failes with following error:
{l Code}: {l Select All Code}
[ 23%] Building CXX object lib/irrlicht/CMakeFiles/stkirrlicht.dir/source/Irrlicht/CParticleRotationAffector.cpp.o             
In file included from /home/tommi/Code/stk/stk-code/lib/irrlicht/source/Irrlicht/COpenGLDriver.h:25:0,
                 from /home/tommi/Code/stk/stk-code/lib/irrlicht/source/Irrlicht/COpenGLSLMaterialRenderer.cpp:22:
/home/tommi/Code/stk/stk-code/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h:1239:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
   PFNGLBLENDEQUATIONPROC pGlBlendEquation;
   ^
[ 23%] /home/tommi/Code/stk/stk-code/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
/home/tommi/Code/stk/stk-code/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h:2573:6: error: ‘pGlBlendEquation’ was not declared in this scope
  if (pGlBlendEquation)
      ^
Building CXX object lib/irrlicht/CMakeFiles/stkirrlicht.dir/source/Irrlicht/CAnimatedMeshHalfLife.cpp.o
make[2]: *** [lib/irrlicht/CMakeFiles/stkirrlicht.dir/source/Irrlicht/COpenGLSLMaterialRenderer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....


i'm currently using kubuntu 13.10 with the oibaf mesa drivers
Toams
 
Posts: 13
Joined: 07 Sep 2011, 22:00

Re: Error when compiling against Mesa 10.0

Postby sj04736 » 22 Feb 2014, 19:24

I'm seeing the same thing as Toams on Arch Linux, with the latest released Mesa (10.0.3) library installed. It's quite possible they fixed this issue in Mesa 10.1, which will be released within the next few months.
Stephen
Role: STK-Addons Developer

Image
User avatar
sj04736
 
Posts: 146
Joined: 07 Dec 2009, 02:56
Location: Western Canada

Re: Error when compiling against Mesa 10.0

Postby vlj » 23 Feb 2014, 00:32

Btw do you have sdl devel file ?
I don't, and irrlicht does not use the same include file if sdl is included.
vlj
 
Posts: 58
Joined: 27 Dec 2013, 04:22

Re: Error when compiling against Mesa 10.0

Postby sj04736 » 23 Feb 2014, 19:29

I don't see SDL anywhere in the CMake build scripts for irrlicht. If having sdl libs makes a difference, that'd be a build script bug. We shouldn't be compiling support for it if we don't want it. I do have sdl libs though: Arch packages development files with the binary package.

If we haven't already integrated something like this, can we do so?
http://pkgs.fedoraproject.org/cgit/irrl ... sa10.patch
Stephen
Role: STK-Addons Developer

Image
User avatar
sj04736
 
Posts: 146
Joined: 07 Dec 2009, 02:56
Location: Western Canada

Re: Error when compiling against Mesa 10.0

Postby Auria » 27 Feb 2014, 01:52

A tentative fix was committed for this, hopefully it should now work
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Error when compiling against Mesa 10.0

Postby hiker » 27 Feb 2014, 02:36

Auria {l Wrote}:A tentative fix was committed for this, hopefully it should now work

Also shaders are now off by default. We had a lot of problems with GSoC students, who were not able to run their self-compiled version (because STK would crash before a config file is created, where the shaders could be disabled).

This will of course be changed later.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Error when compiling against Mesa 10.0

Postby WillemS » 27 Feb 2014, 10:21

Auria {l Wrote}:A tentative fix was committed for this, hopefully it should now work


I was having the same problem, but the current Git version a686c43 still doesn't compile for me :(

However, I checked my installed Mesa version and it is 10.0.1 (which is the packaged version in my distribution, Chakra Linux). Is that not supported?

Error from make:

{l Code}: {l Select All Code}
In file included from /home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.h:26:0,
                 from /home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:5:
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:664:8: fout: ‘GLXContextID’ does not name a type
 extern GLXContextID glXGetContextIDEXT (const GLXContext context);
        ^
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:665:54: fout: ‘GLXContextID’ has not been declared
 extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
                                                      ^
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:670:22: fout: ISO C++ forbids declaration of ‘GLXContextID’ with no type [-fpermissive]
 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
                      ^
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:670:22: fout: typedef ‘GLXContextID’ is initialized (use decltype instead)
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:670:26: fout: ‘PFNGLXGETCONTEXTIDEXTPROC’ was not declared in this scope
 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
                          ^
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/glxext.h:671:67: fout: ‘GLXContextID’ has not been declared
 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
                                                                   ^
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp: In memberfunctie ‘virtual bool irr::CIrrDeviceLinux::run()’:
/home/willem/SuperTuxKart/stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1087:50: let op: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      irrevent.KeyInput.Char = ((wchar_t*)(buf))[0];
                                                  ^
make[2]: *** [lib/irrlicht/CMakeFiles/stkirrlicht.dir/source/Irrlicht/CIrrDeviceLinux.cpp.o] Fout 1
WillemS
 
Posts: 81
Joined: 03 Nov 2012, 17:42

Who is online

Users browsing this forum: No registered users and 1 guest

cron