[Pkg-haskell-maintainers] Bug#787227: broken on armel due to broken RUNPATH: /usr/lib/ghc/bin/ghc: error while loading shared libraries: libHShaskeline-0.7.1.2-ghc7.8.4.so: cannot open shared object file: No such file or directory

Joey Hess id at joeyh.name
Sat May 30 01:56:55 UTC 2015


Package: ghc
Version: 7.8.4-8
Severity: important

root at honeybee:/# ghc
/usr/lib/ghc/bin/ghc: error while loading shared libraries: libHShaskeline-0.7.1.2-ghc7.8.4.so: cannot open shared object file: No such file or directory

root at honeybee:/# ls -l /usr/lib/ghc/haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.4.so
-rw-r--r-- 1 root root 2105712 May 25 20:47 /usr/lib/ghc/haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.4.so

The problem isn't unique to this one .so file:

root at honeybee:/# hsc2hs
/usr/lib/ghc/bin/hsc2hs: error while loading shared libraries: libHSprocess-1.2.0.0-ghc7.8.4.so: cannot open shared object file: No such file or directory
root at honeybee:/# ldd /usr/lib/ghc/bin/hsc2hs | grep libHSprocess
	libHSprocess-1.2.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../process-1.2.0.0/libHSprocess-1.2.0.0-ghc7.8.4.so (0xb6d9d000)
root at honeybee:/# ls -l /usr/lib/ghc/process-1.2.0.0/libHSprocess-1.2.0.0-ghc7.8.4.so
-rw-r--r-- 1 root root 156452 May 25 20:47 /usr/lib/ghc/process-1.2.0.0/libHSprocess-1.2.0.0-ghc7.8.4.so

(Strange that ldd is able to resolve the paths to the libraries
when ld-linux.so cannot..)

LD_DEBUG=all hsc2hs sheds some light on the problem.
Comparing with the output on amd64 and armhf, it seems that the linker
is seeing a RUNPATH that has "tls/v7l/neon/vfp" in it, instead of 
a RUNPATH that gives the directories where the haskell libraries are.

So, maybe something in the armel toolchain is overwriting the RUNPATH?

Horrible workaround: Make a ./tls/v7l/neon/vfp/ directory, and copy all the
libraries from ghc into it. :/

root at honeybee:/tmp# cp $(dpkg -L ghc |grep \.so) ./tls/v7l/neon/vfp/
root at honeybee:/tmp# ghc -V
The Glorious Glasgow Haskell Compilation System, version 7.8.4



armhf LD_DEBUG=all excerpt:

      4088:      search path=/usr/lib/ghc/bin/../process-1.2.0.0:/usr/lib/ghc/bin/../directory-1.2.1.0:/usr/lib/ghc/bin/../unix-2.7.0.1:/usr/lib/ghc/bin/../time-1.4.2:/usr/lib/ghc/bin/../old-locale-1.0.0.6:/usr/lib/ghc/bin/../filepath-1.3.0.2:/usr/lib/ghc/bin/../containers-0.5.5.1:/usr/lib/ghc/bin/../bytestring-0.10.4.0:/usr/lib/ghc/bin/../deepseq-1.3.0.2:/usr/lib/ghc/bin/../array-0.5.0.0:/usr/lib/ghc/bin/../base-4.7.0.2:/usr/lib/ghc/bin/../integer-gmp-0.5.1.0:/usr/lib/ghc/bin/../ghc-prim-0.3.1.0:/usr/lib/ghc/bin/../rts-1.0               (RUNPATH from file /usr/lib/ghc/bin/hsc2hs)

armel LF_DEBUG=all complete output for resolving the libHSprocess lib:

      3791:	file=libHSprocess-1.2.0.0-ghc7.8.4.so [0];  needed by /usr/lib/ghc/bin/hsc2hs [0]
      3791:	find library=libHSprocess-1.2.0.0-ghc7.8.4.so [0]; searching
      3791:	 search path=tls/v7l/neon/vfp:tls/v7l/neon:tls/v7l/vfp:tls/v7l:tls/neon/vfp:tls/neon:tls/vfp:tls:v7l/neon/vfp:v7l/neon:v7l/vfp:v7l:neon/vfp:neon:vfp:		(RUNPATH from file /usr/lib/ghc/bin/hsc2hs)
      3791:	  trying file=tls/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=tls/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	 search cache=/etc/ld.so.cache
      3791:	 search path=/lib/arm-linux-gnueabi/tls/v7l/neon/vfp:/lib/arm-linux-gnueabi/tls/v7l/neon:/lib/arm-linux-gnueabi/tls/v7l/vfp:/lib/arm-linux-gnueabi/tls/v7l:/lib/arm-linux-gnueabi/tls/neon/vfp:/lib/arm-linux-gnueabi/tls/neon:/lib/arm-linux-gnueabi/tls/vfp:/lib/arm-linux-gnueabi/tls:/lib/arm-linux-gnueabi/v7l/neon/vfp:/lib/arm-linux-gnueabi/v7l/neon:/lib/arm-linux-gnueabi/v7l/vfp:/lib/arm-linux-gnueabi/v7l:/lib/arm-linux-gnueabi/neon/vfp:/lib/arm-linux-gnueabi/neon:/lib/arm-linux-gnueabi/vfp:/lib/arm-linux-gnueabi:/usr/lib/arm-linux-gnueabi/tls/v7l/neon/vfp:/usr/lib/arm-linux-gnueabi/tls/v7l/neon:/usr/lib/arm-linux-gnueabi/tls/v7l/vfp:/usr/lib/arm-linux-gnueabi/tls/v7l:/usr/lib/arm-linux-gnueabi/tls/neon/vfp:/usr/lib/arm-linux-gnueabi/tls/neon:/usr/lib/arm-linux-gnueabi/tls/vfp:/usr/lib/arm-linux-gnueabi/tls:/usr/lib/arm-linux-gnueabi/v7l/neon/vfp:/usr/lib/arm-linux-gnueabi/v7l/neon:/usr/lib/arm-linux-gnueabi/v7l/vfp:/usr/lib/arm-linux-gnueabi/v7l:/usr/lib/arm-linux-gnueabi/neon/vfp:/usr/lib/arm-linux-gnueabi/neon:/usr/lib/arm-linux-gnueabi/vfp:/usr/lib/arm-linux-gnueabi:/lib/tls/v7l/neon/vfp:/lib/tls/v7l/neon:/lib/tls/v7l/vfp:/lib/tls/v7l:/lib/tls/neon/vfp:/lib/tls/neon:/lib/tls/vfp:/lib/tls:/lib/v7l/neon/vfp:/lib/v7l/neon:/lib/v7l/vfp:/lib/v7l:/lib/neon/vfp:/lib/neon:/lib/vfp:/lib:/usr/lib/tls/v7l/neon/vfp:/usr/lib/tls/v7l/neon:/usr/lib/tls/v7l/vfp:/usr/lib/tls/v7l:/usr/lib/tls/neon/vfp:/usr/lib/tls/neon:/usr/lib/tls/vfp:/usr/lib/tls:/usr/lib/v7l/neon/vfp:/usr/lib/v7l/neon:/usr/lib/v7l/vfp:/usr/lib/v7l:/usr/lib/neon/vfp:/usr/lib/neon:/usr/lib/vfp:/usr/lib	(system search path)
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/tls/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/arm-linux-gnueabi/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/tls/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/arm-linux-gnueabi/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/tls/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/lib/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/tls/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/v7l/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/v7l/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/v7l/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/v7l/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/neon/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/neon/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/vfp/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	  trying file=/usr/lib/libHSprocess-1.2.0.0-ghc7.8.4.so
      3791:	
/usr/lib/ghc/bin/hsc2hs: error while loading shared libraries: libHSprocess-1.2.0.0-ghc7.8.4.so: cannot open shared object file: No such file or directory

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20150529/d63e7a09/attachment.sig>


More information about the Pkg-haskell-maintainers mailing list