[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling coreutils from source

On Thu, 17 Sep 2015 06:04:03 -0400 (EDT), 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

I don't pretend to understand the make process well enough to explain why
you got the error that you did.  What I can tell you is that, in the past,
I have been successful with making local modifications to the coretuils package
by following a procedure similar to the following:

   apt-get source coreutils
   rm coreutils_*
   cd coreutils-8.23
   . make local modifications
   dpkg-buildpackage -b -uc -rfakeroot

Once quirk of the build process for this package is that you use

   fakeroot debian/rules clean1

to do a clean, rather than the usual

   fakeroot debian/rules clean

I don't know if this helps or not.

  .''`.     Stephen Powell    <zlinuxman@wowway.com>
 : :'  :
 `. `'`

Reply to: