jwaldmann / ceta-postproc

GNU Lesser General Public License v3.0
0 stars 0 forks source link

how to compile a static executable (reminder) #2

Open jwaldmann opened 10 years ago

jwaldmann commented 10 years ago

currently, a starexec post-processor can only be one file. That means we cannot use a dynamically linked executable - there's no way to upload the shell script that sets LD_LIBRARY_PATH. So, we compile statically:

ghc -O2 -static -optc-static -optl-static  -optl-pthread Main.hs

the ghc invocation is explained in http://stackoverflow.com/questions/5953199/create-a-static-haskell-linux-executable . There will be warnings, and this is explained in http://stackoverflow.com/questions/8140439/why-would-it-be-impossible-to-fully-statically-link-an-application . I think they can be ignored (there is no other option anyway).

jwaldmann commented 10 years ago

note: starexec changed the postproc format (you can upload a tar bomb containing several files) http://starexec.forumotion.com/t53-how-to-upload-pre-processors#127