domjudge-packaging icon indicating copy to clipboard operation
domjudge-packaging copied to clipboard

Installing Haskell as an extra compiler

Open jeroenvanderzwam opened this issue 1 year ago • 0 comments
trafficstars

Dear developers,

I have been trying to install Haskell as an extra compiler within the chroot. Underneath is the code I have added to the chroot-and-tar.sh

apt-get update -y
apt-get install -y --no-install-recommends \
        curl \
        libnuma-dev \
        zlib1g-dev \
        libgmp-dev \
        libgmp10 \
        git \
        wget \
        lsb-release \
        software-properties-common \
        gnupg2 \
        apt-transport-https \
        gcc \
        autoconf \
        automake \
        build-essential

# gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C

curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup
chmod +x /usr/bin/ghcup
# ghcup config set gpg-setting GPGStrict

GHC=latest
CABAL=latest
CHROOTDIR="/chroot/domjudge"

ghcup -v install ghc --isolate "$CHROOTDIR/usr/local/lib" --force ${GHC}
# ghcup -v install ghc --force ${GHC}
ghcup -v install cabal --isolate "$CHROOTDIR/usr/local/lib" --force ${CABAL}
# ghcup -v install cabal --force ${CABAL}

# chroot /chroot/domjudge ln -s -f /usr/local/lib/bin/ghc-9.8.1 /usr/local/bin/ghc

But it seems that when I try to compile with the domserver the ghc command is not recognized.

Later I just tried to install ghc and cabal manually within the docker container. But this still does not help.

If somebody could help me I would be very grateful.

jeroenvanderzwam avatar May 05 '24 10:05 jeroenvanderzwam