Nikita Karetnikov <nik...@karetnikov.org> skribis: > I've attached a patch that fails with this error > > /nix/store/4g873aa2h6c8c2qfsiw0j1cbvhginx4d-ghc-bin-7.0.1/lib/ghc-7.0.1/ghc-pkg: > error while loading shared libraries: libgmp.so.3: cannot open shared object > file: No such file or directory > make[1]: *** [install_packages] Error 127 > make: *** [install] Error 2
[...] > (system (format #f > "~a ~a ~a ~a ~a:~a ~a" > (which "patchelf") > "--set-interpreter" > linker > "--set-rpath" > gmp > ncurses > file)))) Look like it should work. Could you run ‘objdump -x .../ghc-pkg | grep PATH’, to check what its actual RPATH/RUNPATH is? Perhaps you could try to run it by hand to see what happens (copy the original binary by hand, and try it.) (Stylistic note: prefer ‘system*’, which allows arguments to be distinguished, whereas ‘system’ uses shell expansion. Prefer ‘string-append’ over ‘format’ for concatenation. Better yet: use ‘augment-rpath’ from (guix build rpath).) HTH, Ludo’.