[Pkg-haskell-maintainers] Bug#773768: jenkins reproduces this issue

Helmut Grohne helmut at subdivi.de
Fri May 1 08:57:34 UTC 2015


On Fri, May 01, 2015 at 09:13:54AM +0200, Joachim Breitner wrote:
> also, I still cannot reproduce the issue. I ran

I confirm. I tried "apt-get install debbindiff --install-recommends",
which should be equivalent, in a pbuilder --login and it did not
reproduce the issue either.

I also tried installing ghc and its depends in two steps to see whether
a missing ldconfig invocation after ghc unpack could be a cause. From my
pbuilder --login this succeeded without issue.

Now I tried again from a fresh debootstrap sid. First install all of
ghc's depends. Then install ghc:

| # apt-get install ghc
| Reading package lists... Done
| Building dependency tree       
| Reading state information... Done
| Suggested packages:
|   perl ghc-prof ghc-doc haskell-doc llvm-3.4
| The following NEW packages will be installed:
|   ghc
| 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
| Need to get 35.6 MB of archives.
| After this operation, 397 MB of additional disk space will be used.
| Get:1 http://proxy:9999/debian/ sid/main ghc amd64 7.8.4-3 [35.6 MB]
| Fetched 35.6 MB in 1min 9s (511 kB/s)                                                                                                                                                  
| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
| Selecting previously unselected package ghc.
| (Reading database ... 14523 files and directories currently installed.)
| Preparing to unpack .../archives/ghc_7.8.4-3_amd64.deb ...
| Unpacking ghc (7.8.4-3) ...
| Processing triggers for man-db (2.7.0.2-5) ...
| Setting up ghc (7.8.4-3) ...
| /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
| update-alternatives: using /usr/bin/ghc to provide /usr/bin/haskell-compiler (haskell-compiler) in auto mode
| /usr/lib/ghc/bin/ghc-pkg: error while loading shared libraries: libHSterminfo-0.4.0.0-ghc7.8.4.so: cannot open shared object file: No such file or directory
| dpkg: error processing package ghc (--configure):
|  subprocess installed post-installation script returned error exit status 127
| Errors were encountered while processing:
|  ghc
| E: Sub-process /usr/bin/dpkg returned an error code (1)
| #

Surprisingly ldd /usr/lib/ghc/bin/ghc looks sane in this state:

| # ldd /usr/lib/ghc/bin/ghc
|         linux-vdso.so.1 (0x00007fffac9ff000)
|         libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f2ec2ef3000)
|         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2ec2cea000)
|         libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f2ec2ae7000)
|         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2ec28e3000)
|         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2ec26c5000)
|         libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f2ec2442000)
|         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2ec2141000)
|         libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f2ec1f38000)
|         libHShaskeline-0.7.1.2-ghc7.8.4.so => /usr/lib/ghc/bin/../haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.4.so (0x00007f2ec1bbf000)
|         libHSterminfo-0.4.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../terminfo-0.4.0.0/libHSterminfo-0.4.0.0-ghc7.8.4.so (0x00007f2ec1989000)
|         libHSghc-7.8.4-ghc7.8.4.so => /usr/lib/ghc/bin/../ghc-7.8.4/libHSghc-7.8.4-ghc7.8.4.so (0x00007f2ebe047000)
|         libHStransformers-0.3.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../transformers-0.3.0.0/libHStransformers-0.3.0.0-ghc7.8.4.so (0x00007f2ebdd9f000)
|         libHStemplate-haskell-2.9.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../template-haskell-2.9.0.0/libHStemplate-haskell-2.9.0.0-ghc7.8.4.so (0x00007f2ebd965000)
|         libHShpc-0.6.0.1-ghc7.8.4.so => /usr/lib/ghc/bin/../hpc-0.6.0.1/libHShpc-0.6.0.1-ghc7.8.4.so (0x00007f2ebd738000)
|         libHShoopl-3.10.0.1-ghc7.8.4.so => /usr/lib/ghc/bin/../hoopl-3.10.0.1/libHShoopl-3.10.0.1-ghc7.8.4.so (0x00007f2ebd4b0000)
|         libHSbin-package-db-0.0.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../bin-package-db-0.0.0.0/libHSbin-package-db-0.0.0.0-ghc7.8.4.so (0x00007f2ebd299000)
|         libHSbinary-0.7.1.0-ghc7.8.4.so => /usr/lib/ghc/bin/../binary-0.7.1.0/libHSbinary-0.7.1.0-ghc7.8.4.so (0x00007f2ebd01f000)
|         libHSCabal-1.18.1.5-ghc7.8.4.so => /usr/lib/ghc/bin/../Cabal-1.18.1.5/libHSCabal-1.18.1.5-ghc7.8.4.so (0x00007f2ebc4de000)
|         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 (0x00007f2ebc2c0000)
|         libHSpretty-1.1.1.1-ghc7.8.4.so => /usr/lib/ghc/bin/../pretty-1.1.1.1/libHSpretty-1.1.1.1-ghc7.8.4.so (0x00007f2ebc0a5000)
|         libHScontainers-0.5.5.1-ghc7.8.4.so => /usr/lib/ghc/bin/../containers-0.5.5.1/libHScontainers-0.5.5.1-ghc7.8.4.so (0x00007f2ebbcc7000)
|         libHSdirectory-1.2.1.0-ghc7.8.4.so => /usr/lib/ghc/bin/../directory-1.2.1.0/libHSdirectory-1.2.1.0-ghc7.8.4.so (0x00007f2ebbaaa000)
|         libHSunix-2.7.0.1-ghc7.8.4.so => /usr/lib/ghc/bin/../unix-2.7.0.1/libHSunix-2.7.0.1-ghc7.8.4.so (0x00007f2ebb7e9000)
|         libHStime-1.4.2-ghc7.8.4.so => /usr/lib/ghc/bin/../time-1.4.2/libHStime-1.4.2-ghc7.8.4.so (0x00007f2ebb4f6000)
|         libHSold-locale-1.0.0.6-ghc7.8.4.so => /usr/lib/ghc/bin/../old-locale-1.0.0.6/libHSold-locale-1.0.0.6-ghc7.8.4.so (0x00007f2ebb2e5000)
|         libHSfilepath-1.3.0.2-ghc7.8.4.so => /usr/lib/ghc/bin/../filepath-1.3.0.2/libHSfilepath-1.3.0.2-ghc7.8.4.so (0x00007f2ebb0c5000)
|         libHSbytestring-0.10.4.0-ghc7.8.4.so => /usr/lib/ghc/bin/../bytestring-0.10.4.0/libHSbytestring-0.10.4.0-ghc7.8.4.so (0x00007f2ebade6000)
|         libHSdeepseq-1.3.0.2-ghc7.8.4.so => /usr/lib/ghc/bin/../deepseq-1.3.0.2/libHSdeepseq-1.3.0.2-ghc7.8.4.so (0x00007f2ebabde000)
|         libHSarray-0.5.0.0-ghc7.8.4.so => /usr/lib/ghc/bin/../array-0.5.0.0/libHSarray-0.5.0.0-ghc7.8.4.so (0x00007f2eba944000)
|         libHSbase-4.7.0.2-ghc7.8.4.so => /usr/lib/ghc/bin/../base-4.7.0.2/libHSbase-4.7.0.2-ghc7.8.4.so (0x00007f2eb9fca000)
|         libHSinteger-gmp-0.5.1.0-ghc7.8.4.so => /usr/lib/ghc/bin/../integer-gmp-0.5.1.0/libHSinteger-gmp-0.5.1.0-ghc7.8.4.so (0x00007f2eb9daf000)
|         libHSghc-prim-0.3.1.0-ghc7.8.4.so => /usr/lib/ghc/bin/../ghc-prim-0.3.1.0/libHSghc-prim-0.3.1.0-ghc7.8.4.so (0x00007f2eb9b32000)
|         libHSrts_thr-ghc7.8.4.so => /usr/lib/ghc/bin/../rts-1.0/libHSrts_thr-ghc7.8.4.so (0x00007f2eb98c2000)
|         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2eb9519000)
|         /lib64/ld-linux-x86-64.so.2 (0x00007f2ec3124000)
| #

Still invoking it fails.

| # /usr/lib/ghc/bin/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
| # 

More surprisingly, running ldconfig does not fix the issue.

Going further invoking the linker directly makes loading libraries
succeed.

| # /lib64/ld-linux-x86-64.so.2 /usr/lib/ghc/bin/ghc
| ghc: missing -B<dir> option
| # 

We can observe that ghc looks for libraries in "." by seeing that it misses a
different library.

| /usr/lib/ghc/haskeline-0.7.1.2# ../bin/ghc
| ../bin/ghc: error while loading shared libraries: libHSterminfo-0.4.0.0-ghc7.8.4.so: cannot open shared object file: No such file or directory
| /usr/lib/ghc/haskeline-0.7.1.2#

Also note the output of old-sytle ldd:

| # LD_TRACE_LOADED_OBJECTS=1 /usr/lib/ghc/bin/ghc
|         linux-vdso.so.1 (0x00007fff3db2b000)
|         libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f959cdc2000)
|         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f959cbba000)
|         libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f959c9b7000)
|         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f959c7b3000)
|         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f959c596000)
|         libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f959c313000)
|         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f959c012000)
|         libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f959be0a000)
|         libHShaskeline-0.7.1.2-ghc7.8.4.so => not found
|         libHSterminfo-0.4.0.0-ghc7.8.4.so => not found
|         libHSghc-7.8.4-ghc7.8.4.so => not found
|         libHStransformers-0.3.0.0-ghc7.8.4.so => not found
|         libHStemplate-haskell-2.9.0.0-ghc7.8.4.so => not found
|         libHShpc-0.6.0.1-ghc7.8.4.so => not found
|         libHShoopl-3.10.0.1-ghc7.8.4.so => not found
|         libHSbin-package-db-0.0.0.0-ghc7.8.4.so => not found
|         libHSbinary-0.7.1.0-ghc7.8.4.so => not found
|         libHSCabal-1.18.1.5-ghc7.8.4.so => not found
|         libHSprocess-1.2.0.0-ghc7.8.4.so => not found
|         libHSpretty-1.1.1.1-ghc7.8.4.so => not found
|         libHScontainers-0.5.5.1-ghc7.8.4.so => not found
|         libHSdirectory-1.2.1.0-ghc7.8.4.so => not found
|         libHSunix-2.7.0.1-ghc7.8.4.so => not found
|         libHStime-1.4.2-ghc7.8.4.so => not found
|         libHSold-locale-1.0.0.6-ghc7.8.4.so => not found
|         libHSfilepath-1.3.0.2-ghc7.8.4.so => not found
|         libHSbytestring-0.10.4.0-ghc7.8.4.so => not found
|         libHSdeepseq-1.3.0.2-ghc7.8.4.so => not found
|         libHSarray-0.5.0.0-ghc7.8.4.so => not found
|         libHSbase-4.7.0.2-ghc7.8.4.so => not found
|         libHSinteger-gmp-0.5.1.0-ghc7.8.4.so => not found
|         libHSghc-prim-0.3.1.0-ghc7.8.4.so => not found
|         libHSrts_thr-ghc7.8.4.so => not found
|         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f959ba61000)
|         /lib64/ld-linux-x86-64.so.2 (0x00007f959cfec000)
| # 

Then I compared strace of /usr/lib/ghc/bin/ghc in both my pbuilder
--login and a fresh sid debootstrap and it occurred to me: You must
mount /proc. And indeed after mounting /proc, ghc just works.

What do we do with this knowledge? Is it a bug? Is it a bad error
message from the linker?

I would like to thank Bernhard R. Link, Emilio Pozuelo Monfort, and
Geoffrey Thomas for helping me dissect this issue.

Helmut



More information about the Pkg-haskell-maintainers mailing list