bugGNU gettext - Bugs: bug #40192, libc is linked explicitly to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40192: libc is linked explicitly to libintl

Submitter:  Michael Forney <mforney>
Submitted:  Sun 06 Oct 2013 06:20:21 AM UTC
   
 
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Thu 09 May 2019 07:17:11 PM UTC, comment #3: 

The fix is contained in the gettext-0.20 release.

Bruno Haible <haible>
Group administrator
Tue 02 Jan 2018 05:48:41 PM UTC, comment #2: 
Bruno Haible <haible>
Group administrator
Tue 02 Jan 2018 05:48:06 PM UTC, comment #1: 


> it is done so -no-undefined can be passed to libtool. However, libc is implicitly linked, so this should not be an issue (at least on modern systems).


Indeed. libtool has logic that determines whether it should add -lc (search for archive_cmds_need_lc), and this logic works fine on all modern platforms (I did not have any issue when not using -lc explicitly for libffcall-2.0 on more than 50 platforms in 2017).

Thanks for the report!

Bruno Haible <haible>
Group administrator
Sun 06 Oct 2013 06:20:21 AM UTC, original submission:  

When building libintl, -lc is passed to the libtool command line, causing it to show up in libintl.la, resulting in various linking order issues when packages use AM_GNU_GETTEXT to set LIBINTL. This is because libc.so could appear before other objects, and mask their symbols.

As far as I understand, -lc should never be passed explicitly because it is always included by default at the end of the linker command line where it belongs.

According to this comment:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/intl.m4?id=6e109a82373b9f5c16591f87ffe3689b8749ee9e#n136

it is done so -no-undefined can be passed to libtool. However, libc is implicitly linked, so this should not be an issue (at least on modern systems).

Perhaps on some platforms passing -lc is necessary, so if removing LTLIBC and any references to it is not an option, I suggest passing -lc only when required, and not by default.

Michael Forney <mforney>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by mforney (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2018-01-02 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2016-11-27 haible CategoryNone Build

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code