I recently switched to Xubuntu 15.04 64-bit (from Debian 32-bit) and had some problems with compiling Irrlicht.
I already have all the source dependencies, I used:
Code: Select all
sudo apt-get build-dep irrlicht
After unzipping the Irrlicht 1.8.1 source archive (from http://irrlicht.sourceforge.net/downloads/) I simply run make -j4 in source/Irrlicht/
make gives me this error:
Code: Select all
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1 -c -o COpenGLDriver.o COpenGLDriver.cpp
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1 -c -o COpenGLNormalMapRenderer.o COpenGLNormalMapRenderer.cpp
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1 -c -o COpenGLParallaxMapRenderer.o COpenGLParallaxMapRenderer.cpp
g++ -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -I/usr/X11R6/include -DIRRLICHT_EXPORTS=1 -c -o COpenGLShaderMaterialRenderer.o COpenGLShaderMaterialRenderer.cpp
In file included from COpenGLDriver.h:25:0,
from COpenGLParallaxMapRenderer.cpp:9:
COpenGLExtensionHandler.h:1236:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
PFNGLBLENDEQUATIONPROC pGlBlendEquation;
^
In file included from COpenGLDriver.h:25:0,
from COpenGLShaderMaterialRenderer.cpp:13:
COpenGLExtensionHandler.h:1236:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
PFNGLBLENDEQUATIONPROC pGlBlendEquation;
^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2566:6: error: ‘pGlBlendEquation’ was not declared in this scope
if (pGlBlendEquation)
^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2566:6: error: ‘pGlBlendEquation’ was not declared in this scope
if (pGlBlendEquation)
^
In file included from COpenGLDriver.h:25:0,
from COpenGLDriver.cpp:5:
COpenGLExtensionHandler.h:1236:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
PFNGLBLENDEQUATIONPROC pGlBlendEquation;
^
In file included from COpenGLDriver.h:25:0,
from COpenGLNormalMapRenderer.cpp:13:
COpenGLExtensionHandler.h:1236:3: error: ‘PFNGLBLENDEQUATIONPROC’ does not name a type
PFNGLBLENDEQUATIONPROC pGlBlendEquation;
^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2566:6: error: ‘pGlBlendEquation’ was not declared in this scope
if (pGlBlendEquation)
^
COpenGLExtensionHandler.h: In member function ‘void irr::video::COpenGLExtensionHandler::extGlBlendEquation(GLenum)’:
COpenGLExtensionHandler.h:2566:6: error: ‘pGlBlendEquation’ was not declared in this scope
if (pGlBlendEquation)
^
<builtin>: recipe for target 'COpenGLParallaxMapRenderer.o' failed
make: *** [COpenGLParallaxMapRenderer.o] Error 1
make: *** Waiting for unfinished jobs....
<builtin>: recipe for target 'COpenGLShaderMaterialRenderer.o' failed
make: *** [COpenGLShaderMaterialRenderer.o] Error 1
<builtin>: recipe for target 'COpenGLNormalMapRenderer.o' failed
make: *** [COpenGLNormalMapRenderer.o] Error 1
<builtin>: recipe for target 'COpenGLDriver.o' failed
make: *** [COpenGLDriver.o] Error 1
Code: Select all
//! Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL renderer should use OpenGL extensions via function pointers.
/** On some systems there is no support for the dynamic extension of OpenGL
via function pointers such that this has to be undef'ed. */
#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#endif
#undef _IRR_OPENGL_USE_EXTPOINTER_
Irrlicht compiles fine and I have libIrrlicht.a in ../../libs/Linux.
When I buildAllExamples.sh however:
Code: Select all
Building 01.HelloWorld
~/devel/irrlicht-1.8.1/examples/01.HelloWorld ~/devel/irrlicht-1.8.1/examples
Makefile:51: Cleaning...
Makefile:47: Building...
g++ -I../../include -I/usr/X11R6/include -O3 -ffast-math main.cpp -o ../../bin/Linux/01.HelloWorld -L../../lib/Linux -lIrrlicht -L/usr/X11R6/lib -lGL -lXxf86vm -lXext -lX11 -lXcursor
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLExtensionHandler::extGlSwapInterval(int)':
/home/archmagus/devel/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h:2540: undefined reference to `glXSwapIntervalSGI'
collect2: error: ld returned 1 exit status
Makefile:47: recipe for target 'all_linux' failed
make: *** [all_linux] Error 1
To fix this I comment out glXSwapIntervalSGI(interval); in COpenGLExtensionHandler.h (Line 2540) and recompile Irrlicht.
Then I can compile the examples and everything works, or so it appears...
Have I come across a genuine bug or have I misconfigured something? Will my n00b fix break something else down the track?
I'm running Xubuntu 15.04 64-bit.
I have an Nvidia GeForce GTX 750, using driver version 346.59 from the standard Ubuntu Repo.