From 0cc5f870587f87e3ca598344d38fc5b4c49ea06a Mon Sep 17 00:00:00 2001 From: billchenchina Date: Tue, 26 Jan 2021 04:23:21 +0800 Subject: [PATCH] fix(judger): Let judger work on ubuntu 20.04 (#81) * Fix judger/log/ * fix(judger): Let judger work on ubuntu 20.04 Judger stops working since 9a6f16cf1d7b5a2976c73ad638daa6dea2f953ea, this commit allows judger continue working. * fix(web): update faq.php --- install/bundle/Dockerfile | 2 +- install/bundle/install.sh | 4 ++++ judger/.gitignore | 3 ++- judger/log/.gitkeep | 0 judger/uoj_judger/run/run_program_conf.h | 8 +++++++- web/app/controllers/faq.php | 12 ++++++------ 6 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 judger/log/.gitkeep diff --git a/install/bundle/Dockerfile b/install/bundle/Dockerfile index 36ef82a..7819cb2 100644 --- a/install/bundle/Dockerfile +++ b/install/bundle/Dockerfile @@ -5,7 +5,7 @@ ARG CLONE_ADDFLAG WORKDIR /opt ENV DEBIAN_FRONTEND=noninteractive #Update apt and install git -RUN apt-get update && apt-get install -y apache2 cmake curl fp-compiler g++ git gnupg libapache2-mod-php libapache2-mod-xsendfile libyaml-dev make mysql-server ntp openjdk-11-jdk openjdk-8-jdk php php-dev php-mbstring php-mysql php-pear php-zip python python3 python3-requests re2c unzip vim wget zip +RUN apt-get update && apt-get install -y apache2 cmake curl fp-compiler g++ git gnupg libapache2-mod-php libapache2-mod-xsendfile libyaml-dev make mysql-server ntp openjdk-11-jdk openjdk-8-jdk php php-dev php-mbstring php-mysql php-pear php-zip python python3 python3-requests re2c unzip vim wget zip --no-install-recommends #Clone the latest UOJ Community verison to local RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG} uoj #Install environment and set startup script diff --git a/install/bundle/install.sh b/install/bundle/install.sh index 3f0a317..45b5c20 100644 --- a/install/bundle/install.sh +++ b/install/bundle/install.sh @@ -83,6 +83,10 @@ UOJEOF setJudgeConf(){ printf "\n\n==> Setting judger files\n" + #specify environment + cat > /etc/environment <
-

默认的测评环境是 Ubuntu Linux 18.04 LTS x64。

-

C的编译器是 gcc 7.4.0,编译命令:gcc code.c -o code -lm -O2 -DONLINE_JUDGE

-

C++的编译器是 g++ 7.4.0,编译命令:g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE。如果选择C++11会在编译命令后面添加-std=c++11

-

Java8的JDK版本是 openjdk 1.8.0_222,编译命令:javac code.java

-

Java11的JDK版本是 openjdk 11.0.4,编译命令:javac code.java

+

默认的测评环境是 Ubuntu Linux 20.04 LTS x64。

+

C的编译器是 gcc 9.3.0,编译命令:gcc code.c -o code -lm -O2 -DONLINE_JUDGE

+

C++的编译器是 g++ 9.3.0,编译命令:g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE。如果选择C++11会在编译命令后面添加-std=c++11

+

Java8的JDK版本是 openjdk 1.8.0_275,编译命令:javac code.java

+

Java11的JDK版本是 openjdk 11.0.9,编译命令:javac code.java

Pascal的编译器是 fpc 3.0.4,编译命令:fpc code.pas -O2

-

Python会先编译为优化过的字节码.pyo文件。支持的Python版本分别为Python 2.7和3.6。

+

Python会先编译为优化过的字节码.pyo文件。支持的Python版本分别为Python 2.7和3.8。