guix-devel
[Top][All Lists]
Advanced

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

Re: 'patchelf' doesn't change shared libraries


From: Ludovic Courtès
Subject: Re: 'patchelf' doesn't change shared libraries
Date: Tue, 16 Jul 2013 00:01:41 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Nikita Karetnikov <address@hidden> skribis:

>> Could you run ‘objdump -x .../ghc-pkg | grep PATH’, to check what its
>> actual RPATH/RUNPATH is?
>
>   RUNPATH              
> /nix/store/jndql2lmx3mzqmwhqh44bhm95wj8r9cy-gmp-5.1.2/lib:/nix/store/bz3az8a2699c77bgy8nm5cy77rypgw96-ncurses-5.9/lib
>
> $ objdump -x 
> /nix/store/4g873aa2h6c8c2qfsiw0j1cbvhginx4d-ghc-bin-7.0.1/lib/ghc-7.0.1/ghc-pkg
>  | egrep 'libgmp|libncurses'
>   NEEDED               libncurses.so.5
>   NEEDED               libgmp.so.3
>
> Is there a way to solve this without a symlink [1]?
>
>> Perhaps you could try to run it by hand to see what happens (copy the
>> original binary by hand, and try it.)
>
> Do you mean 'ghc-7.0.1/utils/ghc-pkg/dist-install/build/tmp/ghc-pkg'?

Yes.

> $ ./ghc-pkg
> ./ghc-pkg: error while loading shared libraries: libgmp.so.3: cannot open 
> shared object file: No such file or directory

OK, so the RUNPATH is correct, but ghc-pkg expects a libgmp with an
older SONAME.

The correct fix would be to add the old GMP version that produces
libgmp.so.3 to multiprecision.scm, and to use that as an input to GHC.

According to <https://bbs.archlinux.org/viewtopic.php?id=94146>,
libgmp.so.3 may correspond to GMP 4.3.2.

So:

  (define gmp-4.3
    (package (inherit gmp)
      (version "4.3.2")
      (source (origin ...))))

And the use that in GHC.

HTH!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]