#873485 binutils: Internal error on fr_FR.UTF-8 localizing an error

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Nicolas Cavallari
Date:
2017-11-06 15:42:03 UTC
Severity:
normal
#873485#5
Date:
2017-08-28 09:29:03 UTC
From:
To:
When ld tries to localize a you-need-fPIC error in fr_FR.UTF-8 (french),
it aborts ("abandon") with an internal error ("erreur interne"):

$ cat wtf.c++
#include <iostream>
void lol() { std::cout << "fail"; }

$ LC_ALL="fr_FR.UTF-8" g++ -shared wtf.c++
/usr/bin/ld: /usr/bin/ld: BFD erreur interne (GNU Binutils for Debian)
2.29, abandon à ../../bfd/bfd.c:843 dans _doprnt

/usr/bin/ld: Merci de rapporter cette anomalie.

collect2: error: ld returned 1 exit status

When switching to C locale, ld outputs an error as expected:

$ LC_ALL="C" g++ -shared wtf.c++
/usr/bin/ld: /tmp/ccomgT5o.o: relocation R_X86_64_PC32 against symbol
`_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object;
recompile with -fPIC /usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

#873485#10
Date:
2017-11-06 15:39:50 UTC
From:
To:
Not currently a debian user, but I hit this bug on arch.

Since it happened event when there were no patches, I submitted it
upstream and gave them
your bug report :
https://sourceware.org/bugzilla/show_bug.cgi?id=22397

I believe it's been fixed (with thoses commits, the bug doesn't happen
anymore).

@maintainer : maybe you could get the commits mentionned in the bugreport ?