Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366021 - games-util/grfcodec-5.1.1 fails to build if a variable named FLAGS is defined in /etc/make.conf
Summary: games-util/grfcodec-5.1.1 fails to build if a variable named FLAGS is defined...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 23:26 UTC by Andrei Slavoiu
Modified: 2011-05-06 21:36 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,40.01 KB, text/plain)
2011-05-04 23:29 UTC, Andrei Slavoiu
Details
grfcodec-5.1.1.ebuild.patch (grfcodec-5.1.1.ebuild.patch,286 bytes, patch)
2011-05-04 23:31 UTC, Andrei Slavoiu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Slavoiu 2011-05-04 23:26:29 UTC
My /etc/make.conf contains the following lines:
FLAGS="-march=native -ggdb -O2 -pipe"
CFLAGS="${FLAGS}"
CXXFLAGS="${FLAGS}"

grfcodec's Makefile will treat that temp FLAGS variable as an override to its build flags and fail to compile. I was able to avoid this by undefining FLAGS in the generated Makeile.local but if overriding FLAGS is considered a feature at least add a warning in case it is set.

Reproducible: Always
Comment 1 Andrei Slavoiu 2011-05-04 23:29:15 UTC
Created attachment 272145 [details]
build.log
Comment 2 Andrei Slavoiu 2011-05-04 23:31:39 UTC
Created attachment 272147 [details, diff]
grfcodec-5.1.1.ebuild.patch
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2011-05-05 00:07:01 UTC
in portage.  thanks for the bug report and patch
Comment 4 Juraj Variny 2011-05-06 12:48:01 UTC
My make doesn't seem to understand the "undefine" command and emerge fails with:

Makefile.local:6: *** missing separator.  Stop.

When I replaced that line with 

FLAGS =

everything works. I have gentoo-stable system with few packages (including openttd) unmasked. I have no FLAGS variable in /etc/make.conf . Please reopen this bug.

# cat /var/log/portage/games-util:grfcodec-5.1.1:20110506-124601.log
 * Package:    games-util/grfcodec-5.1.1
 * Repository: gentoo
 * Maintainer: games@gentoo.org
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   sandbox splitdebug userpriv usersandbox
Makefile.local:6: *** missing separator.  Stop.
emake failed
 * ERROR: games-util/grfcodec-5.1.1 failed (compile phase):
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 720:  Called _eapi2_src_compile
 *     ebuild.sh, line 665:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =games-util/grfcodec-5.1.1',
 * the complete build log and the output of 'emerge -pqv =games-util/grfcodec-5.1.1'.
 * The complete build log is located at '/var/log/portage/games-util:grfcodec-5.1.1:20110506-124601.log'.
 * The ebuild environment file is located at '/var/tmp/portage/games-util/grfcodec-5.1.1/temp/environment'.
 * S: '/var/tmp/portage/games-util/grfcodec-5.1.1/work/grfcodec-5.1.1-source'


=================================================================
# emerge --info '=games-util/grfcodec-5.1.1'
Portage 2.1.9.42 (default/linux/amd64/10.0/desktop, gcc-4.4.5, libc-0-r0, 2.6.38-gentoo-r2-nodrm x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.38-gentoo-r2-nodrm-x86_64-AMD_Athlon-tm-_II_X4_630_Processor-with-gentoo-1.12.14
Timestamp of tree: Fri, 06 May 2011 12:00:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-g -O2 -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ati /etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/hal /etc/hotplug /etc/pam.d /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/xdg /etc/xml"
CXXFLAGS="-g -O2 -march=native -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://tux.rainside.sk/gentoo/ ftp://gentoo.wheel.sk/pub/linux/gentoo/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ http://distfiles.gentoo.org"
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu"
LINGUAS="en sk"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acl acpi alsa amd64 amr apache2 bash-completion bluetooth branding bzip2 cairo cdda cdio cdr cli consolekit cpudetection cracklib crypt css cups curl cxx dbus dga dia dri dts dvb dvd dvdr dvdread emboss encode exif faac faad fam ffmpeg firefox flac fontconfig foomaticdb freetype gdbm gdu gif gnutls gpm gtk i8x0 iconv icq icu imagemagick imlib ipv6 irc jabber java jpeg jpeg2k kde lcms libnotify lirc live lm_sensors lzo mad matroska mmx mmx2 mmxext mng modules mp3 mp4 mpeg mplayer msn mudflap multilib ncurses network nls nptl nptlonly nsplugin ogg oggvorbis openexr opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt qt3support qt4 quicktime readline samba sdl semantic-desktop session sms spell sqlite sse sse2 sse3 ssl ssse3 startup-notification stream svg sysfs syslog tcltk tcpd theora threads tiff tk truetype udev unicode urandom usb utempter v4l v4l2 vcd vim-syntax vorbis wifi wmf wxwindows x264 xcb xext xine xml xorg xpm xulrunner xv xvid zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sk" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeon radeonhd vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Andrei Slavoiu 2011-05-06 21:36:16 UTC
Hmm, indeed undefine is a new feature of make 3.82. 'FLAGS = ' works for me as well, I just felt undefine is cleaner.