Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On 12 Feb 2018, at 15:18, John Paul Adrian Glaubitzwrote: > On 02/12/2018 04:16 PM, Holger Levsen wrote: >> Downgrading the bug to normal, though I guess you can also close it. The >> openjdk packages have the same issue. (But maybe you want to keep it >> open to implement a message to the user saying "arg, /proc not mounted, >> but we need it, aborting" or some such.) > The Rust compiler has the same issue. Without /proc, it won't be able > to find it's shared libraries. I'm not 100% sure, but I guess it's > an issue when using dlopen() to load the libraries afterwards, but I never > bothered to look into the details. Ok, found it: _dl_get_origin tries to readlink /proc/self/exe to find the value of $ORIGIN, falling back on the (empty) LD_ORIGIN_PATH environment variable when that fails; I assume it does this instead of using readlink on the value of AT_EXECFN in auxv due to the possible race condition. This isn't really a bug in ghc, as it's a system limitation, though I guess for Debian we could avoid the use of $ORIGIN as we know where ghc will be installed, though given ghc-stageX are executed during the build that might be awkward without either re-linking or setting LD_LIBRARY_PATH (or equivalent). James ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On 02/12/2018 04:16 PM, Holger Levsen wrote: Downgrading the bug to normal, though I guess you can also close it. The openjdk packages have the same issue. (But maybe you want to keep it open to implement a message to the user saying "arg, /proc not mounted, but we need it, aborting" or some such.) The Rust compiler has the same issue. Without /proc, it won't be able to find it's shared libraries. I'm not 100% sure, but I guess it's an issue when using dlopen() to load the libraries afterwards, but I never bothered to look into the details. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
control: severity -1 normal thanks Hi Adrian, On Mon, Feb 12, 2018 at 03:50:37PM +0100, John Paul Adrian Glaubitz wrote: > Has the chroot in which you are trying to install /proc mounted? > > Without /proc mounted, GHC is unable to find it's shared libraries > and this particular issue shows up. good catch, that was indeed the case and fixed the issue. Thanks! Downgrading the bug to normal, though I guess you can also close it. The openjdk packages have the same issue. (But maybe you want to keep it open to implement a message to the user saying "arg, /proc not mounted, but we need it, aborting" or some such.) -- cheers, Holger signature.asc Description: PGP signature ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
Hi Holger! Has the chroot in which you are trying to install /proc mounted? Without /proc mounted, GHC is unable to find it's shared libraries and this particular issue shows up. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On Fri, Feb 09, 2018 at 11:43:56AM +, James Clarke wrote: > What version of glibc do you have? Have you got any interesting (to ld.so) > environment variables exported or configuration files changed? root@appvm:/home/user# ghc /usr/lib/ghc/bin/ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so: cannot open shared object file: No such file or directory root@appvm:/home/user# export declare -x HOME="/root" declare -x LOGNAME="root" declare -x OLDPWD declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" declare -x PWD="/home/user" declare -x SCHROOT_ALIAS_NAME="sid" declare -x SCHROOT_CHROOT_NAME="sid" declare -x SCHROOT_COMMAND="-bash" declare -x SCHROOT_GID="0" declare -x SCHROOT_GROUP="root" declare -x SCHROOT_SESSION_ID="sid" declare -x SCHROOT_UID="0" declare -x SCHROOT_USER="root" declare -x SHELL="/bin/bash" declare -x SHLVL="1" declare -x TERM="xterm-256color" declare -x USER="root" root@appvm:/home/user# dpkg -l |grep libc- ii klibc-utils2.0.4-11 amd64small utilities built with klibc for early boot ii libc-bin 2.26-6 amd64GNU C Library: Binaries ii libc-dev-bin 2.26-6 amd64GNU C Library: Development binaries ii libc-l10n 2.26-6 all GNU C Library: localization files ii linux-libc-dev:amd64 4.14.13-1 amd64Linux support headers for userspace development all packages are updated to latest in sid for amd64 (and the fact that I see this in Qubes seems to be irrelevant as Petter saw this on a plain Debian system as well). -- cheers, Holger signature.asc Description: PGP signature ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On 8 Feb 2018, at 19:46, Holger Levsenwrote: > > On Thu, Feb 08, 2018 at 03:04:22PM +0100, Petter Reinholdtsen wrote: >> [Clint Adams] >>> objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH > > $ objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH > RUNPATH > > $ORIGIN/../terminfo-0.4.0.2:$ORIGIN/../ghc-boot-8.0.2:$ORIGIN/../ghc-boot-th-8.0.2:$ORIGIN/../Cabal-1.24.2.0:$ORIGIN/../process-1.4.3.0:$ORIGIN/../pretty-1.1.3.3:$ORIGIN/../directory-1.3.0.0:$ORIGIN/../unix-2.7.2.1:$ORIGIN/../time-1.6.0.1:$ORIGIN/../filepath-1.4.1.1:$ORIGIN/../binary-0.8.3.0:$ORIGIN/../containers-0.5.7.1:$ORIGIN/../bytestring-0.10.8.1:$ORIGIN/../deepseq-1.4.2.0:$ORIGIN/../array-0.5.1.1:$ORIGIN/../base-4.9.1.0:$ORIGIN/../integer-gmp-1.0.0.1:$ORIGIN/../ghc-prim-0.5.0.0:$ORIGIN/../rts > > is what I get. Do you need any more info? I still see this... Well that's correct; you can see $ORIGIN/../terminfo-0.4.0.2 in there which is where it should be getting libHSterminfo-0.4.0.2-ghc8.0.2.so, but for some reason your ld.so is not looking at RUNPATH; once it fails to find it on the system search path it's supposed to then print something like: 15470: search path=/usr/lib/ghc/bin/../terminfo-0.4.0.2:/usr/lib/ghc/bin/../ghc-boot-8.0.2:/usr/lib/ghc/bin/../ghc-boot-th-8.0.2:/usr/lib/ghc/bin/../Cabal-1.24.2.0:/usr/lib/ghc/bin/../process-1.4.3.0:/usr/lib/ghc/bin/../pretty-1.1.3.3:/usr/lib/ghc/bin/../directory-1.3.0.0:/usr/lib/ghc/bin/../unix-2.7.2.1:/usr/lib/ghc/bin/../time-1.6.0.1:/usr/lib/ghc/bin/../filepath-1.4.1.1:/usr/lib/ghc/bin/../binary-0.8.3.0:/usr/lib/ghc/bin/../containers-0.5.7.1:/usr/lib/ghc/bin/../bytestring-0.10.8.1:/usr/lib/ghc/bin/../deepseq-1.4.2.0:/usr/lib/ghc/bin/../array-0.5.1.1:/usr/lib/ghc/bin/../base-4.9.1.0:/usr/lib/ghc/bin/../integer-gmp-1.0.0.1:/usr/lib/ghc/bin/../ghc-prim-0.5.0.0:/usr/lib/ghc/bin/../rts/tls/x86_64/x86_64:/usr/lib/ghc/bin/../rts/tls/x86_64:/usr/lib/ghc/bin/../rts/tls/x86_64:/usr/lib/ghc/bin/../rts/tls:/usr/lib/ghc/bin/../rts/x86_64/x86_64:/usr/lib/ghc/bin/../rts/x86_64:/usr/lib/ghc/bin/../rts/x86_64:/usr/lib/ghc/bin/../rts (RUNPATH from file /usr/lib/ghc/bin/ghc-pkg) What version of glibc do you have? Have you got any interesting (to ld.so) environment variables exported or configuration files changed? Regards, James ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On Thu, Feb 08, 2018 at 03:04:22PM +0100, Petter Reinholdtsen wrote: > [Clint Adams] > > objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH $ objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH RUNPATH $ORIGIN/../terminfo-0.4.0.2:$ORIGIN/../ghc-boot-8.0.2:$ORIGIN/../ghc-boot-th-8.0.2:$ORIGIN/../Cabal-1.24.2.0:$ORIGIN/../process-1.4.3.0:$ORIGIN/../pretty-1.1.3.3:$ORIGIN/../directory-1.3.0.0:$ORIGIN/../unix-2.7.2.1:$ORIGIN/../time-1.6.0.1:$ORIGIN/../filepath-1.4.1.1:$ORIGIN/../binary-0.8.3.0:$ORIGIN/../containers-0.5.7.1:$ORIGIN/../bytestring-0.10.8.1:$ORIGIN/../deepseq-1.4.2.0:$ORIGIN/../array-0.5.1.1:$ORIGIN/../base-4.9.1.0:$ORIGIN/../integer-gmp-1.0.0.1:$ORIGIN/../ghc-prim-0.5.0.0:$ORIGIN/../rts is what I get. Do you need any more info? I still see this... -- cheers, Holger signature.asc Description: PGP signature ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
[Clint Adams] > objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH Sorry, I removed ghc from my chroot to get the upgrade going, and when I reinstalled it now the problem has disappeared. -- Happy hacking Petter Reinholdtsen ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
On Thu, Feb 08, 2018 at 06:12:31AM +0100, Petter Reinholdtsen wrote: > 15427: file=libHSterminfo-0.4.0.2-ghc8.0.2.so [0]; needed by > /usr/lib/ghc/bin/ghc-pkg [0] objdump -p /usr/lib/ghc/bin/ghc-pkg | grep RUNPATH ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
I see this problem too in my sid chroot: # apt upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: liblivemedia61 libplacebo2 Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory) Setting up ghc (8.0.2-11) ... /usr/lib/ghc/bin/ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so: cannot open shared object file: No such file or directory /usr/lib/ghc/bin/ghc-pkg: error while loading shared libraries: libHSterminfo-0.4.0.2-ghc8.0.2.so: cannot open shared object file: No such file or directory dpkg: error processing package ghc (--configure): installed ghc package post-installation script subprocess returned error exit status 127 Errors were encountered while processing: ghc E: Sub-process /usr/bin/dpkg returned an error code (1) # [James Clarke] > Can you run > `/usr/lib/ghc/bin/ghc-pkg --version` successfully? Please try running > with LD_DEBUG=libs,files and post the output. Here is what I am seeing: # LD_DEBUG=libs,files /usr/lib/ghc/bin/ghc-pkg --version 15427: 15427: file=libffi.so.6 [0]; needed by /usr/lib/ghc/bin/ghc-pkg [0] 15427: find library=libffi.so.6 [0]; searching 15427: search cache=/etc/ld.so.cache 15427: trying file=/usr/lib/x86_64-linux-gnu/libffi.so.6 15427: 15427: file=libffi.so.6 [0]; generating link map 15427: dynamic: 0x7f57e6da3e08 base: 0x7f57e6b9c000 size: 0x00208668 15427: entry: 0x7f57e6b9d960 phdr: 0x7f57e6b9c040 phnum: 7 15427: 15427: 15427: file=libHSterminfo-0.4.0.2-ghc8.0.2.so [0]; needed by /usr/lib/ghc/bin/ghc-pkg [0] 15427: find library=libHSterminfo-0.4.0.2-ghc8.0.2.so [0]; searching 15427: search cache=/etc/ld.so.cache 15427: search path=/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64/x86_64:/lib/tls/x86_64:/lib/tls/x86_64:/lib/tls:/lib/x86_64/x86_64:/lib/x86_64:/lib/x86_64:/lib:/usr/lib/tls/x86_64/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64/x86_64:/usr/lib/x86_64:/usr/lib/x86_64:/usr/lib (system search path) 15427: trying file=/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/tls/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/x86_64/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/x86_64-linux-gnu/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/tls/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/x86_64/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/usr/lib/x86_64-linux-gnu/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/tls/x86_64/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/tls/x86_64/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying file=/lib/tls/libHSterminfo-0.4.0.2-ghc8.0.2.so 15427: trying
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
Control: tags -1 moreinfo On Wed, Feb 07, 2018 at 05:02:09PM +0100, Holger Levsen wrote: > Package: ghc > Version: 8.0.2-11 > Severity: serious > > Selecting previously unselected package ghc. > Preparing to unpack .../ghc_8.0.2-11_amd64.deb ... > Unpacking ghc (8.0.2-11) ... > Setting up libbsd-dev:amd64 (0.8.7-1) ... > Setting up ghc (8.0.2-11) ... > /usr/lib/ghc/bin/ghc: error while loading shared libraries: > libHShaskeline-0.7.3.0-ghc8.0.2.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.2-ghc8.0.2.so: cannot open shared object file: No > such file or directory > dpkg: error processing package ghc (--configure): > installed ghc package post-installation script subprocess returned > error exit status 127 > Processing triggers for man-db (2.8.0-2) ... > Errors were encountered while processing: > ghc > E: Sub-process /usr/bin/dpkg returned an error code (1) > > > This is from a sid schroot which I first upgraded as usual, which failed > like the above, so I removed ghc and tried to install it again, which > then produced the output above. Hi, I just upgraded my sid system without issue. I also tried installing ghc in an up-to-date cowbuilder chroot and it all worked. Can you run `/usr/lib/ghc/bin/ghc-pkg --version` successfully? Please try running with LD_DEBUG=libs,files and post the output. Regards, James ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Processed: Re: Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
Processing control commands: > tags -1 moreinfo Bug #889829 [ghc] ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so Added tag(s) moreinfo. -- 889829: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889829 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so
Package: ghc Version: 8.0.2-11 Severity: serious Selecting previously unselected package ghc. Preparing to unpack .../ghc_8.0.2-11_amd64.deb ... Unpacking ghc (8.0.2-11) ... Setting up libbsd-dev:amd64 (0.8.7-1) ... Setting up ghc (8.0.2-11) ... /usr/lib/ghc/bin/ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.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.2-ghc8.0.2.so: cannot open shared object file: No such file or directory dpkg: error processing package ghc (--configure): installed ghc package post-installation script subprocess returned error exit status 127 Processing triggers for man-db (2.8.0-2) ... Errors were encountered while processing: ghc E: Sub-process /usr/bin/dpkg returned an error code (1) This is from a sid schroot which I first upgraded as usual, which failed like the above, so I removed ghc and tried to install it again, which then produced the output above. -- cheers, Holger signature.asc Description: PGP signature ___ Pkg-haskell-maintainers mailing list Pkg-haskell-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers