Copy sys-devel/gdb-6.8.ebuild to some new dir, /usr/local/src/gdb do ebuild gdb-6.8.ebuild digest and then ebuild gdb-6.8.ebuild gdb doesn't build: Look in config.log and see: ac_cv_env_CFLAGS_value=' -O2 -pipe' Notice the extra spacing. This extra spacing breaks cross compiling gdb to powerpc(and I suspect native powerpc to): configure: configuring in ppc configure: running /bin/sh '../.././sim/ppc/configure' --prefix=/usr '--cache-file=./config.cache' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-werror' '--with-system-readline' '--disable-nls' '--program-transform-name=s,y,y,' '--build=i686-pc-linux-gnu' '--host=powerpc-softfloat-linux-gnu' '--target=powerpc-softfloat-linux-gnu' '--srcdir=.././sim' 'CC=powerpc-softfloat-linux-gnu-gcc' 'CFLAGS=-O2 -pipe' 'LDFLAGS=' 'build_alias=i686-pc-linux-gnu' 'host_alias=powerpc-softfloat-linux-gnu' 'target_alias=powerpc-softfloat-linux-gnu' --cache-file=.././config.cache --srcdir=../.././sim/ppc configure: loading cache .././config.cache configure: error: `CFLAGS' has changed since the previous run: configure: former value: -O2 -pipe configure: current value: -O2 -pipe configure: error: changes in the environment can compromise the build configure: error: run `make distclean' and/or `rm .././config.cache' and start over configure: error: /bin/sh '../.././sim/ppc/configure' failed for ppc make[1]: *** [configure-sim] Error 1 make[1]: Leaving directory `/usr/local/src/TM-fs/trunk/portage/tmp/portage/sys-devel/gdb-6.8/work/gdb-6.8' make: *** [all] Error 2 The extra spacing is present when compiling native x86 too but does not break gdb. Reproducible: Always
post the full build log as an attachment i build gdb natively on ppc just fine, so i doubt it's a ppc bug also post emerge info from the environment you're using to cross-compile
Just before I went home I found something. If I copied /usr/portage/eclass/flag-o-matic.eclass my private $PORTAGE_CONFIGROOT/eclass, the problem with extra spaces went away. Seems like ebuild needs to find a eclass/ relative the sys-devel/gdb/gdb-6.8.ebuild Note that the spaces are there even if i don't set $PORTAGE_CONFIGROOT but copy the gdb-6.8.ebuild to a private directory, but then it doesn't break the build though. If you still need more info I can get you that tmw.
Forgot about this one, it seems fairly clear to me that the ebuild command needs to find a eclass diretory that is relative to the package.ebuild and not relative PORTAGE_CONFIGROOT. I this the intended behaviour?
unfortunately, i cant reproduce this on my ppc and x86_64 system, i copied /usr/portage/sys-devel/gdb to /usr/local/src/gdb, and then went in there and built things up just fine no, i dont have a /usr/local/src/eclass dir