[Top][All Lists]

[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: Mon, 15 Jun 2020 18:08:43 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Hi Jeffrey,

> I'm building libiconv 1.16 and gettext 0.20.2 on Alpine Liniux 3.10.
> Alpine's claim to fame is Musl instead of glibc.
> GetText is configured to use libiconv shared object using
> --with-libiconv-prefix="$MY_PREFIX". (MY_PREFIX is valid).
> The build results in the following. I believe the make recipe is
> lacking $(LTLIBICONV) library, and it is causing the link problem.

When you link with a library (such as libgettextlib) using libtool,
you don't need to explicitly list all dependency libraries of that

> /bin/sh ../libtool  --tag=CC   --mode=link gcc  -g2 -O2 -march=native
> -fPIC -pthread  -L/home/jwalton/tmp/ok2delete/lib
> -Wl,-R,'$ORIGIN/../lib' -Wl,-R,/home/jwalton/tmp/ok2delete/lib
> -Wl,--enable-new-dtags -o msgcmp msgcmp-msgcmp.o msgcmp-msgl-fsearch.o
> libgettextsrc.la    -ldl -lpthread
> libtool: link: gcc -g2 -O2 -march=native -fPIC -pthread -Wl,-R
> -Wl,"\$ORIGIN/../lib" -Wl,-R -Wl,/home/jwalton/tmp/ok2delete/lib
> -Wl,--enable-new-dtags -o .libs/msgcmp msgcmp-msgcmp.o
> msgcmp-msgl-fsearch.o  -L/home/jwalton/tmp/ok2delete/lib
> ./.libs/libgettextsrc.so
> /home/Build-Scripts/gettext-0.20.2/gettext-tools/gnulib-lib/.libs/libgettextlib.so
> /home/Build-Scripts/gettext-0.20.2/libtextstyle/lib/.libs/libtextstyle.so
> /home/Build-Scripts/gettext-0.20.2/gettext-tools/intl/.libs/libintl.so
> -lc -ldl -lpthread -pthread -Wl,-rpath
> -Wl,/home/jwalton/tmp/ok2delete/lib
> /usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld:
> /home/Build-Scripts/gettext-0.20.2/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv'
> /usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld:
> /home/Build-Scripts/gettext-0.20.2/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv_open'
> /usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld:
> /home/Build-Scripts/gettext-0.20.2/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `libiconv_close'
> collect2: error: ld returned 1 exit status
> make[5]: *** [Makefile:3077: msgcmp] Error 1

Can you please show:
  1) the result of 'grep ICONV gettext-tools/config.status'
  2) the contents of gettext-tools/gnulib-lib/libgettextlib.la ?


reply via email to

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