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

Bug#843035: gcc-6: --enable-default-pie configuration breaks linking when some libraries are static only



Hi Nach,

2016-11-03 19:51 GMT+01:00 NSRT Mail account. <joecool22us@yahoo.com>:
> Hi  Balint,
>
>> Static libraries shipped by Debian are being recompiled with PIE which
>> allows linking them to PIE binaries.
>
> Which is good although a bit of a pain at the moment, since some popular
> libraries in unstable are not PIE yet.
> However, for non-free libraries, one will need to wait for upstream to
> handle, if they ever.
>
> But I'm more concerned about the unhelpful error message. "Recompile with
> -fPIC" should instead say something like "Recompile with -fPIC or -fPIE, or
> relink with -fno-pie", otherwise one is confused as to how to fix the issue
> if they are unable to recompile the library. Due to the potentially
> misleading error message, I spent way too long till I found that linking
> with -(f)no-pie would fix the issue. I just want to help other developers
> who will undoubtedly run into this from wasting their time trying to solve
> this if they are unable for whatever reason to recompile the offending
> library.

This message is confusing indeed. I have asked for clarification upstream:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70419#c1

Cheers,
Balint


Reply to: