It works fine without nls though. Build error: make[2]: Entering directory `/var/tmp/portage/alsa-utils-1.0.11_rc2/work/alsa-utils-1.0.11rc2/speaker-test' if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -march=athlon-xp -g -pipe -MT speaker-test.o -MD -MP -MF ".deps/speaker-test.Tpo" -c -o speaker-test.o speaker-test.c; \ then mv -f ".deps/speaker-test.Tpo" ".deps/speaker-test.Po"; else rm -f ".deps/speaker-test.Tpo"; exit 1; fi speaker-test.c: In function
It works fine without nls though. Build error: make[2]: Entering directory `/var/tmp/portage/alsa-utils-1.0.11_rc2/work/alsa-utils-1.0.11rc2/speaker-test' if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -march=athlon-xp -g -pipe -MT speaker-test.o -MD -MP -MF ".deps/speaker-test.Tpo" -c -o speaker-test.o speaker-test.c; \ then mv -f ".deps/speaker-test.Tpo" ".deps/speaker-test.Po"; else rm -f ".deps/speaker-test.Tpo"; exit 1; fi speaker-test.c: In function main: speaker-test.c:753: error: LC_ALL undeclared (first use in this function) speaker-test.c:753: error: (Each undeclared identifier is reported only once speaker-test.c:753: error: for each function it appears in.) make[2]: *** [speaker-test.o] Error 1 $ emerge info: Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r2, 2.6.14.3 i686) ================================================================= System uname: 2.6.14.3 i686 AMD Athlon(tm) XP 2800+ Gentoo Base System version 1.12.0_pre14 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -g -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.5/env /usr/kde/3.5/share/config /usr/kde/3.5/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="-march=athlon-xp -g -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/mirror/gentoo/ftp://gentoo.inode.at/source/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.inode.at/" LANG="en_US.utf8" LC_ALL="en_US.utf8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac acl alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 caps cdparanoia cdr crypt cups curl debug dts dvd dvdread eds emboss encode exif expat fam ffmpeg flac foomaticdb fortran freetype gdbm gif gmp gphoto2 gpm gstreamer gtk gtk2 hal idea idn ieee1394 imagemagick imlib ipv6 jack java jpeg kde kdeenablefinal lcms ldap libg++ libwww lm_sensors mad mikmod mng motif mp3 mpeg mysql ncurses nls nomotif nptl nptlonly ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline recode samba sdl sndfile speex spell sse ssl svg tcltk tcpd theora tidy tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vorbis win32codecs xine xml xml2 xv xvid zlib elibc_glibc kernel_linux userland_GNU video_cards_radeon" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
*** Bug 120073 has been marked as a duplicate of this bug. ***
I attached a "lazy" patch (attachment #77924 [details, diff]) for the ebuild to bug #120073. Please also note that flag-o-matic is inherited in both the 1.0.11_rc2 and the 1.0.10 ebuild, while that eclass is seemingly not used in either ebuild. Sorry for the duplicate bug.
Has someone in toolchain ideas about why -O0 or no -O makes speaker-test fail? The code seems fine to me..
the code itself is broken, look at the includes ... #ifdef ENABLE_NLS #include <locale.h> #endif ... #include "aconfig.h" ... the fact that it "works" with -O1 is blind luck
Okay, I missed that one entirely... It's still curious that it does work with -O1 and later, but that would probably not create problems unless there's something relying on correct macros definition order.