When cross-compiling qt 4 for embedded, compiling fails due to several reasons: 1) the ebuild does not detect the target byte order correctly: Unknown byte order! The target system byte order could not be detected! Turn on verbose messaging (-v) to see the final report. You can use the -little-endian or -big-endian switch to ./configure to continue. * ERROR: x11-libs/qt-core-4.6.2 failed: * ./configure failed 2) If patching the ebuild to manually select the according byte order by appending "-little-endian -host-little-endian -verbose -continue", qmake fails to build qt, since the qmake-binary is generated for ARM, which cannot be executed on the host platform. Reproducible: Always Steps to Reproduce: 1. emerge crossdev 2. crossdev -t armv7l-none-linux-gnueabi 3. emerge-wrapper --init 4. USE="-glib" armv7l-none-linux-gnueabi-emerge qt-core Actual Results: /usr/armv7l-none-linux-gnueabi/tmp/portage/x11-libs/qt-core-4.6.2-r1/temp/environment: line 615: /usr/armv7l-none-linux-gnueabi/tmp/portage/x11-libs/qt-core-4.6.2-r1/work/qt-everywhere-opensource-src-4.6.2/bin/qmake: No such file or directory * ERROR: x11-libs/qt-core-4.6.2-r1 failed: * qmake failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3438: Called qt4-build_src_compile * environment, line 3089: Called build_directories 'src/tools/bootstrap' 'src/tools/moc' 'src/tools/rcc' 'src/tools/uic' 'src/corelib' 'src/xml' 'src/network' 'src/plugins/codecs' 'tools/linguist/lconvert' 'tools/linguist/lrelease' 'tools/linguist/lupdate' * environment, line 615: Called die * The specific snippet of code: * "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"; * * If you need support, post the output of 'emerge --info =x11-libs/qt-core-4.6.2-r1', * the complete build log and the output of 'emerge -pqv =x11-libs/qt-core-4.6.2-r1'. * The complete build log is located at '/usr/armv7l-none-linux-gnueabi/tmp/portage/x11-libs/qt-core-4.6.2-r1/temp/build.log'. * The ebuild environment file is located at '/usr/armv7l-none-linux-gnueabi/tmp/portage/x11-libs/qt-core-4.6.2-r1/temp/environment'. * S: '/usr/armv7l-none-linux-gnueabi/tmp/portage/x11-libs/qt-core-4.6.2-r1/work/qt-everywhere-opensource-src-4.6.2' Portage 2.1.7.17 (embedded, gcc-4.4.3, glibc-2.11-r1, 2.6.31-14-generic i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.31-14-generic-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1 Timestamp of tree: Wed, 17 Feb 2010 08:30:01 +0000 app-shells/bash: 4.1_p2 dev-lang/python: 2.6.4-r1, 3.1.1-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.65 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc: 3.4.6-r2, 4.3.4, 4.4.3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.32 ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -pipe -fomit-frame-pointer -I/usr/armv7l-none-linux-gnueabi/usr/include/ -I/usr/armv7l-none-linux-gnueabi/include/" CHOST="armv7l-none-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo" CXXFLAGS="-Os -pipe -fomit-frame-pointer -I/usr/armv7l-none-linux-gnueabi/usr/include/ -I/usr/armv7l-none-linux-gnueabi/include/" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="" LDFLAGS="-L/usr/armv7l-none-linux-gnueabi/lib -L/usr/armv7l-none-linux-gnueabi/usr/lib" LINGUAS="en" MAKEOPTS="-j4" PKGDIR="/usr/armv7l-none-linux-gnueabi/packages/" PORTAGE_CONFIGROOT="/usr/armv7l-none-linux-gnueabi/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/usr/armv7l-none-linux-gnueabi/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bindist kdrive make-symlinks minimal modules multicall zlib" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Thanks for your report. It looks like this will need some work. We will look into it.
I have essentially the same problem, but on multilib-portage. The problem in this bug is that qmake is built with the CHOST's gcc. Well, it is also built partially using the CHOST's CFLAGS/CXXFLAGS which is a problem because the user may have to pass certain CFLAGS specific to the CHOST toolchain which would cause an error if passed to the CBUILD toolchain (the toolchain that the buildtime-only qmake should be built with). CFLAGS/CXXFLAGS are _only_ ignored for the linking command when they should be ignored for the whole building of qmake, which causes a failure on portage-multilib.
Created attachment 259569 [details] qt-core-4.6.3-build.log
Created attachment 259571 [details] emerge--info.txt
*** This bug has been marked as a duplicate of bug 327827 ***