openGL under linux - configuration trouble

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

openGL under linux - configuration trouble

Post by Guest »

hi!

I can't get work openGL under linux - not work compiled programs with openGL driver.

I have Debian Sarge, and I did apt-get to all gl packages that was mentioned the faqs. Additionally I have Geforce2, and have installed the newest driver.

In /usr/X11R6/lib there is
lrwxr-xr-x 1 root root 12 Jun 10 18:51 libGL.so -> libGL.so.1.2
-rw-r--r-- 1 root root 437376 Jun 1 06:03 libGL.so.1.2
files I think this good. I also have GLU packages.
So when I type make command to compile an example it compiling without errors, but when I trying to run the compiled binary, I got the next error:
./example: relocation error: ./example: undefined symbol: glXGetProcAddress

Thanks,
kib.
hybrid

Post by hybrid »

There might be still some problems with OpenGL linking. Try the patches from parsys.informatik.uni-oldenburg.de/~hybrid/irrlicht
It might be a problem with header files, though. If the irrlicht glext.h does not match your version of libGL it might be a problem. Try to use glext.h from system include path then.
kib

Post by kib »

I apply the "# OpenGLExtension.patch but same problem again as above. After all as you said I tried to apply glext.h from my system. So there is a new problem. When I try to compile Irrlicht engine got this error: (with the original glext.h its compiled with no errors)

++ -c CTRTextureGouraud.cpp -o CTRTextureGouraud.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudAdd.cpp -o CTRTextureGouraudAdd.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudNoZ.cpp -o CTRTextureGouraudNoZ.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CTRTextureGouraudWire.cpp -o CTRTextureGouraudWire.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c CZBuffer.cpp -o CZBuffer.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setPixelShaderConstant(f32*, int, int)':
COpenGLDriver.cpp:1816: error: `GL_FRAGMENT_PROGRAM_ARB' undeclared (first use
this function)
COpenGLDriver.cpp:1816: error: (Each undeclared identifier is reported only
once for each function it appears in.)
make: *** [COpenGLDriver.o] Error 1
Guest

Post by Guest »

I had the same problem and i think i added added /usr/share/doc/NVIDIA_GLX-1.0/include in front of the other includes in the makefile when i made the irrlich library itself (in the source directory) to solve this. just rebuild the library, then hopefully, problem solved.
LonnieTC
Posts: 10
Joined: Thu Dec 09, 2004 12:48 am

Post by LonnieTC »

Hello All,

I have been trying to solve this same problem but even after I edit the makefile and add in the include for the NVIDIA_GLX-1.0/include I still get the same error.

Additionally. I am trying to compile on Fedora 4.

Any other ideas?

Thanks,
Lonnie
Steve

compiling on FC4

Post by Steve »

For me the editing of Makefile worked, I changed the line 7 to look like this:

Code: Select all

CXXINCS = -I"/usr/include/nvidia/" -I"include/" -I"zlib/"
I have nvidia-glx-devel (and other NVidia drivers) installed from rpm.livna.org.

But if that doesn't work, here's how I did it before I tried editing the Makefile:
First, in COpenGLDriver.cpp define this before #include's:

Code: Select all

#define  GLX_GLXEXT_LEGACY
then, near line 360, change the following:

Code: Select all

			#ifdef GLX_VERSION_1_4 
				glXGetProcAddress(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
			#else 
				glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
			#endif
to something like:

Code: Select all

glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
or instead of removing lines, #undef GLX_VERSION_1_4 after #include's

Code: Select all

#undef GLX_VERSION_1_4

I'm also on FC4 with NVidia (or how is it spelled correctly), the problem with the standard includes in /usr/include/GL/ is that they are for GLX version 1.4 but the NVidia's GLX library is 1.3.


Regards,
Steve[/code]
hybrid

Post by hybrid »

I also encountered similar problems with nvidia drivers using Suse 9.x and proprietary nvidia drivers. But even if these drivers provide GLX 1.3, why does the ifdef refuse to work? It seems as if nvidia is providing some mix between 1.3 and 1.4 and this might be the problem. I did not check it yet, though, as most machines I'm working on are using ATI cards.
Steve

Post by Steve »

Seems like I didn't express myself clear enough, so here's another try:

Nvidia provides the correct set of files. The problem is that /usr/include/GL/* files are provided by your linux distributor and they contain header files for GLX 1.4, those files define the GLX_VERSION_1_4 macro (see glxtokens.h).
If you include the correct headers that you get from Nvidia the problem goes away, on Fedora with the livna rpms they get installed to /usr/include/nvidia/.

So you are using include files from your distributor of version 1.4 and library of version 1.3 (shared object .so) from Nvidia.


Regards,
Steve
Post Reply