Opened 13 years ago

Closed 13 years ago

#4064 closed defect (fixed)

NVidia OpenGL undefined reference to glXGetProcAddress in SVN14639

Reported by: ross.campbell@… Owned by: danielk
Priority: minor Milestone: 0.21.1
Component: mythtv Version: head
Severity: medium Keywords: NVidia glXGetProcAddress opengl
Cc: Ticket locked: no


On my highly modified FC1 system with a 2.4.22 kernel and nvidia 6111 video drivers where I've been running svn builds on a regular basis, I get a compile error with svn 14639:

ccache g++ -o mythtv main.o -L/usr/lib/qt-3.3/lib -L../../libs/libmyth -L../../libs/libmythtv -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat -L../../libs/libmythfreemheg -L../../libs/libmythui -L../../libs/libmythupnp -L../../libs/libmythlivemedia -lmythtv-0.20 -lmythavformat-0.20 -lmythavutil-0.20 -lmythavcodec-0.20 -lmythfreemheg-0.20 -lmythupnp-0.20 -lmythlivemedia-0.20 -lmyth-0.20 -lmythui-0.20 -lfreetype -lmp3lame -lasound -L/usr/lib -lartsc -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lraw1394 -liec61883 -lavc1394 -lrom1394 -ldirectfb -lfusion -ldirect -lz -ldl -L/usr/X11R6/lib -lXinerama -lXv -lXxf86vm -lXrandr -lXvMCW -lXvMC -lqt-mt -lGLU -lGL -lXmu -lXext -lX11 -lm -lpthread ../../libs/libmythtv/ undefined reference to `glXGetProcAddress'

After some googling, I found this, wich suggests the solution -- I just don't know where in the code this change needs to be made to test it. Thread summary:

Problem: undefined reference to 'glXGetProcAddress()' with Nvidia OpenGL shared libraries

Solution: define GLX_GLXEXT_LEGACY to make the prototype for glXGetProcAddressARB() visible to the application, and use glXGetProcAddressARB instead of glXGetProcAddress

Attachments (1)

glx-procaddressARB-configure.diff (2.0 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk
Priority: majorminor

comment:2 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [14643]) Fixes #4064. Backport GLX 1.4 glXGetProcAddress support to 0.20-fixes.

Some GLX headers have removed GLX_ARB_get_proc_address in favor of the new GLX 1.4 glXGetProcAddress call, this backports the construction we use in trunk to use the correct glXGetProcAddress call, trying the GLX 1.4 version first, then the ARB version and finally the original GLX Extension.

comment:3 Changed 13 years ago by danielk

(In [14680]) Fixes #4078. Refs #4064. Fixes C++ scope error in [14643], a backport of glXGetProcAddress functionality from trunk.

comment:4 Changed 13 years ago by anon

Resolution: fixed
Status: closednew

Sadly this bug seems to have reemerged in 0.21 when using legacy nvidia drivers. From backend log on playing tv recorded already:

/usr/bin/mythfrontend.real: symbol lookup error: /usr/lib/ undefined symbol: glXGetProcAddress

comment:5 Changed 13 years ago by danielk


(09:19:14) laga: i finally found our bug report.. (09:19:30) laga: danielk22: (09:19:43) laga: so it happens with version 1.0.7185

comment:6 Changed 13 years ago by laga+mythtv@…

As per the discussion with danielk, here's a small patch which adds a new configure flag: --enable-glx-procaddrarb. If you use this option, glXGetProcAddressARB will be used instead of glXGetProcAddress, effectively disabling auto detection for that. This option is only useful for package maintainers who want their packages to work with Nvidia's legacy driver or for people who need to build against broken Nvidia headers which advertise glXGetProcAddress although they don't support it.

Changed 13 years ago by anonymous

comment:7 Changed 13 years ago by danielk

(In [16877]) Refs #4064. Adds ability to create a special backward compatible MythTV get_gl_proc_address() on distros whose drivers all support glXGetProcAddressARB.

The ./configure option is not printed in help because it allows you to create a MythTV binary which won't run on your computer. But it is available for distro maintainers who wish to create a single binary that works with many GLX libs, which they are responsible for testing for compatibility with glXGetProcAddressARB().

Leaving ticket open for backport.

comment:8 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [16895]) Fixes #4064. Backports glXGetProcAddressARB change to 0.21-fixes.

Note: See TracTickets for help on using tickets.