From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: 'patchelf' doesn't change shared libraries Date: Tue, 16 Jul 2013 00:01:41 +0200 Message-ID: <87zjtneb3u.fsf@gnu.org> References: <87zjtpi7vp.fsf@karetnikov.org> <87fvvhfe8f.fsf@gnu.org> <8738rhmb33.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyquu-0008A8-TM for guix-devel@gnu.org; Mon, 15 Jul 2013 18:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyqur-0003DA-7B for guix-devel@gnu.org; Mon, 15 Jul 2013 18:06:48 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:43532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyqur-0003D3-26 for guix-devel@gnu.org; Mon, 15 Jul 2013 18:06:45 -0400 In-Reply-To: <8738rhmb33.fsf@karetnikov.org> (Nikita Karetnikov's message of "Sun, 14 Jul 2013 19:10:24 +0400") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: >> Could you run =E2=80=98objdump -x .../ghc-pkg | grep PATH=E2=80=99, to c= heck 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/li= b/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 , 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=E2=80=99.