I amtrying to build PyQt4 on my up-to-date ~amd64 machine. I unmasked and installled sip-4.4.3, and copied the standard PyQt4 ebuild to my local overlay and added ~amd64 to KEYWORDS. When I try to merge PyQt, I get the following error: g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/X11R6/include -o translator.o translator.cpp translator.cpp:22:27: error: qplatformdefs.h: No such file or directory /usr/bin/moc -o moc_translator.cpp translator.h g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/X11R6/include -o moc_translator.o moc_translator.cpp translator.cpp: In member function 'bool Translator::load(const QString&, const QString&, const QString&, const QString&)': translator.cpp:425: error: 'O_RDONLY' was not declared in this scope translator.cpp:431: error: 'QT_OPEN' was not declared in this scope translator.cpp:433: error: aggregate 'stat st' has incomplete type and cannot be defined translator.cpp:434: error: 'fstat' was not declared in this scope make[1]: *** [translator.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/PyQt4-4.0_beta1/work/PyQt4-gpl-4.0beta1/pylupdate' make: *** [all] Error 2 !!! ERROR: dev-python/PyQt4-4.0_beta1 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile PyQt4-4.0_beta1.ebuild, line 48: Called die here is my emerge --info: Portage 2.1_rc4-r5 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.16-gentoo-r9 x86_64) ================================================================= System uname: 2.6.16-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.1 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] 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.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 X aac acl alsa atlas avi bash-completion berkdb bitmap-fonts blas bzip2 cairo cblas cdr cli crypt ctype cups doc dri dvd dvdr eds emboss encode examples f77 fftw firefox foomaticdb foomativdb fortran gif gimpprint gpm gstreamer gtk gtk2 hal imagemagick imap imlib isdnlog java jpeg jpeg2k kde lapack ldap lzw lzw-tiff mime mmap mozilla mozsvg mp3 mpeg multislot ncurses nptl nptlonly nsplugin opengl oss pam pcre pdf pdflib perl pic png ppds pppd python qt qt4 quicktime readline reflection rss sdl session spell spl ssl subversion svg symlink tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb winbind wxwindows xfs xinerama xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_ati video_cards_vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Do you have a /usr/share/qt4/mkspecs dir? Do you have a QMAKESPEC environment variable set? Does the contents of the QMAKESEC variable exist in /usr/share/qt4/mkspecs qplatformdefs.h is defined in that directory.
$ echo $QMAKESPEC linux-g++ $ ls /usr/share/qt4/mkspecs aix-g++ hpux-acc irix-g++-64 lynxos-g++ sco-g++ aix-g++-64 hpux-acc-64 linux-cxx macx-g++ solaris-cc aix-xlc hpux-acc-o64 linux-ecc-64 macx-pbuilder solaris-cc-64 aix-xlc-64 hpux-g++ linux-g++ macx-xcode solaris-g++ darwin-g++ hpux-g++-64 linux-g++-32 macx-xlc solaris-g++-64 default hpuxi-acc linux-g++-64 netbsd-g++ tru64-cxx features hpuxi-acc-64 linux-icc openbsd-g++ tru64-g++ freebsd-g++ hurd-g++ linux-kcc qconfig.pri unixware-cc freebsd-g++34 irix-cc linux-kylix qnx-g++ unixware-g++ freebsd-g++40 irix-cc-64 linux-lsb qws win32-g++ freebsd-icc irix-g++ linux-pgcc sco-cc
sorry, I didnt report the contents of linux-g++: $ ls /usr/share/qt4/mkspecs/linux-g++ qmake.conf qplatformdefs.h qplatformdefs.h also exists in my linux-g++-32 and linux-g++-64 directories
I just made an ebuild for the official PyQt4 release and successfully merged it. This bug report only applied to the beta release, so I think it should be closed as soon as PyQt4 makes it into the tree. (I'm not going to file a bug report for the official PyQt4 release, I'm sure the devs are aware of it. But a simple mod of the beta ebuild was all I needed to merge the official release.)
PyQt4 works for me on amd64, could ~amd64 please be added to the ebuild's keywords?
original fixed. request for stabilization is at 137948