DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
32 stars 39 forks source link

Error compiling C# problem in Domjudge: 'mcs not found' (able to compile C# files in container, no issues with Java) #146

Closed Githector closed 1 year ago

Githector commented 1 year ago

I'm having trouble compiling a C# problem in Domjudge. I'm using Domjudge through the Docker Compose that I found at https://medium.com/@lutfiandri/deploy-domjudge-using-docker-compose-7d8ec904f7b. I've added C# to the list of available languages, but when I try to compile the code, I get the error message 'Compiling failed with exitcode 127, compiler output: /compile-script/run: 23: mcs: not found'. However, I don't have any problems compiling Java code. I have also entered the container and confirmed that I am able to compile C# files without any issues. This leads me to believe that the C# compiler (mcs) may not be installed or accessible on the Domjudge system. Can anyone help me figure out how to install or fix the compiler so I can compile my code successfully?

vmcj commented 1 year ago

Hi @Githector,

When you entered the container, did you look in the chroot we use for judging or did you install mcs in the "root" system? Probably you need to install mcs with /opt/domjudge/misc-tools/dj_run_chroot as we judge in a restricted container.

So in case of docker you would have this:

docker host, your machine running a container for judgehost, you started that with docker-compose
|-  judgehost-container, the docker container where I suspect you installed mcs. This container is running the judgedaemon which runs the submission inside a restricted chroot/container with its own packages,
|-    restricted-container, this should have mcs, the installed packages can be found under /chroot/domjudge if you check in the judgehost-container
Githector commented 1 year ago

Yes!! That was the reason @vmcj ! Thanks!!!