Fix: use_julia should not set LD_LIBRARY_PATH#900
Conversation
I was compiling julia master and it errored out and after talking to the julia devs they say it is becaues LD_LIBRARY_PATH is set and it should never be set (julia takes care of it automatically). So since no upside in setting it and only a downside, submitting a PR.
|
It is not set for Julia's sake, but I agree that it is a bit annoying to set since it makes different Julia version clash with each other. How about a more targeted deletion of diff --git a/stdlib.sh b/stdlib.sh
index 372e76d..6b143fe 100755
--- a/stdlib.sh
+++ b/stdlib.sh
@@ -1027,7 +1027,15 @@ use_julia() {
return 1
fi
+ # Julia is happier without LD_LIBRARY_PATH set: store the value (if set)
+ # and reset the value after load_prefix.
+ if [ -n "${LD_LIBRARY_PATH+x}" ]; then local _LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"; fi
load_prefix "$julia_prefix"
+ if [ -n "${_LD_LIBRARY_PATH+x}" ]; then
+ LD_LIBRARY_PATH="${_LD_LIBRARY_PATH}"
+ else
+ unset LD_LIBRARY_PATH
+ fi
log_status "Successfully loaded $(julia --version), from prefix ($julia_prefix)"
} |
|
I like the idea but if a user is setting |
|
No, my suggestion should leave |
|
Ah I see, but when using |
|
Do the other variables cause any problems? |
|
I don't know but I don't see any Julia docs or recommendations to set them. |
|
Hi, I ran into this issue again causing julia master to segfault. I don't get why LD_LIBRARY_PATH is set when it causes issues and it is not supposed to be set. |
I was compiling julia master and it errored out and after talking
to the julia devs they say it is becaues LD_LIBRARY_PATH is set
and it should never be set (julia takes care of it automatically).
So since no upside in setting it and only a downside, submitting
a PR.