When I try to emerge mpg123 the compile fails. I am using portage with distcc on ppc, and a distcc server on athlon, with a cross compiler. The athlon requires a fully qualified gcc, to ensure it uses the cross compiler rather than the native compiler. The mpg123 makefile contains an explicit reference to "gcc", so the distcc server invokes the wrong compiler, causing the error. This will affect all platforms using distcc with multiple architectures. A simple fix is to adjust the mpg123-0.59r-r1 ebuild with: 26,28d25 < # ensure compilation on cross platform distc configs... < # ...and borks the Makefile in the process < -e "s:gcc:${CHOST}-gcc:" \ But this makes a real mess of mpg123's Makefile. A better solution would modify only the necessary part of the Makefile. Reproducible: Always Steps to Reproduce: 1. Attempt to emerge mpg123 with distcc enabled and a cross compiling distcc server 2. File bug 3. Actual Results: Compilation fails, due to incorrect binary format. Expected Results: Compiled. Portage 2.0.46-r12 (default-ppc-1.4, gcc-3.2.1, glibc-2.3.1-r2) ================================================================= System uname: 2.4.20-r1 ppc GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/kde/3.1/share/config:/usr/kde/3/share/config:/usr/kde/3/share/config:/opt/glftpd/etc:/usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="oss dvd xv libwww jpeg nls mitshm gif gnome kde mozilla png truetype ppc gnome-libs gdbm berkdb slang readline arts guile X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gtk qt motif opengl" COMPILER="gcc3" CHOST="powerpc-unknown-linux-gnu" CFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -mmultiple -mstring" CXXFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -mmultiple -mstring" ACCEPT_KEYWORDS="ppc" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="ccache distcc"
Created attachment 9332 [details, diff] Removes CC=gcc from the Makefile. This patch removes the CC=gcc references from the Makefile. Any line that has CC=cc or some other compiler is not touched by this patch.
Created attachment 9333 [details] ebuild This ebuild applies the Makefile patch.
This is what I have done on my machines. With this patch applied CC can be specified on the command line. CC=i686-pc-linux-gnu-gcc emerge mpg123 This will now allow use the full name for the local compiler so the remote distccd uses the correct compiler.
This patch has been added to portage as -r2. It looks great.