sio2project / sio2jail

A tool for supervising execution of programs submitted in algorithmic competitions
MIT License
30 stars 10 forks source link

Boxes not building on Arch Linux #26

Closed GGORG0 closed 3 years ago

GGORG0 commented 3 years ago

Hi, I'm running Arch Linux (linux 5.10.68-1-lts) and I wanted to build sio2jail. It went ok, but I had to make it compile the binary dynamically, because the Arch's libseccomp package only contains the .so files. Then, I wanted to run the tests and I got an error about dpkg not found, which is correct, because Arch uses pacman and not apt/dpkg. How can I run the tests? And what are boxes for? How do I even run the app (I'm following the instructions found on https://oij.edu.pl/zawodnik/srodowisko/ )

Thanks

Michcioperz commented 3 years ago

Hi, you don't need boxes to use sio2jail. On the bottom of the page you linked there's a package with the oiejq script (which comes with a static build of sio2jail by the way) which should help you with the most common uses of sio2jail.

The boxes are the environments to be used on our judging machines. You can think of them as sandboxes containing the minimal set of system packages (usually just the C compiler or just the Python interpreter). Sio2jail can be used to isolate the execution of the program being run, so that instead of your main filesystem it can only access the contents of the box. In most cases (including participating in the Olympiad) oiejq should be enough for you. Considering that you're running Arch, the compiler will probably be a different version, but that shouldn't be a major problem.

GGORG0 commented 3 years ago

@Michcioperz Thanks for your answer! My GCC is g++ (GCC) 11.1.0, Make 4.3, cmake version 3.21.3, clang version 12.0.1. Also, I thought oiejq was an old script or something (it wasn't explained anywhere)

DietPawel commented 3 years ago

I recall sio2jail (and oiejq) having issues with gcc >8 and python >3.7 using syscalls that weren't whitelisted. We are currently testing patches correcting those issues and they will be released soon.

Also (maybe unneeded clarification):

Good Luck!