Hi everyone, I'm trying to static linking the coreutils. But for some reasons it fails with a cryptic bug for me.
For building I'm using the vagrant box deb/jessie-amd64. So anyone who is interested can reproduce it. I have done the following steps: > $ apt-get source coreutils > $ cd coreutils-8.23/ > $ export CFLAGS="-static -O2 -g" > $ ./configure > $ make And ended up whit this error: > /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/crtbeginT.o: relocation > R_X86_64_32 against `__TMC_END__' can not be used when making a shared > object; recompile with -fPIC I tried to recompile it with -fPIC options like mentioned from the error... > $ make clean > $ export CFLAGS="-static -O2 -g -fPIC" > $ make ... and ended up with the same error. I googled a bit around and found this stackoverflow questions which sounds similar to my problem: http://askubuntu.com/questions/530617/how-to-make-a-static-binary-of-coreutils But also the approved solution did not work for me. Can someone explain me what I'm missing? :) I would also be interested what this message means and if it can be ignored or anything should be done: > /home/vagrant/coreutils-8.23/src/whoami.c:85: warning: Using 'getpwuid' in > statically linked applications requires at runtime the shared libraries from > the glibc version used for linking Cheers Flo
signature.asc
Description: OpenPGP digital signature