Skip to content

hls-1.8.0.0 is broken on Ubuntu 20.04 due to missing GLIBC_2.34 #3160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
agustinmista opened this issue Sep 14, 2022 · 9 comments
Closed

hls-1.8.0.0 is broken on Ubuntu 20.04 due to missing GLIBC_2.34 #3160

agustinmista opened this issue Sep 14, 2022 · 9 comments
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@agustinmista
Copy link

Hi!

The latest release seems to be broken for me on Ubuntu 20.04:

[Error - 5:07:07 PM] Connection to server is erroring. Shutting down server.
/home/agustin/.ghcup/tmp/ghcup-ghc-8.10.7_cabal-3.6.2.0_hls-1.8.0.0_stack-2.7.5/haskell-language-server-wrapper: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/agustin/.ghcup/tmp/ghcup-ghc-8.10.7_cabal-3.6.2.0_hls-1.8.0.0_stack-2.7.5/haskell-language-server-wrapper)

For reference, here is the current version of GLIBC shipped with Ubuntu 20.04:

$ ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31

This happened today after VSCode (forcibly) asked me to update it to 1.8.0.0.

In the meantime, I managed to circumvent the problem in VSCode by reverting HLS back to 1.7.0.0 in the settings.json file:

    "haskell.toolchain": {
      "hls" : "1.7.0.0"
    }
@agustinmista agustinmista added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Sep 14, 2022
@adlaika
Copy link

adlaika commented Sep 14, 2022

Not sure if helpful, but: I'm on Pop!_OS 22.04 LTS, which is derivative of Ubuntu, and it's working fine for me.

My GLIBC is > 2.34, though:

$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35

@pepeiborra
Copy link
Collaborator

Ubuntu is getting the fedora 33 binary now, we probably need to change that.

There are binaries for other distros here: https://downloads.haskell.org/~hls/haskell-language-server-1.8.0.0/

Can you let me know which is the most recent binary that works in your system?

@lsmor
Copy link

lsmor commented Sep 14, 2022

I can confirm this is the case. Actually, I commented this same issue in the Haskell discourse thread. In Ubuntu hls-1.7.0.0 works fine, which up to ghcup-metada uses the fedora27 binary. I don't know if this is a ghcup problem or hls... who is responsable for the ghcup-metada.yaml file?

Also I've check installing debian version of hls-1.8.0 with ghcup using the command

ghcup install hls -u https://downloads.haskell.org/~hls/haskell-language-server-1.8.0.0/haskell-language-server-1.8.0.0-x86_64-linux-deb10.tar.xz 1.8.0.0

This actually makes hls to work again. Not the optimal solution, but a workaround.

@konn
Copy link
Collaborator

konn commented Sep 15, 2022

It fails on my Ubuntu 20.04.4 environment seems, too.
Forcing GHCup to reinstall HLS 1.8 for Debian 10 makes GLIBC error disappear, but it didn't work with GHC 9.0.2 installed by stack, due to ABI mismatch. While ago, I had followed the instruction to install GHC 9.0.2 binary for Fedora 27, but it seems that this time the binary contradicts the HLS binary for Debian 10 HLS binary.
I've already tested https://downloads.haskell.org/ghc/9.0.2/ghc-9.0.2-x86_64-deb10-linux.tar.xz but it still contradicts the ABI of HLS 1.8.0 debian 10 binary as for ghc-boot and array.

@konn
Copy link
Collaborator

konn commented Sep 15, 2022

OK, digging ~/.ghcup/cache, it turns out that this binary works with Debian 10 HLS 1.8.0.0: https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/9.0.2/ghc-9.0.2-x86_64-deb10-linux.tar.xz .
As I'm using stack, nuking ~/.stack/programs/x86_64-linux/ghc-tinfo6-9.0.2* and adding the following lines to ~/.stack/config.yaml worked:

setup-info:
  ghc:
    linux64-tinfo6:
      9.0.2:
        url: "https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/9.0.2/ghc-9.0.2-x86_64-deb10-linux.tar.xz"
        sha256: a33263c3f819de606da079d191ddc3b86cbf503a14c6c0eec1a4ae1899008fdc

@hasufell
Copy link
Member

hasufell commented Sep 16, 2022

My attempts at fixing ubuntu failed. I tried to build two new HLS bindists on 18.04 and 20.04 in docker containers locally on my machine. All GHCs finish, except 8.10.7, which fails with obscure TH errors:

[17 of 73] Compiling Development.IDE.Session.VersionCheck ( session-loader/Development/IDE/Session/VersionCheck.hs, dist/build/Development/IDE/Session/VersionCheck.o, dist/build/Development/IDE/Session/VersionCheck.dyn_o )

session-loader/Development/IDE/Session/VersionCheck.hs:15:24: error:
    * Exception when trying to run compile-time code:
        ghc: can't find a package database at /home/hasufell/.cabal/store/ghc-8.10.7/package.db
      Code: makeGhcVersionChecker (return GHC.Paths.libdir)
    * In the Template Haskell splice
        $$(makeGhcVersionChecker (return GHC.Paths.libdir))
      In the expression:
        $$(makeGhcVersionChecker (return GHC.Paths.libdir))
      In an equation for `ghcVersionChecker':
          ghcVersionChecker
            = $$(makeGhcVersionChecker (return GHC.Paths.libdir))

There is no such directory /home/hasufell in the docker container, dist-newstyle was cleaned up, git checkout is clean. The build is run as root. So this seems like a GHC bug to me. I got no time left investigating this.

@hasufell
Copy link
Member

Ubuntu has been fixed: haskell/ghcup-metadata@cea8655

Bindists are unofficial: https://downloads.haskell.org/~ghcup/unofficial-bindists/haskell-language-server/1.8.0.0/

CI run: https://github.com/haskell/ghcup-metadata/actions/runs/3066752966


To fix your existing installation run this:

ghcup rm hls 1.8.0.0
ghcup install hls 1.8.0.0

@decapo01
Copy link

Ubuntu has been fixed: haskell/ghcup-metadata@cea8655

Bindists are unofficial: https://downloads.haskell.org/~ghcup/unofficial-bindists/haskell-language-server/1.8.0.0/

CI run: https://github.com/haskell/ghcup-metadata/actions/runs/3066752966

To fix your existing installation run this:

ghcup rm hls 1.8.0.0
ghcup install hls 1.8.0.0

I'm still getting this error after reinstalling hls with this procedure. I'm on Pop!_OS 20.04 LTS. With the ldd output here

» ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31

@hasufell
Copy link
Member

PopOS is not Ubuntu and not explicitly supported by ghcup. That means we fall back to Linux Unknown, which picks the fedora bindists.

Open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

7 participants