Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57071 - nvidia opengl headers break torcs compilation
Summary: nvidia opengl headers break torcs compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 80983
  Show dependency tree
 
Reported: 2004-07-14 14:42 UTC by Kathy Wills
Modified: 2005-12-29 09:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
torcs-1.2.2-glfix.patch (torcs-1.2.2-glfix.patch,501 bytes, patch)
2004-07-14 19:05 UTC, Patrick Dawson (RETIRED)
Details | Diff
torcs-1.2.2.ebuild-glfix.patch (torcs-1.2.2.ebuild-glfix.patch,325 bytes, patch)
2004-07-14 19:06 UTC, Patrick Dawson (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Wills 2004-07-14 14:42:56 UTC
There are a lot of warning errors with this ebuild about command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++. That is not where it fails though.

Reproducible: Always
Steps to Reproduce:
1.emerge torcs
2.
3.

Actual Results:  
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC
but not for C++
grmultitexstate.cpp: In member function `virtual void grMultiTexState::apply(int)':
grmultitexstate.cpp:30: error: `GL_TEXTURE0_ARB' undeclared (first usethis function)
grmultitexstate.cpp:30: error: (Each undeclared identifier is reportedonly once
for each function it appears in.)
grmultitexstate.cpp:30: error: `glActiveTextureARB' undeclared (first use this
function)
grmultitexstate.cpp:34: error: `GL_TEXTURE1_ARB' undeclared (first usethis function)
grmultitexstate.cpp:40: error: `GL_TEXTURE2_ARB' undeclared (first usethis function)
grmultitexstate.cpp:44: error: `GL_TEXTURE3_ARB' undeclared (first usethis function)
make[5]: *** [grmultitexstate.o] Error 1
make[5]: Leaving directory
`/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic/ssggraph'
make[4]: *** [subdirs] Error 1
make[4]: Leaving directory
`/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic'
make[3]: *** [subdirs] Error 1
make[3]: Leaving directory
`/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2'
make: *** [restart] Error 2

!!! ERROR: games-sports/torcs-1.2.2 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! (no error message)

Expected Results:  
I expected it to compile.

Portage 2.0.50-r9 (default-x86-1.4, gcc-3.4.1, glibc-2.3.4.20040619-r0,
2.6.7-rc3-love2)
=================================================================
System uname: 2.6.7-rc3-love2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.5.1
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -mtune=i686 -O2 -funroll-loops -pipe -fno-unit-at-a-time"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/kde/cvs/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mtune=i686 -O2 -funroll-loops -pipe -fno-unit-at-a-time"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/
http://mirror.clarkson.edu/pub/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main
/usr/local/bmg-gnome-current"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb cdr crypt cups doc encode esd foomaticdb gdbm
gif gimp gimp-print gphoto2 gtk gtk2 imlib java jpeg kde libg++libwww mad mikmod
motif mozilla mpeg ncurses nls nptl oggvorbis opengloss pam pdflib perl png
python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tetex
truetype x86 xml2 xmms xv zlib"
Comment 1 Patrick Dawson (RETIRED) gentoo-dev 2004-07-14 19:05:53 UTC
Created attachment 35443 [details, diff]
torcs-1.2.2-glfix.patch

Adds the missing OpenGL header. I could only test with nVidia, so let me know
of any problems with other GL implementations.
Comment 2 Patrick Dawson (RETIRED) gentoo-dev 2004-07-14 19:06:34 UTC
Created attachment 35444 [details, diff]
torcs-1.2.2.ebuild-glfix.patch
Comment 3 Kathy Wills 2004-07-14 20:07:51 UTC
Thanks. Since I use Nvidia, it worked for me. It sure was nice to have the patch for the ebuild as most of the time I have to add the epatch info to ebuilds by trial and error.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-09-09 02:08:46 UTC
Is this still a problem?  Works fine for me with nvidia-glx-1.0.5336-r2
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2004-09-21 22:38:21 UTC
no reply.  WORKSFORME.
Comment 6 Patrick Dawson (RETIRED) gentoo-dev 2004-09-22 07:14:35 UTC
This still doesn't work for me. In case you missed it, this is a gcc-3.4 issue.
Comment 7 Disenchanted (RETIRED) gentoo-dev 2004-09-23 12:41:24 UTC
opengl-update xorg-x11 && emerge torcs && opengl-update nvidia (or ati)

is a common problem, if that is NOT helping then the system is on your system, not the ebuild

i just merged it using gcc-3.4.2-r2 w/o a hitch

closing again

if the above opengl-update does help, leave a note here and i find out if this can be done in the ebuild, if not i will add an einfo to ebuild regarding the issue (like it is the case in other ebuilds)

Comment 8 Patrick Dawson (RETIRED) gentoo-dev 2004-09-23 13:22:55 UTC
Does my patch break something on your system? Otherwise, why not include it so you can compile against the NVIDIA headers? I don't know why you closed this as FIXED if it's still a problem with people using NVIDIA's OpenGL. Is there something I'm missing here?
Comment 9 Martin Stubenschrott 2004-09-28 11:25:35 UTC
"opengl-update xorg-x11 && emerge torcs && opengl-update nvidia"

worked for me, thank you very much for the tip, but there definitely should be a tip before installing, because without this bug report i never would have found it out, how it works.
Comment 10 Kathy Wills 2004-10-06 17:15:46 UTC
No, Patrick, your patch doesn't work anymore. The only way to get it to compile now is to do the "opengl-update xorg-x11 && emerge torcs && opengl-update nvidia"
Comment 11 Andrew Bevitt 2004-11-29 17:48:25 UTC
Does this still occur with the latest nvidia-glx?
Comment 12 Kathy Wills 2004-11-30 02:00:55 UTC
My video card is one of the ones that doesn't work with the latest nvidia drivers. So I can't test it to see.
Comment 13 Andrew Bevitt 2004-12-10 17:13:28 UTC
OK try out this patch (it will work with both versions of the nvidia drivers in portage at the moment)
http://dev.gentoo.org/~cyfred/tmp/torcs-1.2.2-gl-defines.patch
Comment 14 Dave Andruczyk 2005-01-17 11:41:34 UTC
This is broken on my system with gcc-3.3.5 and nvidia.. Different errors though then original report:

++ -I/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/export/include  -mcpu=athlon-mp -O2 -pipe -Wall -Wstrict-prototypes -O3 -mieee-fp -Wall -Wstrict-prototypes -O3 -mieee-fp  -D_SVID_SOURCE -D_BSD_SOURCE -DSHM  -c grmultitexstate.cpp
grmultitexstate.cpp: In member function `virtual void 
   grMultiTexState::apply(int)':
grmultitexstate.cpp:30: error: `glActiveTexture' undeclared (first use this 
   function)
grmultitexstate.cpp:30: error: (Each undeclared identifier is reported only 
   once for each function it appears in.)
distcc[14573] ERROR: compile grmultitexstate.cpp on localhost failed
make[5]: *** [grmultitexstate.o] Error 1
make[5]: Leaving directory `/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic/ssggraph'
make[4]: *** [subdirs] Error 1
make[4]: Leaving directory `/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic'
make[3]: *** [subdirs] Error 1
make[3]: Leaving directory `/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/scratch/tmp/portage/torcs-1.2.2/work/torcs-1.2.2'
make: *** [restart] Error 2

!!! ERROR: games-sports/torcs-1.2.2 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

Comment 15 Dave Andruczyk 2005-01-30 19:50:27 UTC
This DOES compile for me using the opengl-update xorg-x11, emerge torcs ; opengl-update nvidia method...

Comment 16 Philippe Vo cong tri 2005-02-23 02:32:13 UTC
It works for me too, without applying a patch.
opengl-update xorg-x11 && emerge torcs && opengl-update nvidia

I still have the gcc version 3.3.5(Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1
Comment 17 Mr. Bones. (RETIRED) gentoo-dev 2005-02-23 07:32:26 UTC
yes we know.  that is a fairly common work-around but it's a work around.  we don't want to require that be done to build opengl games.

X11 guys - it would be great if you guys could fix this on your end.  There are a number of games that fail to compile with the nvidia headers with errors that are similar to these.  I don't think patching them all is reasonable since at least the xorg-x11 header files seem to provide what is required to compile.
Comment 18 Donnie Berkholz (RETIRED) gentoo-dev 2005-02-23 07:57:53 UTC
Then assign it to us, silly. =P
Comment 19 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-27 15:14:41 UTC
can you please try with nvidia-glx-1.0.7174-r3?  It now uses the global (standardized) glext.h and glxext.h headers instead of the per-implementation ones.
Comment 20 Jeremy Huddleston (RETIRED) gentoo-dev 2005-05-03 12:05:21 UTC
ok, I'm closing this as there's no response, and starting with opengl-update-2.2, we don't use nvidia's bundled glext.h and glxext.h.  Please reopen if there are still issues using that version.
Comment 21 Mr. Bones. (RETIRED) gentoo-dev 2005-05-15 00:00:58 UTC
still fails with opengl-update-2.2.1 and nvidia-glx-1.0.6629-r1:

grmultitexstate.cpp: In member function `virtual void
   grMultiTexState::apply(int)':
grmultitexstate.cpp:30: error: `glActiveTexture' undeclared (first use this
   function)
grmultitexstate.cpp:30: error: (Each undeclared identifier is reported only
   once for each function it appears in.)
Comment 22 Jeremy Huddleston (RETIRED) gentoo-dev 2005-05-15 00:30:26 UTC
Please:

ls -l /usr/include/GL/glext.h 

It should point to /usr/lib/opengl/global/include/glext.h which should have it defined:

$ grep glActiveTexture /usr/include/GL/*
/usr/include/GL/glext.h:GLAPI void APIENTRY glActiveTexture (GLenum);
/usr/include/GL/glext.h:GLAPI void APIENTRY glActiveTextureARB (GLenum);

Comment 23 Mr. Bones. (RETIRED) gentoo-dev 2005-05-15 09:16:00 UTC
lrwxrwxrwx  1 root root 38 May 15 02:15 /usr/include/GL/glext.h -> /usr/lib/opengl/global/include/glext.h

$ grep glActiveTexture /usr/include/GL/*
/usr/include/GL/glext.h:GLAPI void APIENTRY glActiveTexture (GLenum);
/usr/include/GL/glext.h:GLAPI void APIENTRY glActiveTextureARB (GLenum);

Yes and yes.
Comment 24 Mr. Bones. (RETIRED) gentoo-dev 2005-05-17 00:02:39 UTC
Just to confirm, this is with:
nvidia-glx-1.0.6629-r6
opengl-update-2.2.1
Comment 25 SpanKY gentoo-dev 2005-07-16 23:37:35 UTC
nvidia-glx-1.0.7667 also fails
Comment 26 Jordan Thoms 2005-10-03 23:03:41 UTC
Happened for me too, nvidia card.

Using the opengl-update method, but will I still get hardware acceleration in
this game if i use that workaround?
Comment 27 Jeremy Huddleston (RETIRED) gentoo-dev 2005-10-03 23:14:14 UTC
yes, just use the x11 headers, then switch back to the nvidia drivers when you
play... 
Comment 28 Pacho Ramos gentoo-dev 2005-12-29 05:07:05 UTC
I don't have any problem with torcs 1.2.4, so, I think that this bug is fixed on recent versions.
Comment 29 Mr. Bones. (RETIRED) gentoo-dev 2005-12-29 09:01:11 UTC
yep, works for me as well.

go ahead and reopen if this is still a problem.