Re: Compiling coreutils from source
On 2015-09-17 12:04 +0200, Florian Pelgrim wrote:
> 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
This happens when building libstdbuf.so. I'm not sure why, but you
could work around that by passing "--enable-no-install-program=stdbuf"
to configure to not build the offending plugin. Or use CC=clang, it
does not seem to have this problem.