bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /usr/lib/gcc/x86_64-alpine-linux-musl: libgettextlib.so: undefined r


From: Bruno Haible
Subject: Re: /usr/lib/gcc/x86_64-alpine-linux-musl: libgettextlib.so: undefined reference to `libiconv'
Date: Tue, 16 Jun 2020 02:21:36 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Jeffrey Walton wrote:
> FAIL: msgcat-2
> ==============
> msgcat: Cannot convert from "ISO-8859-1" to "UTF-8". msgcat relies on
> iconv(). This version was built without iconv().
> FAIL msgcat-2 (exit status: 1)

This indicates that HAVE_ICONV was not defined (or was defined to 0).

> I'm attaching gettext-tools/config.log.

It explains it:

configure:22025: checking for iconv
configure:22049: gcc -o conftest -g2 -O2 -march=native -fPIC -pthread 
-I/home/jwalton/tmp/ok2delete/include -DNDEBUG 
-L/home/jwalton/tmp/ok2delete/lib -Wl,-R,'$$ORIGIN/../lib' 
-Wl,-R,/home/jwalton/tmp/ok2delete/lib -Wl,--enable-new-dtags conftest.c -ldl 
-lpthread -liconv >&5
configure:22049: $? = 0
configure:22083: result: yes
configure:22086: checking for working iconv
configure:22227: gcc -o conftest -g2 -O2 -march=native -fPIC -pthread 
-I/home/jwalton/tmp/ok2delete/include -DNDEBUG 
-L/home/jwalton/tmp/ok2delete/lib -Wl,-R,'$$ORIGIN/../lib' 
-Wl,-R,/home/jwalton/tmp/ok2delete/lib -Wl,--enable-new-dtags conftest.c -ldl 
-lpthread -liconv >&5
configure:22227: $? = 0
configure:22227: ./conftest
Error loading shared library libiconv.so.2: No such file or directory (needed 
by ./conftest)
Error relocating ./conftest: libiconv_open: symbol not found
Error relocating ./conftest: libiconv_close: symbol not found
Error relocating ./conftest: libiconv: symbol not found
configure:22227: $? = 127
configure: program exited with status 127

So evidently, gcc and the linker find libiconv.so (most likely due to the
-L option that you gave). But the runtime loader does not find it.
You did not pass an -rpath option to the linker, but you gave a -R option
which - according to the documentation - ought to be equivalent.

musl libc implements rpath handling for a long time already. [1]

You pass --enable-new-dtags [2][3]. Do you have LD_LIBRARY_PATH set? That
would explain why the -R has no effect.

Bruno

[1] https://git.musl-libc.org/cgit/musl/tree/WHATSNEW
[2] https://en.wikipedia.org/wiki/Rpath
[3] https://news.ycombinator.com/item?id=14222349





reply via email to

[Prev in Thread] Current Thread [Next in Thread]