On 19/03/2020 08:54, Gabor Z. Papp wrote:
lo lo,
while trying to statically link coreutils 8.32 on linux x86_64, I'm
getting the following error:
[...]
CC src/blake2/b2sum-blake2b-ref.o
CC src/blake2/b2sum-b2sum.o
CCLD src/make-prime-list
CCLD src/libstdbuf.so
AR src/libver.a
/pkg/bin/ld: /pkg/lib/gcc/x86_64-gzp-linux-gnu/6.4.1/crtbeginT.o: relocation
R_X86_64_32 against hidden symbol `__TMC_END__' c
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:9158: src/libstdbuf.so] Error 1
On i686 in the same software environment linking works fine, coreutils 8.32
compiles statically.
Previous, 8.31 version links fine also on x86_64.
static linking the shared lib libstdbuf.so seems problematic.
I.E. stdbuf implicitly depends on shared lib preloading to work.
So I would disable stdbuf in such a setup with:
configure --enable-no-install-program=stdbuf
Alternatively I would look at compiling libstdbuf.so with separate flags
cheers,
Pádraig