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"
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.
Created attachment 35444 [details, diff] torcs-1.2.2.ebuild-glfix.patch
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.
Is this still a problem? Works fine for me with nvidia-glx-1.0.5336-r2
no reply. WORKSFORME.
This still doesn't work for me. In case you missed it, this is a gcc-3.4 issue.
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)
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?
"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.
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"
Does this still occur with the latest nvidia-glx?
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.
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
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.
This DOES compile for me using the opengl-update xorg-x11, emerge torcs ; opengl-update nvidia method...
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
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.
Then assign it to us, silly. =P
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.
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.
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.)
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);
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.
Just to confirm, this is with: nvidia-glx-1.0.6629-r6 opengl-update-2.2.1
nvidia-glx-1.0.7667 also fails
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?
yes, just use the x11 headers, then switch back to the nvidia drivers when you play...
I don't have any problem with torcs 1.2.4, so, I think that this bug is fixed on recent versions.
yep, works for me as well. go ahead and reopen if this is still a problem.