glXGetProcAddress back in 0.10...?

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
Gothi[c]

glXGetProcAddress back in 0.10...?

Post by Gothi[c] »

../../lib/Linux/libIrrlicht.a(COpenGLDriver.o)(.text+0x103a): In function `irr::video::COpenGLDriver::loadExtensions()':
: undefined reference to `glXGetProcAddress'

the good old all familiar error...
i get everything to compile fine in 0.9 after i altered it following the instructions in the thread on this forum, after examining the code in 0.10 in OpenGLDriver.cpp i saw that there was an attempt to fix this, with:

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

i tried forcing it to use glXGetProcAddressARB by removing the #ifdef, which didn't work, then i tried the opposite, by leaving only glXGetProcAddress, which didn't work either :shrug:

.. then tried finding out what my system uses:

bash-2.05b# cat /usr/include/GL/glx.h | grep glXGetProcAddress
extern void (*glXGetProcAddress(const GLubyte *procname))(void);
extern void (*glXGetProcAddressARB(const GLubyte *procName))( void );

both appearantly...

as everything compiles fine in 0.9 i'm sure there's nothing wrong with my glx, so there needs to be something changed in the irrlicht source, i tried all the changing i could, but now i'm beyond ideas.

Anyone got a clue? (or flame me if i missed something incredibly obious, which is likely, cause i haven't had any sleep for a while :p )
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: glXGetProcAddress back in 0.10...?

Post by niko »

Gothi[c] wrote:Anyone got a clue?
No, not at all. Now I'm a little bit confused. Someone else got that problem or has a solution, an idea, anything? :)
hybrid

Post by hybrid »

It's working for me as it should. Both Suse and Debian are working. Maybe you're linking in a wrong order? Could you please check your OpenGL versions (of all header files) and post also your final compiler command? did you try the examples from SDK?
Gothi[c]

Post by Gothi[c] »

--------------------------------------------------------------------------------------
compiling...
--------------------------------------------------------------------------------------

to compile irrlicht 0.10 i did:
make clean (to clean previous attempts)
make

Which finished with no errors and created libIrrlicht.a and copied it to the lib dir.

then i tried compiling the hello world demo with:

make

which results in:

g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o)(.text+0x103a): In function `irr::video::COpenGLDriver::loadExtensions()':
: undefined reference to `glXGetProcAddress'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o)(.text+0x104b): In function `irr::video::COpenGLDriver::loadExtensions()':
: undefined reference to `glXGetProcAddress'
collect2: ld returned 1 exit status
make: *** [all] Error 1

if i re-compile 0.9 with the same commands and then compile the 0.9 hello world it works...

--------------------------------------------------------------------------------------
gl headers and versions:
--------------------------------------------------------------------------------------

gl.h
* Mesa 3-D graphics library
* Version: 6.2

glext.h
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.

glx.h
/* $XFree86: xc/include/GL/glx.h,v 1.10 2002/10/30 08:52:36 alanh Exp $ */

glxmd.h
/* $XFree86: xc/include/GL/glxmd.h,v 1.2 1999/06/14 07:23:28 dawes Exp

glxproto.h
/* $XFree86: xc/include/GL/glxproto.h,v 1.6 2003/09/28 20:14:58 alanh Exp

glxtokens.h
/* $XFree86: xc/include/GL/glxtokens.h,v 1.5 2001/03/21 15:51:38 dawes Exp $ */

--------------------------------------------------------------------------------------
system info:
--------------------------------------------------------------------------------------

bash-2.05b$ uname -a
Linux gothic 2.6.11-gentoo-r3 #4 Sat May 21 21:58:56 CEST 2005 i686 AMD Duron(tm) Processor AuthenticAMD GNU/Linux

bash-2.05b$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_ARB_multisample, GLX_NV_float_buffer
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_NV_float_buffer
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_ARB_multisample, GLX_NV_float_buffer, GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce FX 5200/PCI/SSE/3DNOW!
OpenGL version string: 1.5.3 NVIDIA 71.74
...
hybrid

Post by hybrid »

I don't know yet what's up there. But I spotted a copy and paste error in the second round of getProcAdress calls in ifdef GLX_VERSION_1_4. It alwas checks for glActiveTextureARB but should check for glClientActiveTextureARB the second time. Use the patch provied on my patch page to fix this and clean up the ARB handling.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Ah, wow, I didn't see that. I guess that's the reason why the multitextureing doesn't work anymore on Linux. :)
phrounz
Posts: 45
Joined: Thu Feb 10, 2005 11:45 am
Location: France
Contact:

Post by phrounz »

Some people using my games made with Irrlicht said me that it is not working because it do :

Code: Select all

Irrlicht Engine version 0.10.0
Linux
Creating X window...
Starting fullscreen mode..
. OpenGL Renderer.
OpenGL driver version is 1.2 or better.
Multittexturing active.
./Projet1: relocation error: ./Projet1: undefined symbol: glXGetProcAddress
or

Code: Select all

Multittexturing active.
./IrrAdventure: symbol lookup error: ./IrrAdventure: undefined symbol: glXGetProcAddress
do you have a solution ?

P.S.: Someone shows me this link :
http://www.clanlib.org/docs/FAQ.html
where there seems to be the same problem for the Clanlib library.
Post Reply