Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 685332

Summary: sys-devel/gettext-0.19.8.1: fails on missing log10 when lto enabled
Product: Gentoo Linux Reporter: fkater <fkater>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: 4nykey, fabio.coatti, jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: gettext-log10_libm.diff

Description fkater 2019-05-08 07:45:17 UTC
gettext-0.19.8.1 with lto enabled fails on missing log10 in libm (glibc).

Tested on 5+ gentoo boxes, with gcc-8.3.0 and gcc-9.1.0.

Workaround: disable lto for gettext.

Please add this to the lto blocker.
Comment 1 Fabio Coatti 2019-05-13 08:28:58 UTC
confirmed also in 0.20.0 and 0.20.1
Comment 2 4nykey 2019-05-17 06:39:44 UTC
Created attachment 576982 [details, diff]
gettext-log10_libm.diff

Same here. It doesn't fail with ld=bfd.
This patch makes gold/lto possible. There's probably a more sophisticated way by fixing some m4 macro like gettext-tools/gnulib-m4/log10.m4 or such, go figure
Comment 3 Jeremy Murphy 2020-01-26 23:27:16 UTC
I am also hitting this error on 0.20.1, but I don't have lto enabled. :\
Comment 4 fkater 2020-01-28 20:28:36 UTC
Triggered by your issue updates, I've just re-enabled lto for gettext (which is 0.20.1 here now) and can *not* confirm the issue anymore.

It seems that having lto on or off is not the whole story.
Comment 5 Jeremy Murphy 2020-02-16 08:10:22 UTC
I am so sorry, I just double-checked and I actually DID have LTO enabled! :\

But enabled in a stupid way, which would not actually do anything beneficial because it was only in LDFLAGS (and not in CFLAGS).

Once I disabled that, it compiled and linked fine. Sorry about the red herring.
Comment 6 fkater 2020-02-16 18:36:07 UTC
gettext-0.19.8.1 is not in portage anymore, and the current stable 0.20.1 works for me inclunding lto.

So closing.