Compiling of pyopengl-2.0.1.09 fails with: i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -march=pentium4 -fomit-frame-pointer -fPIC -DGLX_PLATFORM -DNUMERIC -I/usr/include/python2.4 -I/usr/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.4/numarray -I/usr/include/python2.4/Numeric -I/usr/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.4/numarray -I/usr/include/python2.4/Numeric -c src/interface_util/interface_util.c -o build/temp.linux-i686-2.4/src/interface_util/interface_util.o In file included from /usr/include/python2.4/numarray/arrayobject.h:19, from src/interface_util/../config.h:162, from src/interface_util/interface_util.c:1: /usr/include/python2.4/numarray/arraybase.h:27: error: two or more data types in declaration specifiers /usr/include/python2.4/numarray/arraybase.h:27: warning: useless type name in empty declaration src/interface_util/interface_util.c: In function 'Numeric_PyObject_AsFloatArray': root@shark:/root(19)# emerge --info Portage 2.1.1_pre1-r2 (default-linux/x86/2006.0, gcc-4.1.1/hardened, glibc-2.4-r3, 2.6.17 i686) ================================================================= System uname: 2.6.17 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.12.1 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r2 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/sh are/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp.fi .muni.cz/pub/linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://gd.tuwien.ac.at/opsys/linux/gentoo ftp://sunsite.informatik. rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo http://gentoo.oregonstate.edu" LINGUAS="de fr" PKGDIR="/usr/portage/packages/All" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeou t=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X Xaw3d a52 aac acpi alsa ao aotuv apache2 apm arts asf atlas auctex audiofile automount avi berkdb bitmap-fonts blas bonobo bzip2 c airo cdda cddb cdf cdio cdparanoia cdr cgi cli corba crypt cups curl daap dbus devmap dga dlloader dri dvb dvd dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo evolution exif expat fam fame ffmpeg fftw fits flac fltk foomaticdb fortran fpx gdal gdbm geos gif gimp ginac glade glitz gml gmp gnome gnuplot gphoto2 gpm graphviz grass gs gsl gsm gstreamer gtk gtk2 guile hal hardened hddtemp hdf hdf5 hla pi icq id3 imagemagick imlib innodb ipv6 isdnlog jabber jbig john jp2 jpeg jpeg2k kde kexi lame lapack latex lcms ldap libg++ libgda libsampl erate libwww lirc lm_sensors lzo lzw mad math matroska mikmod mmx mmxext mng mod mono motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mp4live mpeg mpeg2 mplayer musicbrainz mysql mysqli nautilus ncurses netcdf network nfs nls nntp nptl nptlonly numarray numeric nvidia oc aml octave odbc ogdi ogg opengl oss pam pcre pdf pdflib perl plotutils plugin png posix postgres pppd proj python qhull qt quicktime readline real reflection reiserfs rhythmbox rle rrdcgi rrdtool samba sdl session slang slp smp sndfile snmp sox spell spl sqlite sse sse2 ssl subtitl es svg t1lib tcltk tcpd tetex theora tidy tiff truetype truetype-fonts type1-fonts udev unicode v4l2 video_cards_nv vorbis win32codecs wmf xe macs xext xine xml xml2 xmlreader xmlrpc xmms xorg xpm xv xvid xvmc zlib zvbi elibc_glibc input_devices_keyboard input_devices_mouse kernel_l inux linguas_de linguas_fr userland_GNU video_cards_vesa video_cards_fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS Regards Juergen
Created attachment 97687 [details, diff] hack This is a hack I'm using locally for the time being. The problem only occurs when you try to compile pyopengl when numarray is installed. GCC4 only. X11/Xlib.h gets installed which #defines Bool to int, then a numarray include does: typedef signed char Bool; which the GCC4 preprocessor changes to: typedef signed char int; which just makes no sense (you can't redefine int!) I'll hopefully contact numarray upstream about this in the next few days...
Hello, I'd just like to mention that now that gcc 4 is in stable, this compilation failure also concerns the stable tree (with numarray-1.3.1 and pyopengl-2.0.0.44). I hit this today while following the gcc upgrade guide on a (mostly) stable system. As this is in gnome dependencies (via pygtk if the opengl useflag is on), maybe it should be added to the gnome tracker (or better, fixed asap ! although I understand it may not be that easy if we need to refactor all numarray - or X !). > I'll hopefully contact numarray upstream about this in the next few days... Any news :-S ?
Both pyopengl and numarray are unmaintained upstream. numarray has been replaced by numpy which does not have this issue. However, porting an app from numarray to numpy isn't that straightfoward.
pyopengl failed on me with default i686 stage3 install i added echo "dev-python/numarray ~x86" >> /etc/portage/package.keywords re emerged it then re emerged python with USE="-tk" then emerge --resume and pyopengl compiled thought i might need to add this i'm kinda a noob to gentoo so i hope it helps
is this bug still valid with numarray-1.5.2?
Yes, opyopengl-2.0.1.09-r1 still fails with this: reating build/temp.linux-i686-2.4/src/interface_util i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -march=athlon-tbird -Os -pipe -fPIC -DGLX_PLATFORM -DNUMERIC -I/usr/include/python2.4 -I/usr/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.4/numarray -I/usr/include/python2.4/Numeric -I/usr/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.4/numarray -I/usr/include/python2.4/Numeric -c src/interface_util/interface_util.c -o build/temp.linux-i686-2.4/src/interface_util/interface_util.o In file included from /usr/include/python2.4/numarray/arrayobject.h:20, from src/interface_util/../config.h:163, from src/interface_util/interface_util.c:2: /usr/include/python2.4/numarray/arraybase.h:31: error: two or more data types in declaration specifiers /usr/include/python2.4/numarray/arraybase.h:31: warning: useless type name in empty declaration src/interface_util/interface_util.c: In function 'Numeric_PyObject_AsFloatArray': ... with numarray-1.5.2-r1 installed.
Ok, put pyopengl-3.0.0_beta1 in the tree. Since PyOpenGL-3.x uses ctypes instead of swig, this problem is fixed.