[Top][All Lists]

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

[bug #57168] libgettextlib uses indirect linking with libm

From: Bruno Haible
Subject: [bug #57168] libgettextlib uses indirect linking with libm
Date: Mon, 4 Nov 2019 21:37:27 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Update of bug #57168 (project gettext):

                Category:                    None => Build                  
                  Status:                    None => Invalid                
             Assigned to:                    None => haible                 
             Open/Closed:                    Open => Closed                 


Follow-up Comment #1:

libgettextlib indeed needs to link with -lm, because the function
xmlXPathCastNumberToString, defined in xpath.c, invokes log10.

When I build gettext from source on a glibc system, it does so because

1) the command line that builds libgettextlib.la looks like this:

libtool: link: gcc -shared  -fPIC -DPIC  .libs/copy-acl.o ... .libs/xmemdup0.o
 -Wl,--whole-archive ./.libs/libxml_rpl.a -Wl,--no-whole-archive  -lacl -lm
-LPREFIX/lib  -g -O2   -Wl,-soname -Wl,libgettextlib-20191013.so -o

As you can see, it contains -lm after the various .o files.

2) As a consequence, the generated libgettextlib.la contains explicit
references to -lm:

dependency_libs=' -lacl -lm -LPREFIX/lib'

3) Then the link of a program such as recode_sr_latin will use -lm.

In your case, you have highly unusual command-line options:
- -specs options that may or may not be related.
- -Werror=format-security which we discussed in bug #56360,
- -flto, which is unsupported. In bug #56109, I told you that you need to use
"-flto -ffat-lto-objects", not just "-flto".


Reply to this item at:


  Message sent via Savannah

reply via email to

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