I have cheap webspace on a remote Linux server, and I want to run compiler explorer on it.
So far I've had to overcome a few obstacles:
1) Remote server hasn't got NodeJs installed
2) Remote server doesn't allow mprotect to set a page as executable
3) Remote server doesn't allow mprotect to set an executable page as writeable
4) Remote server only has glibc v2.27, so the prebuilt binary for NodeJs v20 won't run
So I had to download an old image of Ubuntu that uses glibc v2.27, and I used it to build NodeJs as a static executable (i.e. I linked it with the command line option "-static").
NodeJs composes CPU instructions at runtime and executes them -- that's why it uses mprotect as described above -- and so it won't run on my remote server. I had to edit the NodeJs source code so that it passes the option "--jitless" to v8 so that it doesn't try to do 'Just In Time' compilation at runtime.
So now I have a NodeJs binary (v21.6.0) that runs successfully on my remote web server. I can do "make run-only" and it starts the server listening on 10240.
Now my final problem is that because I have cheapo webspace, I can't map TCP port number 10240 to a public port such as 80. So I think I need to use PHP to get it to behave as a proxy -- I haven't got this part working yet.
Has anyone gotten this working? I'll share all my work when I have this working so that anyone can run compiler explorer on their cheapo webspace.