Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 249213

Summary: sys-devel/gettext-0.17 installed /usr/include/libintl.h on an old glibc system
Product: Gentoo Linux Reporter: Ivan Pantovic <gyro666>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Severity: minor CC: jer
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Ivan Pantovic 2008-11-29 01:19:11 UTC
I did an upgrade on several machines and noticed that on newly upgraded ones I have a problem to validly compile packages with nls switch (it's causes missing  include path LIBS=.... -lintl in linking stage). I traced it down to this.

I have glibc glibc-2.3.5-r1 and during standard upgrade gettext got to version 0.17 but then it overwrites the /usr/include/libintl.h and all that needs to compile with nls flag suddenly loses -lintl from the LIBS variable (autoconfig?)

equery b /usr/include/libintl.h
[ Searching for file(s) /usr/include/libintl.h in *... ]
sys-devel/gettext-0.17 (/usr/include/libintl.h)
sys-libs/glibc-2.3.5-r1 (/usr/include/libintl.h)

Reproducible: Always

Steps to Reproduce:
1. upgrade to gettext 0.17
2. try to compile for example libpq-8.0.15 postgresql-8.0.15 with nls

Actual Results:  
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -fomit-frame-pointer -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing pg_config.o  -L../../../src/port  -Wl,-rpath,/usr/lib -lpgport -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd  -o pg_config
pg_config.o(.text+0xb): In function `help':
: undefined reference to `libintl_gettext'
pg_config.o(.text+0x29): In function `help':
: undefined reference to `libintl_gettext'
pg_config.o(.text+0x3d): In function `help':
: undefined reference to `libintl_gettext'
pg_config.o(.text+0x5b): In function `help':
: undefined reference to `libintl_gettext'
pg_config.o(.text+0x6f): In function `help':
: undefined reference to `libintl_gettext'
pg_config.o(.text+0x83): more undefined references to `libintl_gettext' follow
../../../src/port/libpgport.a(path.o)(.text+0x683): In function `set_pglocale_pgservice':
: undefined reference to `libintl_bindtextdomain'
../../../src/port/libpgport.a(path.o)(.text+0x68b): In function `set_pglocale_pgservice':
: undefined reference to `libintl_textdomain'
collect2: ld returned 1 exit status
make: *** [pg_config] Error 1
 * ERROR: dev-db/libpq-8.0.15 failed.
 * Call stack:
 *     , line   49:  Called src_compile
 *             environment, line 2393:  Called die
 * The specific snippet of code:
 *       emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake pg_config failed"
 *  The die message:
 *   emake pg_config 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/dev-db/libpq-8.0.15/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/libpq-8.0.15/temp/environment'.

Expected Results:  
should compile fine

remedy is to downgrade gettext to 0.16.1-r1 and to copy valid libintl.h from original sys-libs/glibc-2.3.5-r1

then it works fine

i guess other packages reported on various links suffer the same problem.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-29 16:33:26 UTC
elmer ~ # qlist -eo gettext |grep include

sys-devel/gettext-0.17 normally does not include /usr/include/libintl.h, normally meaning sys-libs/glibc is in use (gettext-0.17.ebuild, line 83-7:

    # remove stuff that glibc handles
    if use elibc_glibc ; then
        rm -f "${D}"/usr/include/libintl.h
        rm -f "${D}"/usr/$(get_libdir)/libintl.*

So please post your `emerge --info' too (of the state of the system where sys-devel/gettext does install the include).
Comment 2 SpanKY gentoo-dev 2008-11-29 20:11:54 UTC
post the full build output of emerging gettext