[fixed]Compile problems with Irrlicht on Fedora 11 (x86-64)

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

[fixed]Compile problems with Irrlicht on Fedora 11 (x86-64)

Post by ZCCdark203 »

Currently I'm having trouble compiling the latest Irrlicht SVN revision, 2475, on Fedora 11 (x86-64). However, the problem doesn't seem to be limited to the latest revision. I tried to recompile an older revision, 2420, which used to work, but it doesn't work either.

This is the problem I'm facing:

Code: Select all

g++ -Wall -pipe -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1  -c -o COpenGLDriver.o COpenGLDriver.cpp
In file included from COpenGLDriver.h:17,
                 from COpenGLDriver.cpp:5:
COpenGLExtensionHandler.h:855: fout: ‘PFNGLCOMPRESSEDTEXIMAGE2DPROC’ does not name a type
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlCompressedTexImage2D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*)’:
COpenGLExtensionHandler.h:1274: fout: ‘pGlCompressedTexImage2D’ was not declared in this scope
make: *** [COpenGLDriver.o] Fout 1
I receive this problem regardless of the version, release (make NDEBUG=1) or debug (make NDEBUG=0).

After browsing shortly through the mentioned file, COpenGLExtensionHandler.h, I found the define _IRR_OPENGL_USE_EXTPOINTER_. I decided to outcomment that define and retry. Unfortunately, the problem wasn't solved:

Code: Select all

g++ -Wall -pipe -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1  -c -o COpenGLNormalMapRenderer.o COpenGLNormalMapRenderer.cpp
In file included from COpenGLDriver.h:17,
                 from COpenGLNormalMapRenderer.cpp:13:
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGenPrograms(GLsizei, GLuint*)’:
COpenGLExtensionHandler.h:915: fout: ‘glGenProgramsARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBindProgram(GLenum, GLuint)’:
COpenGLExtensionHandler.h:927: fout: ‘glBindProgramARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlProgramString(GLenum, GLenum, GLsizei, const GLvoid*)’:
COpenGLExtensionHandler.h:939: fout: ‘glProgramStringARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDeletePrograms(GLsizei, const GLuint*)’:
COpenGLExtensionHandler.h:951: fout: ‘glDeleteProgramsARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlProgramLocalParameter4fv(GLenum, GLuint, const GLfloat*)’:
COpenGLExtensionHandler.h:963: fout: ‘glProgramLocalParameter4fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLhandleARB irr::video::COpenGLExtensionHandler::extGlCreateShaderObject(GLenum)’:
COpenGLExtensionHandler.h:975: fout: ‘glCreateShaderObjectARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlShaderSource(GLhandleARB, int, const char**, int*)’:
COpenGLExtensionHandler.h:988: fout: ‘glShaderSourceARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlCompileShader(GLhandleARB)’:
COpenGLExtensionHandler.h:1000: fout: ‘glCompileShaderARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLhandleARB irr::video::COpenGLExtensionHandler::extGlCreateProgramObject()’:
COpenGLExtensionHandler.h:1012: fout: ‘glCreateProgramObjectARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlAttachObject(GLhandleARB, GLhandleARB)’:
COpenGLExtensionHandler.h:1025: fout: ‘glAttachObjectARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlLinkProgram(GLhandleARB)’:
COpenGLExtensionHandler.h:1037: fout: ‘glLinkProgramARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUseProgramObject(GLhandleARB)’:
COpenGLExtensionHandler.h:1049: fout: ‘glUseProgramObjectARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDeleteObject(GLhandleARB)’:
COpenGLExtensionHandler.h:1061: fout: ‘glDeleteObjectARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetInfoLog(GLhandleARB, GLsizei, GLsizei*, GLcharARB*)’:
COpenGLExtensionHandler.h:1073: fout: ‘glGetInfoLogARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetObjectParameteriv(GLhandleARB, GLenum, int*)’:
COpenGLExtensionHandler.h:1085: fout: ‘glGetObjectParameterivARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLint irr::video::COpenGLExtensionHandler::extGlGetUniformLocation(GLhandleARB, const char*)’:
COpenGLExtensionHandler.h:1097: fout: ‘glGetUniformLocationARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniform4fv(GLint, GLsizei, const GLfloat*)’:
COpenGLExtensionHandler.h:1110: fout: ‘glUniform4fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniform1iv(GLint, GLsizei, const GLint*)’:
COpenGLExtensionHandler.h:1122: fout: ‘glUniform1ivARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniform1fv(GLint, GLsizei, const GLfloat*)’:
COpenGLExtensionHandler.h:1134: fout: ‘glUniform1fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniform2fv(GLint, GLsizei, const GLfloat*)’:
COpenGLExtensionHandler.h:1146: fout: ‘glUniform2fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniform3fv(GLint, GLsizei, const GLfloat*)’:
COpenGLExtensionHandler.h:1158: fout: ‘glUniform3fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniformMatrix2fv(GLint, GLsizei, GLboolean, const GLfloat*)’:
COpenGLExtensionHandler.h:1170: fout: ‘glUniformMatrix2fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniformMatrix3fv(GLint, GLsizei, GLboolean, const GLfloat*)’:
COpenGLExtensionHandler.h:1182: fout: ‘glUniformMatrix3fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlUniformMatrix4fv(GLint, GLsizei, GLboolean, const GLfloat*)’:
COpenGLExtensionHandler.h:1194: fout: ‘glUniformMatrix4fvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetActiveUniform(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*)’:
COpenGLExtensionHandler.h:1208: fout: ‘glGetActiveUniformARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlPointParameterf(GLint, GLfloat)’:
COpenGLExtensionHandler.h:1220: fout: ‘glPointParameterfARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlPointParameterfv(GLint, const GLfloat*)’:
COpenGLExtensionHandler.h:1232: fout: ‘glPointParameterfvARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlStencilFuncSeparate(GLenum, GLenum, GLint, GLuint)’:
COpenGLExtensionHandler.h:1246: fout: ‘glStencilFuncSeparate’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlStencilOpSeparate(GLenum, GLenum, GLenum, GLenum)’:
COpenGLExtensionHandler.h:1262: fout: ‘glStencilOpSeparate’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBindFramebuffer(GLenum, GLuint)’:
COpenGLExtensionHandler.h:1289: fout: ‘glBindFramebufferEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDeleteFramebuffers(GLsizei, const GLuint*)’:
COpenGLExtensionHandler.h:1301: fout: ‘glDeleteFramebuffersEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGenFramebuffers(GLsizei, GLuint*)’:
COpenGLExtensionHandler.h:1313: fout: ‘glGenFramebuffersEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLenum irr::video::COpenGLExtensionHandler::extGlCheckFramebufferStatus(GLenum)’:
COpenGLExtensionHandler.h:1327: fout: ‘glCheckFramebufferStatusEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlFramebufferTexture2D(GLenum, GLenum, GLenum, GLuint, GLint)’:
COpenGLExtensionHandler.h:1340: fout: ‘glFramebufferTexture2DEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBindRenderbuffer(GLenum, GLuint)’:
COpenGLExtensionHandler.h:1352: fout: ‘glBindRenderbufferEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDeleteRenderbuffers(GLsizei, const GLuint*)’:
COpenGLExtensionHandler.h:1364: fout: ‘glDeleteRenderbuffersEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGenRenderbuffers(GLsizei, GLuint*)’:
COpenGLExtensionHandler.h:1376: fout: ‘glGenRenderbuffersEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlRenderbufferStorage(GLenum, GLenum, GLsizei, GLsizei)’:
COpenGLExtensionHandler.h:1388: fout: ‘glRenderbufferStorageEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlFramebufferRenderbuffer(GLenum, GLenum, GLenum, GLuint)’:
COpenGLExtensionHandler.h:1400: fout: ‘glFramebufferRenderbufferEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlActiveStencilFace(GLenum)’:
COpenGLExtensionHandler.h:1412: fout: ‘glActiveStencilFaceEXT’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDrawBuffers(GLsizei, const GLenum*)’:
COpenGLExtensionHandler.h:1426: fout: ‘glDrawBuffersARB’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGenBuffers(GLsizei, GLuint*)’:
COpenGLExtensionHandler.h:1441: fout: ‘glGenBuffers’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBindBuffer(GLenum, GLuint)’:
COpenGLExtensionHandler.h:1453: fout: ‘glBindBuffer’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBufferData(GLenum, GLsizeiptrARB, const GLvoid*, GLenum)’:
COpenGLExtensionHandler.h:1465: fout: ‘glBufferData’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlDeleteBuffers(GLsizei, const GLuint*)’:
COpenGLExtensionHandler.h:1477: fout: ‘glDeleteBuffers’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid*)’:
COpenGLExtensionHandler.h:1489: fout: ‘glBufferSubData’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid*)’:
COpenGLExtensionHandler.h:1501: fout: ‘glGetBufferSubData’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void* irr::video::COpenGLExtensionHandler::extGlMapBuffer(GLenum, GLenum)’:
COpenGLExtensionHandler.h:1514: fout: ‘glMapBuffer’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLboolean irr::video::COpenGLExtensionHandler::extGlUnmapBuffer(GLenum)’:
COpenGLExtensionHandler.h:1528: fout: ‘glUnmapBuffer’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘GLboolean irr::video::COpenGLExtensionHandler::extGlIsBuffer(GLuint)’:
COpenGLExtensionHandler.h:1542: fout: ‘glIsBuffer’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetBufferParameteriv(GLenum, GLenum, GLint*)’:
COpenGLExtensionHandler.h:1555: fout: ‘glGetBufferParameteriv’ was not declared in this scope
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlGetBufferPointerv(GLenum, GLenum, GLvoid**)’:
COpenGLExtensionHandler.h:1567: fout: ‘glGetBufferPointerv’ was not declared in this scope

Next I decided to look at my OS. When I originally compiled revision 2420 I had only installed the Mesa libraries (and the other dependencies required by Irrlicht). After I compiled Irrlicht, I installed the propietary nVidia drivers via RPM Fusion. Currently, both the Mesa libraries and the propietary nVidia drivers have been installed. I suspected that this might be the cause for the difference in behaviour. However, I still got the same errors after I removed the nVidia drivers (and rebooted).

Furthermore I've also experimented with reinstalling the Mesa libraries, but that didn't seem to help much either. Also, I looked up GL/glext.h for PFNGLCOMPRESSEDTEXIMAGE2DPROC. It's mentioned at line 4232:

Code: Select all

typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
I don't know where to look at anymore, though. Does someone have any ideas?

P.S. Some extra information regarding installed packages:
Mesa:
Mesa-based DRI drivers (x86-64)
Mese libGL runtime libraries and DRI drivers (x86-64)
Mesa libGL development package (x86-64)
Mesa libGLU runtime library (x86-64)
Mesa libGLU development package (x86-64)

nVidia:
Kernel modules installed via yum install kmod-nvidia.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

We've had some problems with bogus headers some years ago. But since no one complained anymore, it seemed to be fixed. The thing is that the pointers are all defined in the local glext.h offered in the Irrlicht SDK. However, due to a wrong define in one of your GL includes it doesn't seem to be used for some function pointers. I never tried to compile with the extension pointers define uncommented under Linux, but this might be due to some missing ifdef's in Irrlicht's code. I'll check this.
I'd suggest to remove the packages that provide gl.h (make sure you remove all those packages which define any such file) and reinstall the mesa ones for a test. It might also help to locate the NVidia ones and make sure that they are used in favor of the Mesa files in all cases.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

Alright, I got it working. I removed all development packages for Mesa and installed a package called Development files for xorg-x11-drv-nvidia (x86-64). It didn't see any OpenGL header files in the appropriate GL directory. I then noticed that there was a separate GL sub-directory in the nvidia directory. After I pointed Irrlicht's makefile at this directory it finally compiled. Ironically I already installed the package before, but I missed the nvidia directory.

Thank you, Hybrid, for the advice. Also thanks to those who have been helping via IM. :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

BTW: I've fixed the compile without using extension pointers. This was bugged due to the reduced includes in the shader stuff of OpenGL. Should work in the latest revision.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

I can confirm that it compiles without using extension pointers.
Frank Dodd
Posts: 208
Joined: Sun Apr 02, 2006 9:20 pm

Post by Frank Dodd »

Sorry to resurrect an old post but I recently installed Fedora 11 to test my project on Linux with Irrlicht 1.7.1 and the fedora repository Mesa libraries it still throws up these errors.

I didn't want to mess about trying to install Geforce2 drivers I just wanted to test and validate a build of the project for Linux so I decided to keep the Mesa Libraries and just so I hacked in another solution which was to include

Code: Select all

#undef GL_VERSION_1_3
Before each include of glext.h (there are only two of them) not the best way I'm sure but for those with limited requirements it suffices.
Valodim
Posts: 4
Joined: Sun May 09, 2010 11:20 am

Post by Valodim »

This worked perfectly for me too, thank you very much for sharing!
delark
Posts: 8
Joined: Wed Dec 03, 2008 1:38 pm

Post by delark »

mmm, the

Code: Select all

#undef GL_VERSION_1_3
method worked for me too... (FC11)
Post Reply