On Thu, Mar 08, 2012 at 09:23:33AM -0500, Shea Levy wrote: > >>> If it was caused by a build-time impurity, then simply using the binaries > >>> from > >>> the Nixpkgs channel should fix this. As far as I can tell the Glibc > >>> binary in > >>> our channel doesn't reference /lib64.
> >> This seems like an incomplete approach to this problem. > > I didn't mean to imply that it was. Impurities should be fixed, of course. > As a stop-gap, maybe we could patchelf gencat? As a background, this isn't an environment where I can use chroot() builds. I suppose I could set up a VM to do it, and put the nix store in the same place, or use a LD_PRELOAD based chroot-alike approach. But those are *both* projects that I'm not really sure I want to undertake right now.. Here's a patch that tries to cover up some of the impurities in the stdenv bootstrapping. -- Jack (John) Cummings http://mudshark.org/ PGP fingerprint: A927 992E 197B 0A86 27BC 964D A1DA CBAC CC48 B110
diff -r 48fc223ca3f7 pkgs/development/libraries/glibc/2.13/builder.sh
--- a/pkgs/development/libraries/glibc/2.13/builder.sh Tue Mar 06 21:33:20 2012 +0000
+++ b/pkgs/development/libraries/glibc/2.13/builder.sh Fri Mar 09 01:22:47 2012 -0800
@@ -51,5 +51,11 @@
rm -f $out/lib/libgcc_s.so.1
}
+postFixup() {
+ # libelf uses gencat, so we need to fix it's rpath so that it doesn't pick up the system rpath.
+ patchelf --set-rpath $out/lib $out/bin/gencat
+ # librt (used by acl, used by coreutils) links against pthread, try *not* to pick up the system one.
+ patchelf --set-rpath $out/lib $out/lib/librt-*.so
+}
genericBuild
diff -r 48fc223ca3f7 pkgs/development/libraries/glibc/2.14/builder.sh
--- a/pkgs/development/libraries/glibc/2.14/builder.sh Tue Mar 06 21:33:20 2012 +0000
+++ b/pkgs/development/libraries/glibc/2.14/builder.sh Fri Mar 09 01:22:47 2012 -0800
@@ -51,5 +51,12 @@
rm -f $out/lib/libgcc_s.so.1
}
+postFixup() {
+ # libelf uses gencat, so we need to fix it's rpath so that it doesn't pick up the system rpath.
+ patchelf --set-rpath $out/lib $out/bin/gencat
+ # librt (used by acl, used by coreutils) links against pthread, try *not* to pick up the system one.
+ patchelf --set-rpath $out/lib $out/lib/librt-*.so
+}
+
genericBuild
diff -r 48fc223ca3f7 pkgs/tools/misc/coreutils/default.nix
--- a/pkgs/tools/misc/coreutils/default.nix Tue Mar 06 21:33:20 2012 +0000
+++ b/pkgs/tools/misc/coreutils/default.nix Fri Mar 09 01:22:47 2012 -0800
@@ -44,6 +44,14 @@
NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol";
+ # the coreutils install calls the ginstall just compiled, before we have
+ # a chance to patchelf it.
+ libPath = stdenv.lib.makeLibraryPath ([stdenv.gcc.libc] ++ buildInputs);
+
+ preInstall = ''
+ patchelf --set-rpath $libPath src/ginstall
+ '';
+
meta = {
homepage = http://www.gnu.org/software/coreutils/;
description = "The basic file, shell and text manipulation utilities of the GNU operating system";
pgpuHuIQOx4Px.pgp
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
