haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.71k stars 368 forks source link

2.9.0.1: `emake hls-ghc`: `gmake: Error: cabal: Failed to build ghc-lib-parser-9.8.2.20240223` #4435

Open benz0li opened 3 days ago

benz0li commented 3 days ago

Your environment

Which OS do you use? Alpine Linux 3.20.3

Which version of GHC do you use and how did you install it? 9.8.3
👉 Docker image glcr.b-data.ch/ghc/ghc-musl:9.8.3 (https://github.com/benz0li/ghc-musl)

Steps to reproduce

On a host with docker installed

docker run --rm -ti glcr.b-data.ch/ghc/ghc-musl:9.8.3 bash

Inside the container

export HLS_VERSION=2.9.0.1 \
  && apk add --no-cache patchelf findutils \
  && cd /tmp \
  && curl -sSL "https://github.com/haskell/haskell-language-server/archive/refs/tags/$HLS_VERSION.tar.gz" \
    -o "haskell-language-server-$HLS_VERSION.tar.gz" \
  && tar -xzf "haskell-language-server-$HLS_VERSION.tar.gz" \
  && cd "haskell-language-server-$HLS_VERSION" \
  && . .github/scripts/env.sh \
  && . .github/scripts/common.sh \
  && sed -i.bak -e '/DELETE MARKER FOR CI/,/END DELETE/d' cabal.project \
  && GHCS="$GHC_VERSION" \
  && export GHCS \
  && ARTIFACT="$(uname -m)-linux-alpine" \
  && export ARTIFACT \
  && cabal update \
  && emake hls-ghc \
  && CABAL_VERSION_NUMERIC="$(cabal --numeric-version)" \
  && if dpkg --compare-versions "${CABAL_VERSION_NUMERIC%.*.*}" ge "3.11"; then \
    sed -i 's|"$(STORE_DIR)/ghc-$(GHC_VERSION)"|"$(STORE_DIR)/ghc-$(GHC_VERSION)-inplace"|g' \
      GNUmakefile; \
  fi \
  && emake bindist \
  && strip "out/bindist/$ARTIFACT/haskell-language-server-$HLS_VERSION/lib/$GHC_VERSION"/*.so \
  && emake bindist-tar

Expected behaviour

HLS builds successfully.

Actual behaviour

Script errors at emake hls-ghc. E.g. https://gitlab.b-data.ch/ghc/ghc-musl/-/jobs/127755

Debug information

...
[414 of 433] Compiling GHC.Tc.Errors.Hole.Plugin[boot] ( compiler/GHC/Tc/Errors/Hole/Plugin.hs-boot, dist/build/GHC/Tc/Errors/Hole/Plugin.o-boot, dist/build/GHC/Tc/Errors/Hole/Plugin.dyn_o-boot )
Error: cabal: Failed to build ghc-lib-parser-9.8.2.20240223 (which is required
by exe:haskell-language-server-wrapper from haskell-language-server-2.9.0.1
and exe:haskell-language-server from haskell-language-server-2.9.0.1). See the
build log above for details.

gmake: *** [GNUmakefile:103: hls-ghc] Error 1

hls-2.9.0.1_build-log.txt

benz0li commented 3 days ago

Hmmm... Building GHC version 9.10.1 using GHC version 9.8.3 also fails:

FYI @bgamari @wz1000 @mpickering


Falling back to GHC 9.8.2 for bootstrapping:

benz0li commented 3 days ago

Ping @mpilgrem regarding https://github.com/commercialhaskell/stack and in case you intend to update the experimental project‑level configuration from version 9.8.2 to 9.8.3.

mpilgrem commented 3 days ago

@benz0li, in fact, I have recently updated that experimental project-level configuration.

benz0li commented 2 days ago

Hmmm... Building GHC version 9.10.1 using GHC version 9.8.3 also fails:

Cross reference:

benz0li commented 2 days ago

Most likely resolved by