[Nix-dev] statically linking gcc in Nix fails

Armijn Hemel armijn at uulug.nl
Fri Oct 22 16:17:11 CEST 2004


hi all,

I'm trying to compile gcc statically in Nix. I adapted the default.nix
and builder.sh from the default gcc-3.4.2 in nixpkgs, but I get the
following error:

impure path `/usr/lib/crti.o' used in link

How can I debug this? I set the noSysDirs to 1. Attached builder.sh and
default.nix.

armijn

-- 
 ---------------------------------------------------------------------------
  armijn at uulug.nl | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
 ---------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builder.sh
Type: application/x-sh
Size: 2288 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20041022/9a7b8e84/attachment.sh 
-------------- next part --------------
{ stdenv, fetchurl }:

stdenv.mkDerivation {
  name = "gcc-static-3.4.2";
  builder = ./builder.sh;
  src = fetchurl {
    url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-3.4.2/gcc-3.4.2.tar.bz2;
    md5 = "2fada3a3effd2fd791df09df1f1534b3";
  };
  # !!! apply only if noSysDirs is set
  patches = [./ldflags.patch];
  noSysDirs = 1;
}


More information about the nix-dev mailing list