static-julia icon indicating copy to clipboard operation
static-julia copied to clipboard

Set JULIA_HOME?

Open samoconnor opened this issue 6 years ago • 1 comments

In a statically compiled program Base.julia_cmd() seems to use the directory of the static executable as the path to the julia executable.

To work around this I've added -DJULIA_HOME=$JULIA_HOME to the gcc command line in juliac.jl. and setenv("JULIA_HOME", TOSTRING(JULIA_HOME), 0); in the main() function in program.c.

This causes the statically compiled program to have the same JULIA_HOME as the compile-time julia.

samoconnor avatar Oct 24 '17 00:10 samoconnor

related: https://github.com/JuliaLang/julia/issues/20899

vtjnash avatar Nov 03 '17 18:11 vtjnash