[Nix-dev] libtool + linking

Eelco Dolstra eelco at cs.uu.nl
Mon Mar 28 19:46:39 CEST 2005


On Sun, 27 Mar 2005 23:27:11 +0200
Armijn Hemel <armijn at uulug.nl> wrote:

> hi,
> 
> I'm trying to make a Nix-expression for RPM. RPM needs zlib, so I have
> zlib as one of the buildInputs. The configure script for RPM finds zlib,
> but during linking it fails:
> 
> gcc -g -O2 -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o file -static file.o  ./.libs/libfmagic.a -lz
> /nix/store/d50ef8fb6b99a53b9e3b800f3f7eba84-binutils-2.15/bin/ld: cannot find -lz

It's probably the `-static' flag.  Zlib is only available (in Nixpkgs) as a dynamic library.

Maybe RPM can also be built dynamically linked.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list