Hello. I have opengl-update-2.1.1 (this is important as it contains necessary headers to reproduce the bug) and xorg-x11-6.8.1.904. An attempt to install tuxracer ends with: checking for GL/gl.h... yes checking for GL/glx.h... no configure: error: Cannot find GL/glx.h This is the last strings in config.log: configure:4017: checking for GL/glx.h configure:4027: gcc -E -DTUXRACER_NO_ASSERT=1 -DTCL_HEADER=\<tcl.h\> -DHAVE_SDL=1 -DHAVE_SDL_MIXER=1 conftest.c >/dev/null 2>con ftest.out In file included from /usr/include/GL/glx.h:117, from configure:4023: /usr/include/GL/glxext.h:355:2: warning: #warning "int32_t and int64_t are undefined!" configure: failed program was: #line 4022 "configure" #include "confdefs.h" #include <GL/glx.h> Looking into the source /usr/lib/opengl/global/include/glxext.h we can find this #if proprocessor directive: #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L [snip] #else #warn "int32_t and int64_t are undefined!" #endif From here: http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/cpp/predefined-macros.html I know that cpp should define this directive. I've wrote this small program (I'm hope you forgot me that I have not attached it as a file. I wanted it to be in front of my eyes.): #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #include <inttypes.h> #else #warning "int32_t and int64_t are undefined!" #endif #include <stdio.h> int main(){ #if defined(__STDC_VERSION__) long l= __STDC_VERSION__ ; printf ("stdlibrary version is %ld",l); #endif return 0; } compilation this program produce that warning: hello.c:6:2: warning: #warning "int32_t and int64_t are undefined!" There is nothing on output of this program. So I thing cpp does not have such macros... Why? Thank you for your attention, _________ Peter. Reproducible: Always Steps to Reproduce: Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686) ================================================================= System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System version 1.6.9 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 22:53:03)] distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -mcpu=pentium4" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /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/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -mcpu=pentium4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://ftp.citkit.ru/pub/Linux/gentoo/ ftp://mirror.gentoo.ru/pub/mirror/gentoo/ http://ftp.du.se/pub/os/gentoo ftp://ftp.du.se/pub/os/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirror.pudas.net/gentoo" LANG="ru_RU.UTF-8" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl alsa arts audiofile avi bluetooth cdparanoia crypt cups dga divx4linux dvd dvdread encode erandom extensions flac gif gimpprint glut gnokii gnome gtk gtk2 hal howl imlib irda java jce jpeg kde lirc mad mikmod mmx mng mozilla mpeg mppe-mppc nls nomotif nptl oggvorbis opengl pam pdflib pic plotutils png povray python qt quicktime readline real rtc samba sdl slp sms speex spell sse sse2 ssl svg tetex tiff truetype unicode wifi wmf xml xml2 xmms xprint xscreensaver xv xvid zlib linguas_ru" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Can confirm that here on amd64. You can get displayed the predefines if you add "-g3" in preprocessing, e.g. gcc -E -g3 foo.c In the meantime, try ppracer ....
Try adding -std=c99 to your CFLAGS. Does that fix it? int32_t and int64_t are C99 additions and are not in ANSI C. But still, it should work without that workaround. Please provide your whole config.log.
Created attachment 50984 [details] This is config.log without -std=c99 in CFLAGS.
Created attachment 50985 [details] This is config.log with -std=c99 in CFLAGS.
If I add -std=c99 option to my gcc then I can see no warnings in my test program. But as you can see from config.log.c99 (with std=c99) in CFLAGS I don't know why ./configure do not passes them into checking of headers. So the problem persists. BTW. This not only tuxracer's problem. If I try to compile any opengl application (xscreensaver for example) it can not see opengl in my system and disables it. Tuxracer is the program that can not work at all without opengl. Peter.
that's weird... there should be alot more in the config.log than that... I'll add tuxracer to my emerge queue and check it out myself... this is a weird one...
ok, using nvidia works here. corg-x11 causes the same problem... I wonder why the rest of th eprogram isn't displayed in the config.log... oddness... This change works for me, can you verify it works for you, too. Change the #warning "no int32_t" line to: #include <inttypes.h>
Ok, I changed glxext.h to always include inttypes.h since we can't rely on callers to have included it first.
Ok. This solution works. Now I can compile tuxracer. But this is workaround. And it does not fix the problem with cpp... The question(may be to myself): "Why gentoo does not have such macros?" still exists.
It's not a gentoo thing. It's a C standards thing. gcc doesn't assume C99 by default.