Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 178877

Summary: x11-drivers/nvidia-drivers - NVIDIA_glx-defines.patch is no longer needed
Product: Gentoo Linux Reporter: Daniel Burr <dburr>
Component: New packagesAssignee: X11 External Driver Maintainers <x11-drivers>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: dburr
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Daniel Burr 2007-05-17 13:35:32 UTC
If I try to emerge nvidia-settings-1.0.20070302 or mplayer with the xv USE flag then compilation dies with an error saying that there are two typedefs for GLXPbufferSGIX.  This is indeed the case - it is defined in /usr/lib/opengl/nvidia/include/glxext.h as well as /usr/lib/opengl/nvidia/include/glx.h

This error occurs with nvidia-drivers-1.0.9755-r1 and nvidia-drivers-1.0.8776-r1

I assume that the NVIDIA_glx-defines.patch was required at some time in the past but it is no longer necessary as the problem has been fixed upstream.

Reproducible: Always

Steps to Reproduce:
1. emerge nvidia-drivers-1.0.9755-r1 or nvidia-drivers-1.0.8776-r1
2. eselect opengl set nvidia
2. Try to emerge nvidia-settings-1.0.20070302 or mplayer with USE="xv xvmc"

Actual Results:  
Compile error due to two typedefs for GLXPbufferSGIX

Expected Results:  
Compile completes successfully
Comment 1 Nils Larsson 2007-05-17 15:24:50 UTC
I cannot reproduce this using
x11-drivers/nvidia-drivers-1.0.9755-r1

$ eselect opengl list
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11

nvidia-settings-1.0.20070302 compiled fine, have not tried compiling mplayer thou, but xine-lib compiled successfully with both the "xv" and "xvmc" USE-flags.
Comment 2 Daniel Burr 2007-05-18 02:30:18 UTC
Where do your /usr/include/GL/glx.h and /usr/include/GL/glxext.h symlinks point to?  Do they both point to the nvidia version, or does one point to the nvidia version and the other to the global version?
Comment 3 Daniel Burr 2007-07-20 15:25:38 UTC
I am still seeing this bug with media-video/mplayer-1.0.20070622-r1 and  x11-drivers/nvidia-drivers-1.0.9755-r1 .  emerge mplayer dies with:

In file included from /usr/X11R6/include/GL/glx.h:351,
                 from gl_common.h:16,
                 from vo_gl.c:14:
/usr/X11R6/include/GL/glxext.h:327: error: redefinition of typedef 'GLXPbufferSGIX'
/usr/X11R6/include/GL/glx.h:148: error: previous declaration of 'GLXPbufferSGIX' was here

I have looked through the mplayer source code and found that vo_gl.c is only built when configure is called with --enable-opengl (to be more precise, if nothing is specified it will be autodetected if neither --enable-opengl or --disable-opengl is specified).  The ebuild will enable this setting if the "opengl" USE flag is set.  Can you reproduce the bug if you emerge mplayer with the "opengl" USE flag?
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-02-15 16:06:14 UTC
neither I or the mplayer maintainer have been able to confirm or duplicate this ever.

Please use newer versions to retest.
Comment 5 Daniel Burr 2008-04-04 12:43:14 UTC
I am still seeing this with nvidia-drivers-169.09-r1, but I have made some progress in figuring out what is going on.

It turns out if I use add no include argument to gcc I can include glx.h without problems but if I use -I/usr/X11R6/include then I get the error - even though /usr/include/GL is a symlink to /usr/X11R6/include/GL!

The reason for this is that when the preprocessor (cpp) runs, it adds the special flags '3' to the output (see http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html#Preprocessor-Output) to indicate that "the following text comes from a system header file, so certain warnings should be suppressed".

It seems that files in /usr/X11R6/include are not flagged as system headers for some reason.