Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217668 - ebuild adds extra spacing in CFLAGS which breaks building gdb
Summary: ebuild adds extra spacing in CFLAGS which breaks building gdb
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 15:55 UTC by Joakim Tjernlund
Modified: 2008-06-21 06:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2008-04-14 15:55:08 UTC
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
Comment 1 SpanKY gentoo-dev 2008-04-14 19:23:43 UTC
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
Comment 2 Joakim Tjernlund 2008-04-14 19:33:21 UTC
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.
Comment 3 Joakim Tjernlund 2008-04-19 16:11:50 UTC
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?
Comment 4 SpanKY gentoo-dev 2008-06-21 06:53:45 UTC
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