Transcode fails to configure properly after ebuild changes CFLAGS with confcaching enabled ( portage CVS ). Confirmed working with CONFCACHE turned off. FLAGS=-mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fno-pie -DDCT_YUV_PRECISION=1 configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. configure: loading cache /var/tmp/portage/transcode-0.6.11/temp/local_cache configure: error: `CFLAGS' has changed since the previous run: configure: former value: -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fno-pie configure: current value: -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fno-pie -DDCT_YUV_PRECISION=1 configure: error: changes in the environment can compromise the build configure: error: run `make distclean' and/or `rm /var/tmp/portage/transcode-0.6.11/temp/local_cache' and start over !!! Please attach the config.log to your bug report: !!! /var/tmp/portage/transcode-0.6.11/work/transcode-0.6.11/config.log in config.log > ## ----------- ## ## Core tests. ## ## ----------- ## configure:1498: loading cache /var/tmp/portage/transcode-0.6.11/temp/local_cache configure:1532: error: `CFLAGS' has changed since the previous run: configure:1534: former value: -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fno-pie configure:1536: current value: -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fno-pie -DDCT_YUV_PRECISION=1 configure:1555: error: changes in the environment can compromise the build configure:1557: error: run `make distclean' and/or `rm /var/tmp/portage/transcode-0.6.11/temp/local_cache' and start over Removing the directory and starting over doesn't work FEATURES="-confcache" emerge transocde does however. Talking to the portage developers on IRC they mentioned that a RESTRICT="noconfcache" might be added into portage. This could be used to get around this problem ( obviously not all packages will like confcache ). However it will be a while before that feature is added. I'll take a better look at the ebuild and see if I can spot the issue. kyoto transcode-0.6.11 # emerge info Portage 1.576-cvs (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10-hardened-r3 i686) ================================================================= System uname: 2.6.10-hardened-r3 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 5 2005, 02:36:29)] distcc: No such file or directory [disabled] ccache: No such file or directory [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="no" CFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig buildpkg ccache confcache digest distlocks parallel-fetch sandbox sfperms userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo ftp://gentoo.chem.wisc.org/gentoo" MAKEOPTS="-j2" PKGDIR="/home/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 3dnow X acpi alsa apm arts avi bash-completion berkdb bitmap-fonts bmp canna caps cdr cjk crypt curl dvd dvdr dvdread emboss encode esd ethereal f77 fam font-server foomaticdb fortran gdbm gif gpm gtk gtk2 imagemagick imap imlib ipv6 jpeg kde libg++ libwww lm_sensors mad maildir matroska mikmod mmx mono motif mp3 mpeg mysql ncurses nis nls nptl offensive oggvorbis openal opengl pam pdflib perl png posix python qt quicktime readline sdl spell sse ssl svg svga tcltk tcpd threads tiff truetype truetype-fonts type1-fonts wxwindows xml xml2 xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
It appears that this line in the ebuild is naughty. econf doesn't like changing CFLAGS on the command line. old code: # econf ${myconf} CFLAGS="${CFLAGS} -DDCT_YUV_PRECISION=1" || die My test: econf ${myconf} CFLAGS="${CFLAGS} -Wall" || die both hork the build process. Just specifying: econf ${myconf} ${CFLAGS} || die makes the build go fine.
Learning as I go here. econf doesn't take any parameters save configure options. Move the CFLAGS line to above the econf line; then call econf ${myconf} and you should get the behavior you want with no h0rkage. Also noting that changing CFLAGS during that stage appears to break CFLAGS tracking.
Created attachment 52825 [details, diff] Moves the CFLAGS change to a seperate line econf doesn't take CFLAGS as arguements, only configure options.
the right fix is in transcode-0.6.14.ebuild: inherit ... flag-o-matic ... append-flags -DDCT_YUV_PRECISION=1 ...
Thanks for reporting, append-flags now is used by transcode-0.6.11