Skip to content

error while loading shared libraries: libHSinteger-gmp-1.1-ghc9.4.8.so: cannot open shared object file: No such file or directory #3905

Open
@thkoch2001

Description

@thkoch2001

Your environment

  • Host machine
    • Debian 12
    • Emacs 28.2 (installed via nix package manager)
    • eglot
  • VM
    • Debian 12
    • stack 2.13.1
    • Haskell project with GHC 9.4.8
    • HLS 2.5.0.0 installed via ghcup

What's wrong?

I'm working in Emacs running on the host over SSH (via emacs tramp-mode), editing files on the VM. When I try to start eglot, the Eglot buffer shows:

[stderr] 2023-12-16T14:14:07.984860Z | Debug | executing command: stack exec ghc -- --print-libdir
[internal] Sat Dec 16 16:14:08 2023:
(:message "Connection state changed" :change "exited abnormally with code 127\n")

----------b---y---e---b---y---e----------
[stderr] /usr/bin/haskell-language-server-9.4.8: error while loading shared libraries: libHSinteger-gmp-1.1-ghc9.4.8.so: cannot open shared object file: No such file or directory

However when I execute HLS from the cli in the VM it runs normally and just waits for JSON input.

This might be a problem in Tramp, but I'd very much appreciate any hints, what HLS is doing when it fails and where to find the code in HLS that fails.

When I lookup ldd ldd haskell-language-server-9.4.8 it says: "not a dynamic executable". So there must be some code somewhere in HLS that tries to dynamically load shared libraries and for some reason does not get the path right when called by Tramp.

Activity

thkoch2001

thkoch2001 commented on Dec 16, 2023

@thkoch2001
Author

I now built HLS from git with resolver: lts-21.23 and stack install and eglot just worked.

added
bindistsAnything to do with binary distributions of HLS
and removed on Dec 16, 2023
michaelpj

michaelpj commented on Dec 18, 2023

@michaelpj
Collaborator

Is there some template haskell code in the project? We need to build and load the TH dependencies in order to evaluate splices, so maybe that's where it's coming from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bindistsAnything to do with binary distributions of HLStype: supportUser support tickets, questions, help with setup etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @thkoch2001@michaelpj@fendor

        Issue actions

          error while loading shared libraries: libHSinteger-gmp-1.1-ghc9.4.8.so: cannot open shared object file: No such file or directory · Issue #3905 · haskell/haskell-language-server