Description of problem: libpthread.a is compiled without -fPIC, causing linking errors in other packages, for example prelink. Version-Release number of selected component (if applicable): glibc-static-2.21.90-18.fc24.x86_64 How reproducible: Always. Steps to Reproduce: 1. checkout prelink f22 branch 2. try to build it in rawhide mock Actual results: /bin/ld: /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/libpthread.a(libpthread.o): relocation R_X86_64_32S against `__stack_user' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/libpthread.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status Expected results: prelink builds normally.
IMNSHO this is not a bug. If you link against these libraries statically, you should link them statically too.
(In reply to Jakub Jelinek from comment #1) > IMNSHO this is not a bug. If you link against these libraries statically, > you should link them statically too. Agreed. (In reply to Dominik 'Rathann' Mierzejewski from comment #0) > Description of problem: > libpthread.a is compiled without -fPIC, causing linking errors in other > packages, for example prelink. Why are you linking in a static libpthread to create a shared object?
(In reply to Carlos O'Donell from comment #2) > (In reply to Dominik 'Rathann' Mierzejewski from comment #0) > > Description of problem: > > libpthread.a is compiled without -fPIC, causing linking errors in other > > packages, for example prelink. > > Why are you linking in a static libpthread to create a shared object? That's actually a question for Jakub, as prelink is his code. However, since execstack is being packaged separately (bug 1247795), this will become moot unless someone wants to unretire prelink.
*** Bug 1239796 has been marked as a duplicate of this bug. ***
glibc-2.26.9000-44.fc28 provides static PIE support on aarch64, i686, x86-64. GCC 8 will simplify matters by including the -static-pie option.