Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237338 - x11-libs/libX11-1.1.4 - /usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
Summary: x11-libs/libX11-1.1.4 - /usr/include/locale.h:148: error: expected '=', ',', ...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-10 14:55 UTC by Albert Zeyer
Modified: 2008-09-15 19:34 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 Albert Zeyer 2008-09-10 14:55:09 UTC
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../src -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -MT imCallbk.lo -MD -MP -MF .deps/imCallbk.Tpo -c imCallbk.c  -fPIC -DPIC -o .libs/imCallbk.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../src -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -MT imDefFlt.lo -MD -MP -MF .deps/imDefFlt.Tpo -c imDefFlt.c  -fPIC -DPIC -o .libs/imDefFlt.o
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imDefFlt.c:36:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
/usr/include/locale.h:154: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newlocale'
/usr/include/locale.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'duplocale'
/usr/include/locale.h:193: error: expected ')' before '__dataset'
/usr/include/locale.h:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uselocale'
In file included from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imDefFlt.c:36:
/usr/include/string.h:121: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:122: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:125: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:125: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/string.h:288: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:343: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:344: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:347: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:348: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
/usr/include/locale.h:154: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newlocale'
/usr/include/locale.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'duplocale'
/usr/include/locale.h:193: error: expected ')' before '__dataset'
/usr/include/locale.h:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uselocale'
In file included from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/string.h:121: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:122: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:125: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:125: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/string.h:288: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:343: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:344: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:347: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:348: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
In file included from ../../../include/X11/Xlibint.h:231,
                 from imDefFlt.c:36:
/usr/include/stdlib.h:242: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:242: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:246: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:247: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:252: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:253: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:258: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:259: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:262: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:263: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:266: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:267: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:271: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:272: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
In file included from ../../../include/X11/Xlibint.h:231,
                 from imCallbk.c:40:
/usr/include/stdlib.h:242: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:242: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:246: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:247: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:252: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:253: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:258: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:259: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:262: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:263: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:266: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:267: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:271: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:272: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
make[3]: *** [imDefFlt.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [imCallbk.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules/im/ximcp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules/im'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules'
make: *** [all-recursive] Error 1
 * 
 * ERROR: x11-libs/libX11-1.1.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2948:  Called x-modular_src_compile
 *             environment, line 3735:  Called x-modular_src_make
 *             environment, line 3771:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-libs/libX11-1.1.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libX11-1.1.4/temp/environment'.
 *
Comment 1 Albert Zeyer 2008-09-10 14:55:28 UTC
macbook ~ # emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.18-6-686 i686)
=================================================================
System uname: 2.6.18-6-686 i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz
Timestamp of tree: Tue, 09 Sep 2008 01:45:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acl acpi alsa altenburgcards amarok amr amuled apm applet async asyncns atm automount avahi bash-completion berkdb bluetooth bonjour bookmarks branding bzip2 cairo cdr cisco cli cracklib crypt cups cxx d daap dbus dedicated deskbar dga dhcp divx dri dv dvd dvdr dvdread dvi eap-tls eds emboss enblend encode esd evo exif extra-algorithms fam fasttrack ffmpeg firefox flac ftp galago gd gdbm german gif glib glitz gmedia gnome gnutella gnutls gphoto2 gpm gsf gstreamer gtk h323 hal haskell hddtemp hfs iconv icu id3 id3tag ieee1394 imlib injection inkjar ipv6 irda isdnlog isight jabber java javascript jit joystick jpeg jpeg2k kde kerberos kig-scripting kqemu latex lcms ldap libnotify lirc lm_sensors lua lzo macbook mad madwifi maps mdnsresponder-compat midi mikmod mmap mmx mng mozdevelop mp2 mp3 mp4 mpeg mplayer mtp mudflap music musicbrainz nautilus ncurses net network networking networkmanager njb nls nntp nptl nptlonly nsplugin ntfs ogg opengl openmp oss pam pascal pch pcre pdf perl pidgin plotutils pmu png pnm posix postgres postscript ppds pptp ps pth pulseaudio python qt3 qt3support qt4 quicktime rar rc5 rdesktop readline real realmedia reflection reiser4 reiserfs rtc samba screen sdl sdl-image sdl-sound sdlaudio server session sftp sharedmem sift slp smp sockets socks5 solver sourceview speex spell spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs tetex theora threads threadsafe tiff timidity tk trayicon truetype unicode unzip usb v4l2 valgrind vcd video voice vorbis weak-algorithms wifi win32codecs wma wmp wxwindows x264 x86 xanim xattr xcomposite xext xface xine xml xmlreader xorg xrandr xscreensaver xulrunner xv xvid zip zlib zsh-completion" ALSA_CARDS="hda-intel" 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 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="sony_dscf1 sony_dscf55" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="inputlirc macmini" USERLAND="GNU" VIDEO_CARDS="i810 vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 2 Albert Zeyer 2008-09-10 14:59:58 UTC
Same error in x11-libs/libX11-1.1.3.
Comment 3 Albert Zeyer 2008-09-10 15:04:01 UTC
Similar error in 1.1.2-r1:

...
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../../src -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -MT imDefFlt.lo -MD -MP -MF .deps/imDefFlt.Tpo -c imDefFlt.c  -fPIC -DPIC -o .libs/imDefFlt.o
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
/usr/include/locale.h:154: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newlocale'
/usr/include/locale.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'duplocale'
/usr/include/locale.h:193: error: expected ')' before '__dataset'
/usr/include/locale.h:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uselocale'
In file included from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/string.h:121: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:122: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:125: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:125: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/string.h:288: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:343: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:344: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:347: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:348: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imDefFlt.c:36:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
/usr/include/locale.h:154: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newlocale'
/usr/include/locale.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'duplocale'
/usr/include/locale.h:193: error: expected ')' before '__dataset'
/usr/include/locale.h:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uselocale'
In file included from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imDefFlt.c:36:
/usr/include/string.h:121: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:122: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:125: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:125: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/string.h:288: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:343: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:344: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:347: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:348: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
In file included from ../../../include/X11/Xlibint.h:231,
                 from imCallbk.c:40:
/usr/include/stdlib.h:242: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:242: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:246: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:247: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:252: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:253: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:258: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:259: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:262: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:263: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:266: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:267: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:271: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:272: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
In file included from ../../../include/X11/Xlibint.h:231,
                 from imDefFlt.c:36:
/usr/include/stdlib.h:242: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:242: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:246: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:247: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:252: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:253: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:258: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:259: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
/usr/include/stdlib.h:262: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:263: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:266: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:267: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/stdlib.h:271: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/stdlib.h:272: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
make[3]: *** [imDefFlt.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [imCallbk.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.2-r1/work/libX11-1.1.2/modules/im/ximcp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.2-r1/work/libX11-1.1.2/modules/im'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.2-r1/work/libX11-1.1.2/modules'
make: *** [all-recursive] Error 1
 * 
 * ERROR: x11-libs/libX11-1.1.2-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2960:  Called x-modular_src_compile
 *             environment, line 3745:  Called x-modular_src_make
 *             environment, line 3781:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-libs/libX11-1.1.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libX11-1.1.2-r1/temp/environment'.
 * 
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-10 20:02:52 UTC
Did you recompile sys-libs/glibc (/usr/include/locale.h) yet?
Comment 5 Albert Zeyer 2008-09-10 21:58:19 UTC
Yes, see bug #237339 for that problem. :)
Comment 6 Albert Zeyer 2008-09-14 17:51:06 UTC
I found the problem:

There are the files /usr/include/xlocale.h and libX11/include/X11/Xlocale.h.

Now look at this include backtrace:

In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imDefFlt.c:36:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'locale_t'

In string.h:118, it includes the file <xlocale.h>. On a case sensitive system, it would load the correct file /usr/include/xlocale.h. Though, it seems that it checks the libX11/include/X11 directory before any of the system directories and it finds the file libX11/include/X11/Xlocale.h on my system (because I have a case insensitive file system).

You could say now that Gentoo/Portage was just not intended to work on a case insensitive system. But I would not just drop this because a lot of other stuff has already compiled fine and the system itself is also running fine.

Despite that, I am also not sure if the behaviour is correct, that it checks libX11/include/X11 *before* the system include.
Comment 7 Albert Zeyer 2008-09-14 19:06:01 UTC
Hm, I wonder a bit how GCC handles the order of the include paths. I made some changes in the Makefile and added some -I/usr/include (added at the beginning and at the end, just to be sure). But even the following failed:

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I/usr/include -I. -I../../../src -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -I/usr/include -MT imDefFlt.lo -MD -MP -MF .deps/imDefFlt.Tpo -c imDefFlt.c  -fPIC -DPIC -o .libs/imDefFlt.o
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
Comment 8 Albert Zeyer 2008-09-14 19:24:37 UTC
OK, finally I came around this problem. I tried many things. All my tries to add -I/usr/include somewhere did not work, no matter where I add it (I just added it everywhere...).

I figured out that GCC at least searches the include dirs specified with -I in the same order like in the parameters. Sadly, the libX11/include/X11 is there before the libX11/include and I was not sure if it is save to just always add the libX11/include in front (it could be that there is some stuff which does not have this include and would fail with).

Therefore, I added a new special directory where I copied the /usr/include/xlocale.h into and I added this directory in the front of all other includes. With these changes, libX11 finally compiles fine.

...
>>> Source compiled.
>>> Test phase [not enabled]: x11-libs/libX11-1.1.4

Comment 9 Albert Zeyer 2008-09-14 19:26:02 UTC
Here is what I added in the ebuild:

x-modular_src_compile() {
    mkdir newinclude
    cp /usr/include/xlocale.h newinclude/
    find . -name Makefile.in -type f -print | xargs sed -i -e "s|DEFAULT_INCLUDES =|DEFAULT_INCLUDES = -I\$($

    # x-modular_src_make and stuff here...

    rm -r newinclude
}
Comment 10 Albert Zeyer 2008-09-14 19:27:00 UTC
Though it fails at the installation then, again with the same error:

...
>>> Install libX11-1.1.4 into /var/tmp/portage/x11-libs/libX11-1.1.4/image/ category x11-libs
make: Warning: File `Makefile' has modification time 1.5e+05 s in the future
Making install in include
make[1]: Entering directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/include'
make[1]: Warning: File `Makefile' has modification time 1.5e+05 s in the future
make[2]: Entering directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/include'
make[2]: Warning: File `Makefile' has modification time 1.5e+05 s in the future
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/include/X11" || /bin/mkdir -p "/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11"
 /usr/bin/install -c -m 644 'X11/XlibConf.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/XlibConf.h'
test -z "/usr/include/X11" || /bin/mkdir -p "/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11"
 /usr/bin/install -c -m 644 'X11/XKBlib.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/XKBlib.h'
 /usr/bin/install -c -m 644 'X11/Xcms.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xcms.h'
 /usr/bin/install -c -m 644 'X11/Xlib.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xlib.h'
 /usr/bin/install -c -m 644 'X11/Xlibint.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xlibint.h'
 /usr/bin/install -c -m 644 'X11/Xlocale.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xlocale.h'
 /usr/bin/install -c -m 644 'X11/Xresource.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xresource.h'
 /usr/bin/install -c -m 644 'X11/Xutil.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xutil.h'
 /usr/bin/install -c -m 644 'X11/cursorfont.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/cursorfont.h'
 /usr/bin/install -c -m 644 'X11/Xregion.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/Xregion.h'
 /usr/bin/install -c -m 644 'X11/ImUtil.h' '/var/tmp/portage/x11-libs/libX11-1.1.4/image//usr/include/X11/ImUtil.h'
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/include'
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/include'
Making install in modules
make[1]: Entering directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules'
make[1]: Warning: File `Makefile' has modification time 1.5e+05 s in the future
Making install in im
make[2]: Entering directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules/im'
make[2]: Warning: File `Makefile' has modification time 1.5e+05 s in the future
Making install in ximcp
make[3]: Entering directory `/var/tmp/portage/x11-libs/libX11-1.1.4/work/libX11-1.1.4/modules/im/ximcp'
make[3]: Warning: File `.deps/imTransR.Plo' has modification time 1.5e+05 s in the future
/bin/sh ../../../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../../../newinclude  -I. -I../../../src -I../../../include/X11    -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes 	-Wmissing-prototypes -Wmissing-declarations 	-Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT         -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -MT imCallbk.lo -MD -MP -MF .deps/imCallbk.Tpo -c -o imCallbk.lo imCallbk.c
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../../../newinclude -I. -I../../../src -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../include -I../../../include/X11 -I../../../src/xcms -I../../../src/xkb -I../../../src/xlibi18n -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHASXDMAUTH -D_BSD_SOURCE -DXIM_t -DTRANS_CLIENT -DMALLOC_0_RETURNS_NULL -O2 -march=nocona -pipe -ggdb -MT imCallbk.lo -MD -MP -MF .deps/imCallbk.Tpo -c imCallbk.c  -fPIC -DPIC -o .libs/imCallbk.o
In file included from ../../../include/X11/xlocale.h:38,
                 from /usr/include/string.h:118,
                 from /usr/include/X11/Xfuncs.h:50,
                 from ../../../include/X11/Xlibint.h:223,
                 from imCallbk.c:40:
/usr/include/locale.h:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'locale_t'
...
Comment 11 Albert Zeyer 2008-09-14 19:42:17 UTC
Sorry, that was a stupid mistake. I should of course not delete the newinclude before the installation.

These are now the additions in the ebuild which work:

x-modular_src_compile() {
    mkdir newinclude
    cp /usr/include/xlocale.h newinclude/
    find . -name Makefile.in -type f -print | xargs sed -i -e "s|DEFAULT_INCLUDES =|DEFAULT_INCLUDES = -I\$(top_builddir)/newinclude |g"

    # configure, make and stuff
}


Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-14 21:03:37 UTC
The problem with this bug report is that you're seeing a problem that noone else is seeing. It all seems to be a very local problem - not one that Gentoo can fix for you so far...
Comment 13 Albert Zeyer 2008-09-14 21:06:29 UTC
The bug should occur for all users with a case insensitive file system.
Comment 14 Albert Zeyer 2008-09-15 11:25:12 UTC
Btw., you can probably emulate the behaviour by creating a symlink xlocale.h in libX11/include/X11 which points to Xlocale.h.
Comment 15 Peter Volkov (RETIRED) gentoo-dev 2008-09-15 12:43:33 UTC
Albert there are no developers I've herd about which use case-insensitive system, thus adding such "hack" makes zero sense at this moment. The best thing I can suggest you is to discuss this problem with upstream and find some solution there. In any case leaving resolution on maintainers decision.
Comment 16 Albert Zeyer 2008-09-15 12:48:18 UTC
What about Gentoo/Alt? For example users of Gentoo on MacOSX or Gentoo on cygwin should also get hit by this problem.
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2008-09-15 17:20:06 UTC
This is an upstream bug relating to include ordering. Please file it at bugs.freedesktop.org in the xorg product. Thanks!
Comment 18 Albert Zeyer 2008-09-15 17:37:47 UTC
Upstream bug filled in here:
https://bugs.freedesktop.org/show_bug.cgi?id=17593