haskell - Specify custom temporary directory for ghc compiler -


i using ghc on web server running ubuntu 14.04 lts. due restrictions, cannot provide write permissions /tmp folder.

the ghc compiler throwing error after removing permissions /tmp folder

/tmp/ghc12032_0: createdirectory: permission denied (permission denied) 

is there way provide custom temporary directory ghc? didn't find compiler flag can that. need provide custom directory every time invoke ghc. appreciated.

how this?

https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate-compilation.html#temp-files

-tmpdir

if have trouble because of running out of space in /tmp (or wherever installation thinks temporary files should go), may use -tmpdir option specify alternate directory. example, -tmpdir . says put temporary files in current working directory.

alternatively, use tmpdir environment variable. set name of directory temporary files should put. gcc , other programs honour tmpdir variable well.

even better idea: set default_tmpdir make variable when building ghc, , never worry tmpdir again. (see build documentation).


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -