Summary: | sys-apps/coreutils-8.23[static] fails to compile: src/libstdbuf.so link throws PIC errors | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Attila Tóth <atoth> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | rene.rheaume |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Attila Tóth
2015-07-22 08:05:16 UTC
Also: sys-apps/coreutils-8.22-r1 compiles with sys-devel/gcc-4.9.3 Our fellow vapier had an issue with setbuf some years ago: http://coreutils.gnu.narkive.com/FUwMO7lI/stdbuf-util-prevents-easy-static-building-of-coreutils (In reply to René Rhéaume from comment #2) > Our fellow vapier had an issue with setbuf some years ago: > > http://coreutils.gnu.narkive.com/FUwMO7lI/stdbuf-util-prevents-easy-static- > building-of-coreutils There are workarounds available: http://askubuntu.com/questions/530617/how-to-make-a-static-binary-of-coreutils referring to this: https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734 with an interesting note: https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734/comments/8 (In reply to Attila Tóth from comment #3) > (In reply to René Rhéaume from comment #2) > > There are workarounds available: > http://askubuntu.com/questions/530617/how-to-make-a-static-binary-of- > coreutils > referring to this: > https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734 > > with an interesting note: > https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734/comments/8 There is also this bug report, about static linking and PIC, rejected by Jakub Jelinek: https://bugzilla.redhat.com/show_bug.cgi?id=214465 (In reply to Attila Tóth from comment #3) > (In reply to René Rhéaume from comment #2) > > There are workarounds available: > http://askubuntu.com/questions/530617/how-to-make-a-static-binary-of- > coreutils > referring to this: > https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734 > > with an interesting note: > https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734/comments/8 There is also this bug report, about static linking and PIC, rejected by Jakub Jelinek: https://bugzilla.redhat.com/show_bug.cgi?id=214465 x86_64-pc-linux-gnu-gcc -std=gnu99 -pipe -O2 -march=core2 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -static -o src/make-prime-list src/make-prime-list.o x86_64-pc-linux-gnu-gcc -std=gnu99 -fPIC -pipe -O2 -march=core2 -shared -Wl,-O1 -Wl,--as-needed -static -o src/libstdbuf.so src/src_libstdbuf_so-libstdbuf.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/crtbeginT.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status The problem here is that it pass static when it try to build a shared lib (.so) so it looks like bug in the build system and not a hardened one |