Skip to content

Commit a4164ca

Browse files
committed
improve install_controlplots
1 parent b6c5177 commit a4164ca

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

bin/install_controlplots

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,15 @@ _verify_controlplots() {
115115
echo "Verifying ControlPlots can be loaded..."
116116
local _julia_prefix=""
117117
if [[ "$(uname -s)" == "Linux" ]]; then
118-
_julia_prefix="env -u LD_PRELOAD -u LD_LIBRARY_PATH"
118+
# Julia 1.12+ ships libssl.so.3 compiled against OpenSSL 3.3+, which may
119+
# not match the system libcrypto.so.3 (e.g. Ubuntu 22.04 ships 3.0).
120+
# Prepend Julia's own lib/julia directory so its bundled libcrypto.so.3
121+
# is found before the system one. We keep any existing LD_LIBRARY_PATH
122+
# entries so other libraries set by callers are not lost.
123+
_julia_lib=$(julia -e 'print(joinpath(Sys.BINDIR, "..", "lib", "julia"))' 2>/dev/null || true)
124+
if [[ -n "$_julia_lib" && -d "$_julia_lib" ]]; then
125+
_julia_prefix="env LD_LIBRARY_PATH=${_julia_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
126+
fi
119127
fi
120128
if $_julia_prefix julia --project="${CONTROLPLOTS_PROJECT}" -e '
121129
using ControlPlots

0 commit comments

Comments
 (0)