Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165234 - emerge media-sound/glame-2.0.1 fails without nls useflag; doesn't like libintl.h
Summary: emerge media-sound/glame-2.0.1 fails without nls useflag; doesn't like libintl.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-04 07:44 UTC by Ryan Hendrickson
Modified: 2009-05-09 15:48 UTC (History)
1 user (show)

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 Ryan Hendrickson 2007-02-04 07:44:21 UTC
The summary says it all: glame won't compile unless the nls useflag is enabled.  The error appears to be associated with /usr/include/libintl.h, which comes with glibc.  I'm a little confused, since I doubt this is a glibc bug, but okay!  Emerging with USE="nls" succeeds.

Reproducible: Always

Steps to Reproduce:
1. USE="-nls" emerge =glame-2.0.1




root # emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r2 i686)
=================================================================
System uname: 2.6.18-gentoo-r2 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.12.6
Last Sync: Sun, 04 Feb 2007 03:50:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync.exclude"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac acl acpi adns afs aim alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol artworkextra asf audiofile avahi bash-completion bitmap-fonts bonobo browserplugin bzip2 c++ cairo caps ccache cdparanoia cli cracklib crypt curl daap dbus directfb divx4linux dlloader dmi dri dvd dvi effects elibc_glibc exif expat fam fasttrack fbcon festival ffmpeg firefox flac flash gdbm gif gimp glitz glut gnome gnomecanvas gnutella gnutls gpm gs gstreamer gstreamer010 gtk guile hal iconv icq imagemagick imap inkjar input_devices_keyboard input_devices_mouse input_devices_wacom isdnlog jabber java joystick jpeg kerberos kernel_linux keyring kqemu lame latex lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text lcms libnotify linguas_en mad magic midi mime ming mmap mmx mmxext mng mozdevelop mozilla mozsvg mp3 msn musicbrainz nautilus ncurses network nptl nptlonly nsplugin nvidia ogg openal opengl oscar pam pcre pdf perl png ppds pppd pulseaudio python quicktime readline real reflection rtc samba sdl session smime sndfile spell spl sse ssl startup-notification svg sysfs tagwriting tcpd tetex threads tiff timidity truetype truetype-fonts type1 type1-fonts udev unicode usb userland_GNU userlocales utf8 video_cards_nvidia vim vorbis win32codecs wmf xcomposite xface xine xml xorg xpm xscreensaver xv xvid xvmc yahoo zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS


And this is the error that emerge throws:
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -I../../src/filter -I../../src/gui -I../../src/swapfile -I../../src/hash -I../../src/glmid -I../../src/gui  -D_REENTRANT -DPKGPIXMAPSDIR=\"/usr/share/glame/pixmaps\" -DPKGDATADIR=\"/usr/share/glame\" -I/usr/include/libxml2    -DORBIT2=1 -pthread -I/usr/include/libgnome-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libxml2 -I/usr/include/libglade-2.0   -I/usr/include/libxml2     -O2 -march=athlon-xp -pipe -fomit-frame-pointer -Wall -Wno-sign-compare  -D_REENTRANT -MT main.o -MD -MP -MF "$depbase.Tpo" -c -o main.o main.c; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from main.c:36:
/usr/include/libintl.h:40: error: expected identifier or '(' before 'const'
/usr/include/libintl.h:45: error: expected identifier or '(' before 'const'
/usr/include/libintl.h:52: error: expected identifier or '(' before 'const'
/usr/include/libintl.h:83: error: expected identifier or '(' before 'const'
/usr/include/libintl.h:87: error: expected identifier or '(' before 'const'
/usr/include/libintl.h:92: error: expected identifier or '(' before 'const'
main.c: In function 'record_wave_cb':
main.c:238: warning: passing argument 2 of 'glame_waveedit_gui_new' from incompatible pointer type
main.c:241: warning: passing argument 1 of 'gpsm_item_destroy' from incompatible pointer type
main.c: In function 'main':
main.c:965: warning: statement with no effect
main.c:966: warning: statement with no effect
make[4]: *** [main.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/glame-2.0.1/work/glame-2.0.1/src/gui'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/glame-2.0.1/work/glame-2.0.1/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/glame-2.0.1/work/glame-2.0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/glame-2.0.1/work/glame-2.0.1'
make: *** [all] Error 2

!!! ERROR: media-sound/glame-2.0.1 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  glame-2.0.1.ebuild, line 65:   Called die
Comment 1 Stian Skjelstad 2007-04-24 19:32:16 UTC
In the offending source file, I found that this error occures if gnome.h is included before libintl.h.

Digging further, I found the root of all evil to be

/usr/include/libbonobo-2.0/bonobo/bonobo-i18n.h

which again contain these lines (trimmed down)

#    define textdomain(String) (String)
#    define gettext(String) (String)
#    define dgettext(Domain,Message) (Message)
#    define dcgettext(Domain,Message,Type) (Message)
#    define bindtextdomain(Domain,Directory) (Domain)
#    define bind_textdomain_codeset(Domain,CodeSet) (Domain)
#    define _(String) (String)
#    define N_(String) (String)


Which again boils down to how should this be solved. 

a) Well, the most obvious thing I can think of is just to change the include order (Since the same file includes libintl.h if NLS is to be used BEFORE it defines any macroes.

b) I even think this main.c can be skipped since bonobo/bonobo-i18n.h includes libintl.h if nls is used (I think)

Any other thoughs from anybody else?
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2007-08-01 14:10:23 UTC
Could you attach a patch of suggested modification? I can't reproduce this.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2009-05-09 15:48:30 UTC
+  09 May 2009; Samuli Suominen <ssuominen@gentoo.org> glame-2.0.1.ebuild:
+  Remove USE nls wrt #165234