Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23964 - gtklp doesn't emerge when the NLS use flag is active
Summary: gtklp doesn't emerge when the NLS use flag is active
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-05 04:52 UTC by Nuno Araujo
Modified: 2003-10-04 13:11 UTC (History)
2 users (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 Nuno Araujo 2003-07-05 04:52:11 UTC
The gtklp-0.9m package doesn't emerge when the nls use flag is active.
A compilation error apears.



Reproducible: Always
Steps to Reproduce:
1. emerge gtklp
2.
3.

Actual Results:  
gcc -c -DLOCALEDIR=\"/usr/share/locale\"
-DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H
-I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer
 plural.c
gcc -c -DLOCALEDIR=\"/usr/share/locale\"
-DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H
-I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer
 localcharset.c
cp ./libgnuintl.h libintl.h
/bin/sh ./config.charset 'i686-pc-linux-gnu' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
dcigettext.c: Dans la fonction 
Comment 1 Nuno Araujo 2003-07-05 04:52:11 UTC
The gtklp-0.9m package doesn't emerge when the nls use flag is active.
A compilation error apears.



Reproducible: Always
Steps to Reproduce:
1. emerge gtklp
2.
3.

Actual Results:  
gcc -c -DLOCALEDIR=\"/usr/share/locale\"
-DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H
-I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer
 plural.c
gcc -c -DLOCALEDIR=\"/usr/share/locale\"
-DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H
-I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer
 localcharset.c
cp ./libgnuintl.h libintl.h
/bin/sh ./config.charset 'i686-pc-linux-gnu' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
dcigettext.c: Dans la fonction « plural_lookup »:
dcigettext.c:991: objet appelé n'est pas une fonction
make[2]: *** [dcigettext.o] Erreur 1
make[2]: Leaving directory `/var/tmp/portage/gtklp-0.9m/work/gtklp-0.9m/intl'
make[1]: *** [all-recursive] Erreur 1
make[1]: Leaving directory `/var/tmp/portage/gtklp-0.9m/work/gtklp-0.9m'
make: *** [all] Erreur 2
 
!!! ERROR: net-print/gtklp-0.9m failed.
!!! Function src_compile, Line 35, Exitcode 2
!!! parallel make failed


Expected Results:  
The software should have been installed

Here is the result of emerge info:

Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 Pentium III (Coppermine)
GENTOO_MIRRORS="http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/
ftp://sunsite.cnlab-switch.ch/mirror/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncurses
nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb gtkhtml gdbm
berkdb slang readline tetex aalib bonobo svga ggi tcltk java guile ruby mysql X
sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt motif
opengl mozilla ldap snmp cdr scanner dga doc dvd ethereal evo flash gb gd
gphoto2 gtk2 imap innodb junit lcms leim libgda moznocompose moznoirc moznomail
mule pcmcia pda plotutils pnp samba sasl slp sse tiff usb wmf xface xml zeo
-3dnow -arts -kde"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer"
CXXFLAGS="-march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
 

When I do a USE="-nls" emerge gtklp, the package emerges correctly
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-12 04:05:04 UTC
cant reproduce this behaviour, anyone can?
Comment 3 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-18 05:26:21 UTC
try to set LANG=C and reemerge
Comment 4 Nuno Araujo 2003-07-19 03:30:13 UTC
even after having done LANG=C it doesn't emerge.

Here are the last lines of the compile:

gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer  dngettext.c
gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer  ngettext.c
gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer  plural.c
gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl  -march=pentium3 -Os -pipe -mfpmath=sse -fomit-frame-pointer  localcharset.c
cp ./libgnuintl.h libintl.h
/bin/sh ./config.charset 'i686-pc-linux-gnu' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@/gtklp/g' ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
dcigettext.c: In function `plural_lookup':
dcigettext.c:991: called object is not a function
make[2]: *** [dcigettext.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gtklp-0.9m/work/gtklp-0.9m/intl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gtklp-0.9m/work/gtklp-0.9m'
make: *** [all] Error 2
 
!!! ERROR: net-print/gtklp-0.9m failed.
!!! Function src_compile, Line 35, Exitcode 2
!!! parallel make failed
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-19 03:35:33 UTC
try to remerge gettext and/or revdep-rebuild 
Comment 6 Nuno Araujo 2003-07-19 13:42:19 UTC
Tried that!!!

Doesn't change anything :-(
Comment 7 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 01:07:45 UTC
tried both? 
Comment 8 Nuno Araujo 2003-07-20 06:23:22 UTC
Yes...

I re-emerged gettext and tried to emerge gtklp : it failed

I did a revdep-rebuild, it had nothing that was needed to be re-emerged. Everything was fine with my system.



Comment 9 Brandy Westcott (RETIRED) gentoo-dev 2003-09-26 18:08:52 UTC
This error looks to be caused by bad code taking advantage of bad luck
with header files.

Lines 59-64 of dcigettext.c define 'strchr' if is has not been defined:

	#include <string.h>
	#if !HAVE_STRCHR && !defined _LIBC
	# ifndef strchr
	#  define strchr index		<-- ouch!
	# endif
	#endif

Then on line 975 we declare index as a variable:

	unsigned long int index;

So when we get to line 991, the compiler rightly complains that 'strchr'
(which has been replaced by the variable 'index') is not a fuction:

      p = strchr (p, '\0');

Clearly, this code is not correct. (Incidentally, some other packages
that use dcigettext.c have fixed issue this e.g. gnupg-1.2.3).

But this doesn't explain why the reporter's machine couldn't find and
define strchr in the first place. On a properly set up Gentoo system,
one would always expect us to find strchr without problem.
Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2003-10-04 13:11:26 UTC
it's fixed in 0.9p, since this one does not use the included gettext version
:)