vzarytovskii / haskell-dev-env

A Dockerfile for Haskell Development, and DevContainer for VSCode, for installing GHC HLS (Haskell Language Server) and the required plugins
MIT License
56 stars 17 forks source link

docker image build failed #5

Closed curaai closed 2 years ago

curaai commented 2 years ago
❯ docker build . -t haskelldevenv:latest
[+] Building 34.3s (11/21)                                                                                                     
 => [internal] load build definition from Dockerfile                                                                      0.0s
 => => transferring dockerfile: 3.00kB                                                                                    0.0s
 => [internal] load .dockerignore                                                                                         0.0s
 => => transferring context: 2B                                                                                           0.0s
 => [internal] load metadata for docker.io/library/debian:stable                                                          2.0s
 => [auth] library/debian:pull token for registry-1.docker.io                                                             0.0s
 => CACHED [ 1/17] FROM docker.io/library/debian:stable@sha256:bdcb21b41fe077ff21d84d707bf106b0a896b2adfbafa2ee8d5f4ad47  0.0s
 => [ 2/17] RUN apt-get update                                                                                            3.3s
 => [ 3/17] RUN apt-get install -y --no-install-recommends  apt-utils git curl xz-utils gcc make libtinfo5 libgmp-dev z  22.9s 
 => [ 4/17] RUN groupadd --gid 2001 haskeller &&     useradd -ms /bin/bash -K MAIL_DIR=/dev/null --uid 2001 --gid 2001 -  0.2s 
 => [ 5/17] WORKDIR /home/haskeller                                                                                       0.0s 
 => [ 6/17] RUN echo "export PATH=/home/haskeller/.local/bin:/home/haskeller/.cabal/bin:/home/haskeller/.ghcup/bin:/usr/  0.2s 
 => ERROR [ 7/17] RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh                             5.6s 
------                                                                                                                         
 > [ 7/17] RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh:                                        
#11 0.881                                                                                                                      
#11 0.881 Welcome to Haskell!                                                                                                  
#11 0.881                                                                                                                      
#11 0.881 This script will download and install the following binaries:                                                        
#11 0.881   * ghcup - The Haskell toolchain installer
#11 0.881   * ghc   - The Glasgow Haskell Compiler
#11 0.881   * cabal - The Cabal build tool for managing Haskell software
#11 0.881   * stack - (optional) A cross-platform program for developing Haskell projects
#11 0.881   * hls   - (optional) A language server for developers to integrate with their editor/IDE
#11 0.881 
#11 0.881 ghcup installs only into the following directory,
#11 0.881 which can be removed anytime:
#11 0.881   /home/haskeller/.ghcup
#11 0.881 
#11 0.890   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#11 0.890                                  Dload  Upload   Total   Spent    Left  Speed
100 47.3M  100 47.3M    0     0  10.2M      0  0:00:04  0:00:04 --:--:-- 10.3M
#11 5.536 /home/haskeller/.ghcup/bin/ghcup: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
#11 5.537 "_eghcup upgrade" failed!
------

add libnuma-dev in RUN apt-get install -y line

vzarytovskii commented 2 years ago

Well, that's new. Thanks, it seems ghcup changed something. Will add it.

curaai commented 2 years ago

In recent build docker image it requires llvm. I add these packages in

apt-get install -y libnuma-dev lsb-release wget software-properties-common sudo gnupg

and llvm install script

RUN wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && chmod +x /tmp/llvm.sh && /tmp/llvm.sh 12 && rm /tmp/llvm.sh
vzarytovskii commented 2 years ago

@curaai It seems, I can't reproduce it on my local machine with master image. Did you, by any chance, change GHC/HLS versions?

vzarytovskii commented 2 years ago

I have added libnuma and llvm regardless.