judge0 / compilers

📦 Docker image with installed compilers, interpreters and sandbox.
https://hub.docker.com/r/judge0/compilers
GNU General Public License v3.0
93 stars 70 forks source link

Failed to build clojure-1.11.1 #14

Open jiapei100 opened 1 year ago

jiapei100 commented 1 year ago

Hi,

I'm trying to build compilers under Ubuntu 22.04.

I just simply modifed Dockerfile, a couple of packages. For clojure, I ONLY modified the version from 1.10.1 to 1.11.1.

# Check for latest version here: https://github.com/clojure/clojure/releases
ENV CLOJURE_VERSION 1.11.1
RUN set -xe && \
    apt-get update && \
    apt-get install -y --no-install-recommends maven && \
    cd /tmp && \
    git clone https://github.com/clojure/clojure && \
    cd clojure && \
    git checkout clojure-$CLOJURE_VERSION && \
    mvn -Plocal -Dmaven.test.skip=true package && \
    mkdir /usr/local/clojure-$CLOJURE_VERSION && \
    cp clojure.jar /usr/local/clojure-$CLOJURE_VERSION && \
    apt-get remove --purge -y maven && \
    rm -rf /var/lib/apt/lists/* /tmp/*

However, I obtained the following ERROR messages: https://pastebin.com/NF3YtQW3 .

The last dozens of lines:

...
12.66 HEAD is now at ce55092f [maven-release-plugin] prepare release clojure-1.11.1
12.66 + mvn -Plocal -Dmaven.test.skip=true package
13.20 [ERROR] Error executing Maven.
13.20 [ERROR] java.lang.IllegalStateException: Unable to load cache item
13.20 [ERROR] Caused by: Unable to load cache item
13.20 [ERROR] Caused by: Could not initialize class com.google.inject.internal.cglib.core.$MethodWrapper
13.20 [ERROR] Caused by: Exception com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @33cb5951 [in thread "main"]
------
Dockerfile:502
--------------------
 501 |     ENV CLOJURE_VERSION 1.11.1
 502 | >>> RUN set -xe && \
 503 | >>>     apt-get update && \
 504 | >>>     apt-get install -y --no-install-recommends maven && \
 505 | >>>     cd /tmp && \
 506 | >>>     git clone https://github.com/clojure/clojure && \
 507 | >>>     cd clojure && \
 508 | >>>     git checkout clojure-$CLOJURE_VERSION && \
 509 | >>>     mvn -Plocal -Dmaven.test.skip=true package && \
 510 | >>>     mkdir /usr/local/clojure-$CLOJURE_VERSION && \
 511 | >>>     cp clojure.jar /usr/local/clojure-$CLOJURE_VERSION && \
 512 | >>>     apt-get remove --purge -y maven && \
 513 | >>>     rm -rf /var/lib/apt/lists/* /tmp/*
 514 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c set -xe &&     apt-get update &&     apt-get install -y --no-install-recommends maven &&     cd /tmp &&     git clone https://github.com/clojure/clojure &&     cd clojure &&     git checkout clojure-$CLOJURE_VERSION &&     mvn -Plocal -Dmaven.test.skip=true package &&     mkdir /usr/local/clojure-$CLOJURE_VERSION &&     cp clojure.jar /usr/local/clojure-$CLOJURE_VERSION &&     apt-get remove --purge -y maven &&     rm -rf /var/lib/apt/lists/* /tmp/*" did not complete successfully: exit code: 1

Can anybody please give me a hint how I can fix it?

Thank you ...