distcc cross compiling fails because the build system calls g++ directly. It also appears to add -pipe all by itself, which could be a problem for systems with little RAM. Leaving Severity at "normal" instead of setting "QA" because this makes compilation slow, which is particularly bad because of the size of the packages and the already long compile times. elmer ~ # ps waux|grep [h]ppa root 28046 0.8 0.0 4680 1188 pts/3 SN+ 18:37 0:00 /usr/hppa2.0-unknown-linux-gnu/gcc-bin/4.4.0/g++ -c -o qscriptvalue.o -O2 -pipe -mschedule=8000 -march=2.0 -g -ggdb -Wall -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/include -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/include/QtCore -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/corelib/global -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/script -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/script/qscriptvalue.cpp root 28047 95.7 2.3 55664 49440 pts/3 RN+ 18:37 0:06 /usr/libexec/gcc/hppa2.0-unknown-linux-gnu/4.4.0/cc1plus -quiet -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/include -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/include/QtCore -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/corelib/global -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/script -I/mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++ -D_GNU_SOURCE -DQMAKE_OPENSOURCE_EDITION -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /mnt/alt/portage/x11-libs/qt-core-4.5.1/work/qt-x11-opensource-src-4.5.1/src/script/qscriptvalue.cpp -D_FORTIFY_SOURCE=2 -quiet -dumpbase qscriptvalue.cpp -mschedule=8000 -march=2.0 -auxbase-strip qscriptvalue.o -g -ggdb -O2 -Wall -o - root 28048 1.1 0.1 5612 3688 pts/3 SN+ 18:37 0:00 /usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.4.0/../../../../hppa2.0-unknown-linux-gnu/bin/as -o qscriptvalue.o -
Created attachment 195957 [details] ps waux | grep [g]++
Oh, wait, it inserts CXXFLAGS twice...
I guess that inside build_directories() in qt4-build.eclass, qmake could be called with more arguments, for example QMAKE_CC, etc... have a look at what eqmake4 does.
Håvard commited a patch on qt4-build-edge eclass. @Qt members, if you use -9999 qt-modules, please try to rebuild them and verify that this patch fixes this issue Thanks :)
Ok as I understand there is nothing wrong with CC,CXX and cross-compilation. At least it works for me :) I am adjusting the title to be more specific about the actual error
No, sorry. It doesn't use hppa2.0-unknown-linux-gnu-g++, but g++ instead. The C*FLAGS duplication is a minor problem.
Created attachment 196372 [details, diff] respect CC/CXXflags Does the attached patch solves your issue?
jer, any updates?
Created attachment 199765 [details, diff] respect CC, CXX, LINK This patch implements a better approach: the relevant variables are passed to qmake, rather than being changed when emake is called. I just committed a similar patch to qting-edge overlay: http://github.com/gentoo-qt/qting-edge/commit/62d25aa94f9bd878717032f918a3c6d4766b520e
(In reply to comment #9) > Created an attachment (id=199765) [edit] > respect CC, CXX, LINK > > This patch implements a better approach: the relevant variables are passed to > qmake, rather than being changed when emake is called. > > I just committed a similar patch to qting-edge overlay: > http://github.com/gentoo-qt/qting-edge/commit/62d25aa94f9bd878717032f918a3c6d4766b520e > Indeed this patch seems much more better than the current approach. I will test it with live ebuilds Thanks Davide
Unfortunately my patch seems to introduce many regressions, please ignore it.
jer, can you please take a look at it now? I applied some patches in the meantime and now I'm able to cross-compile successfully from amd64 to x86, so I guess that your issue is fixed as well. Thanks much.
(In reply to comment #12) > jer, can you please take a look at it now? > > I applied some patches in the meantime and now I'm able to cross-compile > successfully from amd64 to x86, so I guess that your issue is fixed as well. To which repo did you apply those patches?
Ah, sorry, to gentoo-x86 :)
*** Bug 282984 has been marked as a duplicate of this bug. ***
Jeroen, ping? I'm marking this as fixed, based on comment #12 and no issues being reported since I pushed my fix. Reopen if the compilation still fails for you.