ioi/isolate

Compiling with gcc, execve("gcc"): No such file or directory

Closed this issue · 2 comments

How do I compile using gcc? I get the error:

execve("gcc"): No such file or directory.

My source code exists in /var/local/lib/isolate/0/main.c and is called with isolate -b 0 --run -- gcc /var/local/lib/isolate/0/main.c -o /var/local/lib/isolate/0/main

I solved the above issue by using the full path to gcc: isolate -b 0 -- run -- /usr/bin/gcc main.c -o main

But I ran into another issue which is:

Error: collect2: fatal error: cannot find 'ld'. Not sure how to solve this?

I also encountered the same issue. This worked for me:

isolate -b 0 -E PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --run -- /usr/bin/gcc main.c -o main