Yet another one of these... getting to be an expert at getting hit by them. The makefiles hardcode CC and CXX to use "gcc" and "g++", ignoring the compiler specified by the CC and CXX environment variables. This breaks compilation on a distcc setup with different architecture needing cross-compilers (so the full compiler name is required... i686-pc-linux-gnu-gcc in my case instead of just "gcc"). Anyway, doxygen uses autoconf but not automake, so unlike typical "./configure" cases the CC and CXX variables in the makefiles don't get updated by the configure script. The build still uses these variables so it isn't a big deal to fix, just need to supply it on the call to make. Reproducible: Sometimes Steps to Reproduce: 1. get a weird distcc cluster like mine composed of incompatible architectures (I have a Pentium II running Gentoo Linux, a PowerMac G3 running Gentoo/PPC, and an Athlon running Windows 98 SE) 2. make sure ccache is cleared (wouldn't want to reuse old .o's which could -hide- the bug) 3. make sure distcc is enabled 4. make sure the distcc hosts contain all the hosts from the setup, and that your MAKEOPTS contain a -j# big enough to get spreaded on all machines (won't change a thing if it all gets compiled locally) 5. emerge doxygen Actual Results: The build failed when the PowerMac G3 tried to compile something (don't remember what the error message was about, probably unrecognized switches since the native PowerMac G3 gcc doesn't understand -mcpu=i686 and so on). Expected Results: Buy issuing compilation using i686-pc-linux-gnu-gcc and i686-pc-linux-gnu-g++ instead of gcc and g++, distcc would have been able to select the right cross compiler on the distcc hosts. fguimond@salamander fguimond $ emerge info Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r5) ================================================================= System uname: 2.4.22-gentoo-r5 i686 Pentium II (Deschutes) Gentoo Base System version 1.4.3.10 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=pentium2 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=pentium2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="ftp://gentoo.noved.org/ http://gentoo.noved.org/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="3ds X alsa apm arts avi berkdb caps cdr cjk crypt cscope cups dvd encode esd faad foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imlib java jpeg justify kde lcms ldap libg++ libwww mad matroska mikmod mmx mng mozilla moznoirc mpeg nas ncurses nls oggvorbis openal opengl oss pam pdflib perl pic png ppds python qt quicktime readline samba sdk sdl slp speex ssl tcltk tcpd tiff truetype v4l vim-with-x wmf x86 xml xml2 xmms xv xvid zlib video_cards_radeon"
Created attachment 25121 [details, diff] fix to latest stable ebuild
is this still an issue? can you post an error?
I'm not sure I understand your question... nothing was done to fix this since I posted it with my proposed patch so of course it's still an issue. :/ But since you wanted to see the error for yourself, here goes (as you can see, it calls distcc with 'g++' instead of 'i686-pc-linux-gnu-g++' which is in the CXX environment variable, which makes it fail on the PowerMac G3 who's plain g++ doesn't understand -mcpu=pentium2.. I thought my original post was clear, but as a note again, in order to get distcc to work across different architectures, the fully qualified compiler name must be used, not just "gcc" or "g++", otherwise it doesn't know which cross-compiler to use): salamander root # emerge -Bv doxygen Calculating dependencies ...done! >>> emerge (1 of 1) app-doc/doxygen-1.3.5 to / >>> md5 src_uri ;-) doxygen-1.3.5.src.tar.gz >>> Unpacking source... >>> Unpacking doxygen-1.3.5.src.tar.gz to /var/tmp/portage/doxygen-1.3.5/work >>> Source unpacked. qt Autodetected platform linux-g++... Checking for Qt... headers /usr/qt/3/include, libraries /usr/qt/3/lib Checking for GNU make tool... using /usr/bin/gmake Checking for GNU install tool... using /usr/bin/install Checking for dot (part of GraphViz)... using /usr/bin/dot Checking for perl... using /usr/bin/perl Created Makefile from Makefile.in... Created qtools/Makefile from qtools/Makefile.in... Created src/Makefile from src/Makefile.in... Created examples/Makefile from examples/Makefile.in... Created doc/Makefile from doc/Makefile.in... Created addon/doxywizard/Makefile from addon/doxywizard/Makefile.in... Created addon/doxmlparser/src/Makefile from addon/doxmlparser/src/Makefile.in... Created addon/doxmlparser/test/Makefile from addon/doxmlparser/test/Makefile.in... Created addon/doxmlparser/examples/metrics/Makefile from addon/doxmlparser/examples/metrics/Makefile.in... Created libpng/Makefile from libpng/Makefile.in... Created libmd5/Makefile from libmd5/Makefile.in... Created qtools/qtools.pro from qtools/qtools.pro.in... Created src/libdoxygen.pro from src/libdoxygen.pro.in... Created src/libdoxycfg.pro from src/libdoxycfg.pro.in... Created src/doxygen.pro from src/doxygen.pro.in... Created src/doxytag.pro from src/doxytag.pro.in... Created addon/doxywizard/doxywizard.pro from addon/doxywizard/doxywizard.pro.in... Created addon/doxmlparser/src/doxmlparser.pro from addon/doxmlparser/src/doxmlparser.pro.in... Created addon/doxmlparser/test/xmlparse.pro from addon/doxmlparser/test/xmlparse.pro.in... Created addon/doxmlparser/examples/metrics/metrics.pro from addon/doxmlparser/examples/metrics/metrics.pro.in... Created libpng/libpng.pro from libpng/libpng.pro.in... Created libmd5/libmd5.pro from libmd5/libmd5.pro.in... Generating src/lang_cfg.h... echo "char versionString[]=\"1.3.5\";" > src/version.cpp /usr/bin/gmake -C qtools gmake[1]: Entering directory `/tmp/portage/doxygen-1.3.5/work/doxygen-1.3.5/qtools' env TMAKEPATH=/var/tmp/portage/doxygen-1.3.5/work/doxygen-1.3.5/tmake/lib/linux-g++ /usr/bin/perl /var/tmp/portage/doxygen-1.3.5/work/doxygen-1.3.5/tmake/bin/tmake qtools.pro >Makefile.qtools /usr/bin/gmake -f Makefile.qtools all gmake[2]: Entering directory `/tmp/portage/doxygen-1.3.5/work/doxygen-1.3.5/qtools' g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qbuffer.o qbuffer.cpp g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qcollection.o qcollection.cpp g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qcstring.o qcstring.cpp g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qdatastream.o qdatastream.cpp g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qdatetime.o qdatetime.cpp g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qdir.o qdir.cpp distcc[6668] ERROR: compile on 192.168.100.1 failed g++ -c -pipe -DQT_NO_CODECS -DQT_LITE_UNICODE -Wall -W -fno-exceptions -mcpu=pentium2 -O2 -pipe -I. -o ../objects/qfile.o qfile.cpp distcc[6676] ERROR: compile on 192.168.100.1 failed cc1plus: bad value (pentium2) for -mcpu= switch distcc[6647] ERROR: compile on 192.168.100.1 failed gmake[2]: *** [../objects/qcollection.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... distcc[6678] ERROR: compile on 192.168.100.1 failed distcc[6673] ERROR: compile on 192.168.100.1 failed cc1plus: bad value (pentium2) for -mcpu= switch distcc[6649] ERROR: compile on 192.168.100.1 failed gmake[2]: *** [../objects/qdatastream.o] Error 1 cc1plus: bad value (pentium2) for -mcpu= switch distcc[6655] ERROR: compile on 192.168.100.1 failed gmake[2]: *** [../objects/qdatetime.o] Error 1 gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/tmp/portage/doxygen-1.3.5/work/doxygen-1.3.5/qtools' make: *** [all] Error 2 !!! ERROR: app-doc/doxygen-1.3.5 failed. !!! Function src_compile, Line 45, Exitcode 2 !!! "emake all" failed. salamander root # cc1plus: bad value (pentium2) for -mcpu= switch distcc[6648] ERROR: compile on 192.168.100.1 failed
This is an upstream problem. See bug 29558 for discussion of explicit gcc version calling. My suggestion is to disable distcc for doxygen.
I agree with a lot in that discussion... it should be distcc's job to handle this , hopefully this will be true quickly enough (much simpler than fixing a bunch of ebuilds).