[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GetText 1.20.1 and libgettextlib.so: undefined reference to `libicon
Re: GetText 1.20.1 and libgettextlib.so: undefined reference to `libiconv' (and friends)
Wed, 05 Feb 2020 15:48:03 +0100
KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )
> Attached is the full patch for this problem.
It is pointless to patch Makefile.in files, since these are generated from
> First, LTLIBICONV was empty in the makefiles. I had to manually:
> -LTLIBICONV = @LTLIBICONV@
> +LTLIBICONV = -liconv
On NetBSD, which has iconv() in libc, it is normal that LIBICONV and
LTLIBICONV are set to empty.
However, if you are using GNU libiconv's <iconv.h>, LIBICONV and
LTLIBICONV need to contain "-L<path> -liconv -Wl,-rpath,-<path>".
If not, you need to take a look in config.log, to determine why not.
> Second, the recipes with the undefined references needed $(LTLIBICONV)
> added to *_LDADD. So there were a lot of these:
> -test_localcharset_LDADD = $(LDADD)
> +test_localcharset_LDADD = $(LTLIBICONV) $(LDADD)
gnulib/modules/localcharset-tests does not reference $(LIBICONV), because
the test code test-localcharset.c does not make use of iconv(). How come
that you get a link error for test-localcharset?