-
-
Save DylanSp/19a3b076bbf53320cbae5573790cd50e to your computer and use it in GitHub Desktop.
More haskell-language-server segfaulting fun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
build-essential \ | |
libgmp10 \ | |
libgmp-dev \ | |
libtinfo5 \ | |
libtinfo-dev \ | |
zlib1g-dev \ | |
libffi6 \ | |
libffi-dev \ | |
libncurses5 \ | |
libncurses-dev \ | |
git \ | |
gdb | |
# Install ghcup | |
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh | |
# Make sure ghcup is on PATH | |
ENV PATH "$PATH:/root/.ghcup/bin" | |
# Install GHC with ghcup | |
RUN ghcup install ghc 8.10.4 | |
RUN ghcup set ghc 8.10.4 | |
# Install Cabal with ghcup | |
RUN ghcup install cabal 3.4 | |
WORKDIR /hls_source | |
RUN git clone --branch 1.4.0 --depth 1 https://github.com/haskell/haskell-language-server.git | |
WORKDIR /hls_source/haskell-language-server | |
RUN cabal update && cabal build exe:haskell-language-server -O2 --enable-executable-static --ghc-options="-split-sections" | |
# Find built executable and put it on PATH | |
# for some reason, using "cabal install" instead of "cabal build" doesn't respect --enable-executable-static, or trigger assertion fail | |
RUN find dist-newstyle -type f -name haskell-language-server -exec cp {} /usr/local/bin \; | |
# Install Stack, configure to use GHC from ghcup | |
RUN ghcup install stack | |
RUN stack config set install-ghc false --global | |
RUN stack config set system-ghc true --global | |
WORKDIR /wasp | |
RUN git clone https://github.com/wasp-lang/wasp.git | |
WORKDIR /wasp/wasp/waspc | |
RUN stack build --no-run-tests --no-run-benchmarks waspc:lib waspc:exe:wasp waspc:test:waspc-test waspc:bench:waspc-benchmarks | |
CMD ["haskell-language-server", "."] | |
# Run container without arguments to see assertion fail | |
# Run bash in container, run haskell-language-server . to generate and examine core dump | |
# core dump will be at /wasp/wasp/waspc/core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
build-essential \ | |
libgmp10 \ | |
libgmp-dev \ | |
libtinfo5 \ | |
libtinfo-dev \ | |
zlib1g-dev \ | |
libncurses5 \ | |
libncurses-dev \ | |
git \ | |
gdb | |
# Install ghcup | |
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh | |
# Make sure ghcup is on PATH | |
ENV PATH "$PATH:/root/.ghcup/bin" | |
# Install GHC with ghcup | |
RUN ghcup install ghc 8.10.4 | |
RUN ghcup set ghc 8.10.4 | |
# Install Cabal with ghcup | |
RUN ghcup install cabal 3.4 | |
WORKDIR /hls_source | |
RUN git clone --branch 1.4.0 --depth 1 https://github.com/haskell/haskell-language-server.git | |
WORKDIR /hls_source/haskell-language-server | |
RUN cabal update && cabal build exe:haskell-language-server -O2 --enable-executable-static --ghc-options="-split-sections" | |
# Find built executable and put it on PATH | |
# for some reason, using "cabal install" instead of "cabal build" doesn't respect --enable-executable-static, or trigger assertion fail | |
RUN find dist-newstyle -type f -name haskell-language-server -exec cp {} /usr/local/bin \; | |
# Install Stack, configure to use GHC from ghcup | |
RUN ghcup install stack | |
RUN stack config set install-ghc false --global | |
RUN stack config set system-ghc true --global | |
WORKDIR /wasp | |
RUN git clone https://github.com/wasp-lang/wasp.git | |
WORKDIR /wasp/wasp/waspc | |
RUN stack build --no-run-tests --no-run-benchmarks waspc:lib waspc:exe:wasp waspc:test:waspc-test waspc:bench:waspc-benchmarks | |
CMD ["haskell-language-server", "."] | |
# Run container without arguments to see assertion fail | |
# Run bash in container, run haskell-language-server . to generate and examine core dump | |
# core dump will be at /wasp/wasp/waspc/core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linking /hls_source/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.4/haskell-language-server-1.4.0.0/x/haskell-language-server/opt/build/haskell-language-server/haskell-language-server ... | |
/root/.cabal/store/ghc-8.10.4/direct-sqlite-2.3.26-b059f441e60d4dc9f29dfb79e0be8e7abce5d30714241c007f0608275967a49d/lib/libHSdirect-sqlite-2.3.26-b059f441e60d4dc9f29dfb79e0be8e7abce5d30714241c007f0608275967a49d.a(sqlite3.o):sqlite3.c:function unixDlOpen: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/process-1.6.9.0/libHSprocess-1.6.9.0.a(runProcess.o):runProcess.c:function runInteractiveProcess: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/process-1.6.9.0/libHSprocess-1.6.9.0.a(runProcess.o):runProcess.c:function runInteractiveProcess: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC0ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCendpwent: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC1ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCsetpwent: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC2ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetpwent: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC3ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetpwnamzur: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC4ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetpwuidzur: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC5ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetgrnamzur: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
/root/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function ghczuwrapperZC6ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetgrgidzur: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking | |
rts/Linker.c:597:0: error: | |
warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment