[lfs-dev] Gettext-0.19.8.1 fails to compile

Bruce Dubbs bruce.dubbs at gmail.com
Wed Dec 20 08:39:31 PST 2017


John Frankish wrote:
> Ref: Linux From Scratch - Version SVN-20171219 Chapter 6. Installing
> Basic System Software Gettext-0.19.8.1
>
> ..fails to compile with the error below.
>
> Adding "-lm" to gettext-tools/src/libgettextsrc.la and
> gettext-tools/gnulib-lib/libgettextlib.la solves the problem.
>
> -----
>
> /bin/sh ../libtool  --tag=CC   --mode=link gcc -flto
> -fuse-linker-plugin -mtune=generic -Os -pipe     -o msgfmt
> msgfmt-msgfmt.o msgfmt-write-mo.o msgfmt-write-java.o
> msgfmt-write-csharp.o msgfmt-write-resources.o msgfmt-write-tcl.o
> msgfmt-write-qt.o msgfmt-write-desktop.o msgfmt-write-xml.o
> ../../gettext-runtime/intl/msgfmt-hash-string.o libgettextsrc.la
> libtool: link: gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe
> -o .libs/msgfmt msgfmt-msgfmt.o msgfmt-write-mo.o msgfmt-write-java.o
> msgfmt-write-csharp.o msgfmt-write-resources.o msgfmt-write-tcl.o
> msgfmt-write-qt.o msgfmt-write-desktop.o msgfmt-write-xml.o
> ../../gettext-runtime/intl/msgfmt-hash-string.o
> ./.libs/libgettextsrc.so
> /sources/gettext-0.19.8.1/gettext-tools/gnulib-lib/.libs/libgettextlib.so
> -lacl -lc -fopenmp
> /sources/gettext-0.19.8.1/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `fmod'
> /sources/gettext-0.19.8.1/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `pow'
> /sources/gettext-0.19.8.1/gettext-tools/gnulib-lib/.libs/libgettextlib.so:
> undefined reference to `log10' collect2: error: ld returned 1 exit
> status make[5]: *** [Makefile:2766: msgfmt] Error 1 make[5]: Leaving
> directory '/sources/gettext-0.19.8.1/gettext-tools/src' make[4]: ***
> [Makefile:2556: all] Error 2

I cannot reproduce the issue.  I just rebuilt the system and it was fine.
There have been no changes to the gettext page since February.

I'll note that my log says:

/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2   -o msgfmt 
msgfmt-msgfmt.o msgfmt-write-mo.o msgfmt-write-java.o 
msgfmt-write-csharp.o msgfmt-write-resources.o msgfmt-write-tcl.o 
msgfmt-write-qt.o msgfmt-write-desktop.o msgfmt-write-xml.o 
../../gettext-runtime/intl/msgfmt-hash-string.o libgettextsrc.la

But /usr/lib/libgettextsrc.la does have -lm present, so it appears that 
you have a problem earlier in the build.

   -- Bruce




More information about the lfs-dev mailing list