Skip to content

Commit 05c89bd

Browse files
committed
OpenSSL_jll build 1.1.1+c
1 parent e3e3b39 commit 05c89bd

17 files changed

+189
-137
lines changed

Artifacts.toml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
11
[[OpenSSL]]
2-
arch = "x86_64"
3-
git-tree-sha1 = "084b78633620f0d4b9e4a2bdec2a6668efcf58c7"
4-
os = "macos"
2+
arch = "i686"
3+
git-tree-sha1 = "1c78523da6920c94a0a50469a01281649f02db66"
4+
libc = "glibc"
5+
os = "linux"
56

67
[[OpenSSL.download]]
7-
sha256 = "e03a6b5b396462df2ae82a87b03b9f186f32b75a4277a1a284f0584a79b22840"
8-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.x86_64-apple-darwin14.tar.gz"
8+
sha256 = "2e58842a98299b3db65aa72e714acba44f1031a5b84cacf8fd74fdc81108e5a9"
9+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.i686-linux-gnu.tar.gz"
910
[[OpenSSL]]
1011
arch = "i686"
11-
git-tree-sha1 = "391971d0bae23ae9baac3bcbb68865f1baa7c4c5"
12-
libc = "glibc"
12+
git-tree-sha1 = "a786b15c2026d54dc35563a982758a71b6c2930b"
13+
libc = "musl"
1314
os = "linux"
1415

1516
[[OpenSSL.download]]
16-
sha256 = "e6620ac75d424246434f2fe24021e61fea92d239318a7b04deead3a234b8f978"
17-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.i686-linux-gnu.tar.gz"
17+
sha256 = "c1fe889a234348f4a1033af599c59497e7285121e3f6311c43a09a19314dafc0"
18+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.i686-linux-musl.tar.gz"
1819
[[OpenSSL]]
1920
arch = "x86_64"
20-
git-tree-sha1 = "68e8327689c4641bab24f35523c51773e7d4bc5f"
21-
os = "freebsd"
21+
git-tree-sha1 = "b2d7d26a795d3ecc65ecef5991e1e508e07a0d1d"
22+
os = "macos"
2223

2324
[[OpenSSL.download]]
24-
sha256 = "53544564caf3c0301b424c36d579aed408695bbef1e51f95856d7093cb6c694d"
25-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.x86_64-unknown-freebsd11.1.tar.gz"
25+
sha256 = "e8ff61c3cdc5de5ae2c2bf37859d5a2c61b08eb2d6350dadb9694871a322dfce"
26+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.x86_64-apple-darwin14.tar.gz"
2627
[[OpenSSL]]
2728
arch = "powerpc64le"
28-
git-tree-sha1 = "c497b8fdab16467c7c8f3b0514ec08a5f01fa0d7"
29+
git-tree-sha1 = "d325a84e2e059da7941863548b34699f05e8dceb"
2930
libc = "glibc"
3031
os = "linux"
3132

3233
[[OpenSSL.download]]
33-
sha256 = "a76e22af9dcd9e108ea2025eff0dbcd6382b97a170a0c6a777fb16c7250edb4c"
34-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.powerpc64le-linux-gnu.tar.gz"
34+
sha256 = "6700edb661d502fff0525370e50d4a33a851de491822ae45c99af81ddeb7f5fa"
35+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.powerpc64le-linux-gnu.tar.gz"
3536
[[OpenSSL]]
36-
arch = "x86_64"
37-
git-tree-sha1 = "5b4e1e6805b698751a65e9bb5e8b43c6c826c21b"
38-
libc = "musl"
39-
os = "linux"
40-
41-
[[OpenSSL.download]]
42-
sha256 = "dc3fe9c3c1375674f13fe98aa3d684eb10682450945759108df778f622a7955f"
43-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.x86_64-linux-musl.tar.gz"
44-
[[OpenSSL]]
45-
arch = "x86_64"
46-
git-tree-sha1 = "92d93c1d1679167851ad86c3c5869d28656ad3c4"
37+
arch = "aarch64"
38+
git-tree-sha1 = "7e44bf44240b26d2824089f43dfcad9c5dba58c6"
4739
libc = "glibc"
4840
os = "linux"
4941

5042
[[OpenSSL.download]]
51-
sha256 = "0628df28f09c29e87e07747b81319e0ca839b9ff54059a7db35acfe3b4641be4"
52-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.x86_64-linux-gnu.tar.gz"
43+
sha256 = "3446ac1c4842f359cb4c92d89ab5df961128c87bed28b25ef9b6e39c82f746b1"
44+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.aarch64-linux-gnu.tar.gz"
5345
[[OpenSSL]]
5446
arch = "x86_64"
55-
git-tree-sha1 = "9cf08ca28cb8ae69b4ee285ae1f6ade3118a2976"
56-
os = "windows"
47+
git-tree-sha1 = "4298328adc5e1ebfbc96f1ca70dcee7bb3e5546c"
48+
libc = "musl"
49+
os = "linux"
5750

5851
[[OpenSSL.download]]
59-
sha256 = "d11e5d7a90d3e2024809bef0f31d12d56c436327eb4bb7d6684baa709c5dbcb1"
60-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.x86_64-w64-mingw32.tar.gz"
52+
sha256 = "fd937914084cdca6a8f1dbe1351bb2843b9a685d15df29f42c44c0cd65bc2c78"
53+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.x86_64-linux-musl.tar.gz"
6154
[[OpenSSL]]
6255
arch = "aarch64"
63-
git-tree-sha1 = "33e98e464cad2eb64f2cd88722d84ce39080cfd4"
56+
git-tree-sha1 = "abecdfbc50bb69acdd1a5f4a8da98b511bf602d9"
6457
libc = "musl"
6558
os = "linux"
6659

6760
[[OpenSSL.download]]
68-
sha256 = "9bdccf83afa75e4c82379d9ce591c48a4da975daad78fac436f174a9cb1a1486"
69-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.aarch64-linux-musl.tar.gz"
61+
sha256 = "69771c8fad7c0f952fd1efd68f5bbbd4a4a1edf1bc2c4bb7f1a8ad930fb17095"
62+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.aarch64-linux-musl.tar.gz"
7063
[[OpenSSL]]
7164
arch = "armv7l"
72-
git-tree-sha1 = "bf5fd7fdcf7835632854ebc88e122932f54a496a"
73-
libc = "glibc"
65+
git-tree-sha1 = "364a2b3b0c3d7e953e0af480d4c7d0f67c667c85"
66+
libc = "musl"
7467
os = "linux"
7568

7669
[[OpenSSL.download]]
77-
sha256 = "e11c47d1f05bee82e086f03a299b4837fe4aba35661c8af9c36ba2125049f7bd"
78-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.arm-linux-gnueabihf.tar.gz"
70+
sha256 = "e3c7133100274a94801a45166947627d35d1bb8022e3d01b3ff9cc52d97723e5"
71+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.arm-linux-musleabihf.tar.gz"
7972
[[OpenSSL]]
8073
arch = "i686"
81-
git-tree-sha1 = "20745d437550fcc4b0112176d1369f7af9c9255a"
82-
libc = "musl"
83-
os = "linux"
74+
git-tree-sha1 = "8085367d09f4cee187408f64b45dfc7ba6589bef"
75+
os = "windows"
76+
77+
[[OpenSSL.download]]
78+
sha256 = "4eca7b3041df0ac07c0b53240e2461d00fb5eea5588713249dd955a03341b9ba"
79+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.i686-w64-mingw32.tar.gz"
80+
[[OpenSSL]]
81+
arch = "x86_64"
82+
git-tree-sha1 = "2aee2bf731d596503e8bfc99dbaaa30879b29d4d"
83+
os = "freebsd"
8484

8585
[[OpenSSL.download]]
86-
sha256 = "ef63d029419bd00ff6010f412f1f56fc281d22c73f04ca2253e3ed131ff45323"
87-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.i686-linux-musl.tar.gz"
86+
sha256 = "d5a2d3050e8d09571e2887f4e4598e3e105cdda2e33a74e33aa6ad758ff56e08"
87+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.x86_64-unknown-freebsd11.1.tar.gz"
8888
[[OpenSSL]]
8989
arch = "armv7l"
90-
git-tree-sha1 = "ed1fda8284f004b823b892a1a67a919ff6c6fe9c"
91-
libc = "musl"
90+
git-tree-sha1 = "07dfd48008aef91bb2fda4c021d7168b9140178b"
91+
libc = "glibc"
9292
os = "linux"
9393

9494
[[OpenSSL.download]]
95-
sha256 = "86fca6c56d619f65dcdaf453dbd31701c2937e1407fc686ed3471b046610b88c"
96-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.arm-linux-musleabihf.tar.gz"
95+
sha256 = "36a4e96f37a5bb1481ee8dd3fcc4d57461f3455e9553734fa049cc58e938ae72"
96+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.arm-linux-gnueabihf.tar.gz"
9797
[[OpenSSL]]
98-
arch = "aarch64"
99-
git-tree-sha1 = "fd67073d239964d9c79b0394387cab34bdeb3df5"
98+
arch = "x86_64"
99+
git-tree-sha1 = "be5010d5d4e025aed613ac292d5e730903b12c50"
100100
libc = "glibc"
101101
os = "linux"
102102

103103
[[OpenSSL.download]]
104-
sha256 = "afaac1c4f8388fbc4b5e6b02ef2084e58654b16510bac756d4fa8bd693b84f9e"
105-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.aarch64-linux-gnu.tar.gz"
104+
sha256 = "8bb01ecc3e7a85e7f9ce3d51c973fed9d0b189d15f6326f86f6722ab62f738b0"
105+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.x86_64-linux-gnu.tar.gz"
106106
[[OpenSSL]]
107-
arch = "i686"
108-
git-tree-sha1 = "f03ecd715574f9d747b8a72d63bd34fbde8ff85b"
107+
arch = "x86_64"
108+
git-tree-sha1 = "b839c600fe56842e57f7d36a9f3a91d2a8b85ddc"
109109
os = "windows"
110110

111111
[[OpenSSL.download]]
112-
sha256 = "6cf6c7cde07a62befb871fc8c79eb97864d9da9fcb1d96043ce492dc84902938"
113-
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+0/OpenSSL.v1.1.1+c.i686-w64-mingw32.tar.gz"
112+
sha256 = "dbc811c33367d2e5a9b72d1cee7bd33366ad511dfab95daaf59c2c17694c8aec"
113+
url = "https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl/releases/download/OpenSSL-v1.1.1+c/OpenSSL.v1.1.1+c.x86_64-w64-mingw32.tar.gz"

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2020
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name = "OpenSSL_jll"
22
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
3-
version = "1.1.1+0"
3+
version = "1.1.1+c"
44

55
[deps]
66
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
77
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
88

99
[compat]
10-
julia = "1.3"
10+
julia = "1.0"

src/OpenSSL_jll.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
module OpenSSL_jll
2+
3+
if VERSION < v"1.3.0-rc4"
4+
# We lie a bit in the registry that JLL packages are usable on Julia 1.0-1.2.
5+
# This is to allow packages that might want to support Julia 1.0 to get the
6+
# benefits of a JLL package on 1.3 (requiring them to declare a dependence on
7+
# this JLL package in their Project.toml) but engage in heroic hacks to do
8+
# something other than actually use a JLL package on 1.0-1.2. By allowing
9+
# this package to be installed (but not loaded) on 1.0-1.2, we enable users
10+
# to avoid splitting their package versions into pre-1.3 and post-1.3 branches
11+
# if they are willing to engage in the kinds of hoop-jumping they might need
12+
# to in order to install binaries in a JLL-compatible way on 1.0-1.2. One
13+
# example of this hoop-jumping being to express a dependency on this JLL
14+
# package, then import it wtihin a `VERSION >= v"1.3"` conditional, and use
15+
# the deprecated `build.jl` mechanism to download the binaries through e.g.
16+
# `BinaryProvider.jl`. This should work well for the simplest packages, and
17+
# require greater and greater heroics for more and more complex packages.
18+
error("Unable to import OpenSSL_jll on Julia versions older than 1.3!")
19+
end
20+
221
using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl
322
import Base: UUID
423

src/wrappers/aarch64-linux-gnu.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ function openssl(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = t
3232
env_mapping = Dict{String,String}()
3333
if adjust_PATH
3434
if !isempty(get(ENV, "PATH", ""))
35-
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
35+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
3636
else
3737
env_mapping["PATH"] = PATH
3838
end
3939
end
4040
if adjust_LIBPATH
4141
if !isempty(get(ENV, LIBPATH_env, ""))
42-
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
42+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env])
4343
else
4444
env_mapping[LIBPATH_env] = LIBPATH
4545
end
@@ -68,21 +68,23 @@ const libssl = "libssl.so.1.1"
6868
Open all libraries
6969
"""
7070
function __init__()
71-
global prefix = abspath(joinpath(@__DIR__, ".."))
71+
global artifact_dir = abspath(artifact"OpenSSL")
7272

7373
# Initialize PATH and LIBPATH environment variable listings
7474
global PATH_list, LIBPATH_list
75-
global libcrypto_path = abspath(joinpath(artifact"OpenSSL", libcrypto_splitpath...))
75+
# We first need to add to LIBPATH_list the libraries provided by Julia
76+
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
77+
global libcrypto_path = normpath(joinpath(artifact_dir, libcrypto_splitpath...))
7678

7779
# Manually `dlopen()` this right now so that future invocations
7880
# of `ccall` with its `SONAME` will find this path immediately.
7981
global libcrypto_handle = dlopen(libcrypto_path)
8082
push!(LIBPATH_list, dirname(libcrypto_path))
8183

82-
global openssl_path = abspath(joinpath(artifact"OpenSSL", openssl_splitpath...))
84+
global openssl_path = normpath(joinpath(artifact_dir, openssl_splitpath...))
8385

8486
push!(PATH_list, dirname(openssl_path))
85-
global libssl_path = abspath(joinpath(artifact"OpenSSL", libssl_splitpath...))
87+
global libssl_path = normpath(joinpath(artifact_dir, libssl_splitpath...))
8688

8789
# Manually `dlopen()` this right now so that future invocations
8890
# of `ccall` with its `SONAME` will find this path immediately.

src/wrappers/aarch64-linux-musl.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ function openssl(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = t
3232
env_mapping = Dict{String,String}()
3333
if adjust_PATH
3434
if !isempty(get(ENV, "PATH", ""))
35-
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
35+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
3636
else
3737
env_mapping["PATH"] = PATH
3838
end
3939
end
4040
if adjust_LIBPATH
4141
if !isempty(get(ENV, LIBPATH_env, ""))
42-
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
42+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env])
4343
else
4444
env_mapping[LIBPATH_env] = LIBPATH
4545
end
@@ -68,21 +68,23 @@ const libssl = "libssl.so.1.1"
6868
Open all libraries
6969
"""
7070
function __init__()
71-
global prefix = abspath(joinpath(@__DIR__, ".."))
71+
global artifact_dir = abspath(artifact"OpenSSL")
7272

7373
# Initialize PATH and LIBPATH environment variable listings
7474
global PATH_list, LIBPATH_list
75-
global libcrypto_path = abspath(joinpath(artifact"OpenSSL", libcrypto_splitpath...))
75+
# We first need to add to LIBPATH_list the libraries provided by Julia
76+
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
77+
global libcrypto_path = normpath(joinpath(artifact_dir, libcrypto_splitpath...))
7678

7779
# Manually `dlopen()` this right now so that future invocations
7880
# of `ccall` with its `SONAME` will find this path immediately.
7981
global libcrypto_handle = dlopen(libcrypto_path)
8082
push!(LIBPATH_list, dirname(libcrypto_path))
8183

82-
global openssl_path = abspath(joinpath(artifact"OpenSSL", openssl_splitpath...))
84+
global openssl_path = normpath(joinpath(artifact_dir, openssl_splitpath...))
8385

8486
push!(PATH_list, dirname(openssl_path))
85-
global libssl_path = abspath(joinpath(artifact"OpenSSL", libssl_splitpath...))
87+
global libssl_path = normpath(joinpath(artifact_dir, libssl_splitpath...))
8688

8789
# Manually `dlopen()` this right now so that future invocations
8890
# of `ccall` with its `SONAME` will find this path immediately.

src/wrappers/arm-linux-gnueabihf.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ function openssl(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = t
3232
env_mapping = Dict{String,String}()
3333
if adjust_PATH
3434
if !isempty(get(ENV, "PATH", ""))
35-
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
35+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
3636
else
3737
env_mapping["PATH"] = PATH
3838
end
3939
end
4040
if adjust_LIBPATH
4141
if !isempty(get(ENV, LIBPATH_env, ""))
42-
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
42+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env])
4343
else
4444
env_mapping[LIBPATH_env] = LIBPATH
4545
end
@@ -68,21 +68,23 @@ const libssl = "libssl.so.1.1"
6868
Open all libraries
6969
"""
7070
function __init__()
71-
global prefix = abspath(joinpath(@__DIR__, ".."))
71+
global artifact_dir = abspath(artifact"OpenSSL")
7272

7373
# Initialize PATH and LIBPATH environment variable listings
7474
global PATH_list, LIBPATH_list
75-
global libcrypto_path = abspath(joinpath(artifact"OpenSSL", libcrypto_splitpath...))
75+
# We first need to add to LIBPATH_list the libraries provided by Julia
76+
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
77+
global libcrypto_path = normpath(joinpath(artifact_dir, libcrypto_splitpath...))
7678

7779
# Manually `dlopen()` this right now so that future invocations
7880
# of `ccall` with its `SONAME` will find this path immediately.
7981
global libcrypto_handle = dlopen(libcrypto_path)
8082
push!(LIBPATH_list, dirname(libcrypto_path))
8183

82-
global openssl_path = abspath(joinpath(artifact"OpenSSL", openssl_splitpath...))
84+
global openssl_path = normpath(joinpath(artifact_dir, openssl_splitpath...))
8385

8486
push!(PATH_list, dirname(openssl_path))
85-
global libssl_path = abspath(joinpath(artifact"OpenSSL", libssl_splitpath...))
87+
global libssl_path = normpath(joinpath(artifact_dir, libssl_splitpath...))
8688

8789
# Manually `dlopen()` this right now so that future invocations
8890
# of `ccall` with its `SONAME` will find this path immediately.

src/wrappers/arm-linux-musleabihf.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ function openssl(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = t
3232
env_mapping = Dict{String,String}()
3333
if adjust_PATH
3434
if !isempty(get(ENV, "PATH", ""))
35-
env_mapping["PATH"] = string(ENV["PATH"], ':', PATH)
35+
env_mapping["PATH"] = string(PATH, ':', ENV["PATH"])
3636
else
3737
env_mapping["PATH"] = PATH
3838
end
3939
end
4040
if adjust_LIBPATH
4141
if !isempty(get(ENV, LIBPATH_env, ""))
42-
env_mapping[LIBPATH_env] = string(ENV[LIBPATH_env], ':', LIBPATH)
42+
env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env])
4343
else
4444
env_mapping[LIBPATH_env] = LIBPATH
4545
end
@@ -68,21 +68,23 @@ const libssl = "libssl.so.1.1"
6868
Open all libraries
6969
"""
7070
function __init__()
71-
global prefix = abspath(joinpath(@__DIR__, ".."))
71+
global artifact_dir = abspath(artifact"OpenSSL")
7272

7373
# Initialize PATH and LIBPATH environment variable listings
7474
global PATH_list, LIBPATH_list
75-
global libcrypto_path = abspath(joinpath(artifact"OpenSSL", libcrypto_splitpath...))
75+
# We first need to add to LIBPATH_list the libraries provided by Julia
76+
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
77+
global libcrypto_path = normpath(joinpath(artifact_dir, libcrypto_splitpath...))
7678

7779
# Manually `dlopen()` this right now so that future invocations
7880
# of `ccall` with its `SONAME` will find this path immediately.
7981
global libcrypto_handle = dlopen(libcrypto_path)
8082
push!(LIBPATH_list, dirname(libcrypto_path))
8183

82-
global openssl_path = abspath(joinpath(artifact"OpenSSL", openssl_splitpath...))
84+
global openssl_path = normpath(joinpath(artifact_dir, openssl_splitpath...))
8385

8486
push!(PATH_list, dirname(openssl_path))
85-
global libssl_path = abspath(joinpath(artifact"OpenSSL", libssl_splitpath...))
87+
global libssl_path = normpath(joinpath(artifact_dir, libssl_splitpath...))
8688

8789
# Manually `dlopen()` this right now so that future invocations
8890
# of `ccall` with its `SONAME` will find this path immediately.

0 commit comments

Comments
 (0)