From f30b23f9d94cfa69600c20922ba8376fe1534f17 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Thu, 25 Nov 2021 09:40:03 +0100 Subject: [PATCH 1/2] Stop hardcoding SOVERSION for stdlibs Hardcoding versions is actually not needed as the build already creates symlinks from libXXX.so to libXXX.so.Y.Z. Since Julia does not always need a particular version, it is better to use the link which is created based on the one which was available at build time. It also reduced the number of places to edit when upgrading to a new SOVERSION. This was already the case for several libraries on Windows. --- .../src/CompilerSupportLibraries_jll.jl | 8 ++-- stdlib/GMP_jll/src/GMP_jll.jl | 12 ++--- stdlib/LibGit2_jll/src/LibGit2_jll.jl | 4 +- stdlib/LibSSH2_jll/src/LibSSH2_jll.jl | 4 +- stdlib/LibUV_jll/src/LibUV_jll.jl | 2 +- stdlib/LibUnwind_jll/src/LibUnwind_jll.jl | 2 +- stdlib/MPFR_jll/src/MPFR_jll.jl | 6 +-- stdlib/MbedTLS_jll/src/MbedTLS_jll.jl | 12 ++--- stdlib/OpenLibm_jll/src/OpenLibm_jll.jl | 4 +- stdlib/PCRE2_jll/src/PCRE2_jll.jl | 6 +-- stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl | 48 +++++++++---------- stdlib/Zlib_jll/src/Zlib_jll.jl | 4 +- stdlib/nghttp2_jll/src/nghttp2_jll.jl | 6 +-- 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index af8a679d87e10..fac47d95b206f 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -41,10 +41,10 @@ elseif Sys.isapple() const libstdcxx = "@rpath/libstdc++.6.dylib" const libgomp = "@rpath/libgomp.1.dylib" else - const libgcc_s = "libgcc_s.so.1" - const libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major) - const libstdcxx = "libstdc++.so.6" - const libgomp = "libgomp.so.1" + const libgcc_s = "libgcc_s.so" + const libgfortran = "libgfortran.so" + const libstdcxx = "libstdc++.so" + const libgomp = "libgomp.so" end function __init__() diff --git a/stdlib/GMP_jll/src/GMP_jll.jl b/stdlib/GMP_jll/src/GMP_jll.jl index 90daa24b150ed..339fabe80fc82 100644 --- a/stdlib/GMP_jll/src/GMP_jll.jl +++ b/stdlib/GMP_jll/src/GMP_jll.jl @@ -20,14 +20,14 @@ libgmpxx_handle = C_NULL libgmpxx_path = "" if Sys.iswindows() - const libgmp = "libgmp-10.dll" - const libgmpxx = "libgmpxx-4.dll" + const libgmp = "libgmp.dll" + const libgmpxx = "libgmpxx.dll" elseif Sys.isapple() - const libgmp = "@rpath/libgmp.10.dylib" - const libgmpxx = "@rpath/libgmpxx.4.dylib" + const libgmp = "@rpath/libgmp.dylib" + const libgmpxx = "@rpath/libgmpxx.dylib" else - const libgmp = "libgmp.so.10" - const libgmpxx = "libgmpxx.so.4" + const libgmp = "libgmp.so" + const libgmpxx = "libgmpxx.so" end function __init__() diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl index f0d4b5dda6072..9e51820680038 100644 --- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl +++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl @@ -21,9 +21,9 @@ libgit2_path = "" if Sys.iswindows() const libgit2 = "libgit2.dll" elseif Sys.isapple() - const libgit2 = "@rpath/libgit2.1.1.dylib" + const libgit2 = "@rpath/libgit2.dylib" else - const libgit2 = "libgit2.so.1.1" + const libgit2 = "libgit2.so" end function __init__() diff --git a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl index 66987b30d090c..6a32823b8e6f5 100644 --- a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl +++ b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl @@ -21,9 +21,9 @@ libssh2_path = "" if Sys.iswindows() const libssh2 = "libssh2.dll" elseif Sys.isapple() - const libssh2 = "@rpath/libssh2.1.dylib" + const libssh2 = "@rpath/libssh2.dylib" else - const libssh2 = "libssh2.so.1" + const libssh2 = "libssh2.so" end function __init__() diff --git a/stdlib/LibUV_jll/src/LibUV_jll.jl b/stdlib/LibUV_jll/src/LibUV_jll.jl index e4897138cc6cc..3e971976fc609 100644 --- a/stdlib/LibUV_jll/src/LibUV_jll.jl +++ b/stdlib/LibUV_jll/src/LibUV_jll.jl @@ -23,7 +23,7 @@ if Sys.iswindows() elseif Sys.isapple() const libuv = "@rpath/libuv.2.dylib" else - const libuv = "libuv.so.2" + const libuv = "libuv.so" end function __init__() diff --git a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl index ae79e790a999b..62c9fff823800 100644 --- a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl +++ b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl @@ -18,7 +18,7 @@ artifact_dir = "" libunwind_handle = C_NULL libunwind_path = "" -const libunwind = "libunwind.so.8" +const libunwind = "libunwind.so" function __init__() # We only do something on Linux/FreeBSD diff --git a/stdlib/MPFR_jll/src/MPFR_jll.jl b/stdlib/MPFR_jll/src/MPFR_jll.jl index 5b2dbd1e84b24..ad150a2596c07 100644 --- a/stdlib/MPFR_jll/src/MPFR_jll.jl +++ b/stdlib/MPFR_jll/src/MPFR_jll.jl @@ -18,11 +18,11 @@ libmpfr_handle = C_NULL libmpfr_path = "" if Sys.iswindows() - const libmpfr = "libmpfr-6.dll" + const libmpfr = "libmpfr.dll" elseif Sys.isapple() - const libmpfr = "@rpath/libmpfr.6.dylib" + const libmpfr = "@rpath/libmpfr.dylib" else - const libmpfr = "libmpfr.so.6" + const libmpfr = "libmpfr.so" end function __init__() diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl index 1006e9fc2fec0..9f8f34f259d20 100644 --- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl +++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl @@ -27,13 +27,13 @@ if Sys.iswindows() const libmbedtls = "libmbedtls.dll" const libmbedx509 = "libmbedx509.dll" elseif Sys.isapple() - const libmbedcrypto = "@rpath/libmbedcrypto.5.dylib" - const libmbedtls = "@rpath/libmbedtls.13.dylib" - const libmbedx509 = "@rpath/libmbedx509.1.dylib" + const libmbedcrypto = "@rpath/libmbedcrypto.dylib" + const libmbedtls = "@rpath/libmbedtls.dylib" + const libmbedx509 = "@rpath/libmbedx509.dylib" else - const libmbedcrypto = "libmbedcrypto.so.5" - const libmbedtls = "libmbedtls.so.13" - const libmbedx509 = "libmbedx509.so.1" + const libmbedcrypto = "libmbedcrypto.so" + const libmbedtls = "libmbedtls.so" + const libmbedx509 = "libmbedx509.so" end function __init__() diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl index 215de8aed6e62..04e0126e3db1b 100644 --- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl +++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl @@ -20,9 +20,9 @@ libopenlibm_path = "" if Sys.iswindows() const libopenlibm = "libopenlibm.dll" elseif Sys.isapple() - const libopenlibm = "@rpath/libopenlibm.3.dylib" + const libopenlibm = "@rpath/libopenlibm.dylib" else - const libopenlibm = "libopenlibm.so.3" + const libopenlibm = "libopenlibm.so" end function __init__() diff --git a/stdlib/PCRE2_jll/src/PCRE2_jll.jl b/stdlib/PCRE2_jll/src/PCRE2_jll.jl index 81048a45998b5..4d1a2a859516d 100644 --- a/stdlib/PCRE2_jll/src/PCRE2_jll.jl +++ b/stdlib/PCRE2_jll/src/PCRE2_jll.jl @@ -18,11 +18,11 @@ libpcre2_8_handle = C_NULL libpcre2_8_path = "" if Sys.iswindows() - const libpcre2_8 = "libpcre2-8-0.dll" + const libpcre2_8 = "libpcre2-8.dll" elseif Sys.isapple() - const libpcre2_8 = "@rpath/libpcre2-8.0.dylib" + const libpcre2_8 = "@rpath/libpcre2-8.dylib" else - const libpcre2_8 = "libpcre2-8.so.0" + const libpcre2_8 = "libpcre2-8.so" end function __init__() diff --git a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl index 2940970ceff9f..c266c76a8e639 100644 --- a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl +++ b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl @@ -54,31 +54,31 @@ if Sys.iswindows() const libsuitesparseconfig = "libsuitesparseconfig.dll" const libumfpack = "libumfpack.dll" elseif Sys.isapple() - const libamd = "@rpath/libamd.2.dylib" - const libbtf = "@rpath/libbtf.1.dylib" - const libcamd = "@rpath/libcamd.2.dylib" - const libccolamd = "@rpath/libccolamd.2.dylib" - const libcholmod = "@rpath/libcholmod.3.dylib" - const libcolamd = "@rpath/libcolamd.2.dylib" - const libklu = "@rpath/libklu.1.dylib" - const libldl = "@rpath/libldl.2.dylib" - const librbio = "@rpath/librbio.2.dylib" - const libspqr = "@rpath/libspqr.2.dylib" - const libsuitesparseconfig = "@rpath/libsuitesparseconfig.5.dylib" - const libumfpack = "@rpath/libumfpack.5.dylib" + const libamd = "@rpath/libamd.dylib" + const libbtf = "@rpath/libbtf.dylib" + const libcamd = "@rpath/libcamd.dylib" + const libccolamd = "@rpath/libccolamd.dylib" + const libcholmod = "@rpath/libcholmod.dylib" + const libcolamd = "@rpath/libcolamd.dylib" + const libklu = "@rpath/libklu.dylib" + const libldl = "@rpath/libldl.dylib" + const librbio = "@rpath/librbio.dylib" + const libspqr = "@rpath/libspqr.dylib" + const libsuitesparseconfig = "@rpath/libsuitesparseconfig.dylib" + const libumfpack = "@rpath/libumfpack.dylib" else - const libamd = "libamd.so.2" - const libbtf = "libbtf.so.1" - const libcamd = "libcamd.so.2" - const libccolamd = "libccolamd.so.2" - const libcholmod = "libcholmod.so.3" - const libcolamd = "libcolamd.so.2" - const libklu = "libklu.so.1" - const libldl = "libldl.so.2" - const librbio = "librbio.so.2" - const libspqr = "libspqr.so.2" - const libsuitesparseconfig = "libsuitesparseconfig.so.5" - const libumfpack = "libumfpack.so.5" + const libamd = "libamd.so" + const libbtf = "libbtf.so" + const libcamd = "libcamd.so" + const libccolamd = "libccolamd.so" + const libcholmod = "libcholmod.so" + const libcolamd = "libcolamd.so" + const libklu = "libklu.so" + const libldl = "libldl.so" + const librbio = "librbio.so" + const libspqr = "libspqr.so" + const libsuitesparseconfig = "libsuitesparseconfig.so" + const libumfpack = "libumfpack.so" end function __init__() diff --git a/stdlib/Zlib_jll/src/Zlib_jll.jl b/stdlib/Zlib_jll/src/Zlib_jll.jl index c05e26c4c6993..cdaf7c6c3563e 100644 --- a/stdlib/Zlib_jll/src/Zlib_jll.jl +++ b/stdlib/Zlib_jll/src/Zlib_jll.jl @@ -20,9 +20,9 @@ libz_path = "" if Sys.iswindows() const libz = "libz.dll" elseif Sys.isapple() - const libz = "@rpath/libz.1.dylib" + const libz = "@rpath/libz.dylib" else - const libz = "libz.so.1" + const libz = "libz.so" end function __init__() diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index 09af350636943..ab7d029076e7b 100644 --- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl +++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl @@ -18,11 +18,11 @@ libnghttp2_handle = C_NULL libnghttp2_path = "" if Sys.iswindows() - const libnghttp2 = "libnghttp2-14.dll" + const libnghttp2 = "libnghttp2.dll" elseif Sys.isapple() - const libnghttp2 = "@rpath/libnghttp2.14.dylib" + const libnghttp2 = "@rpath/libnghttp2.dylib" else - const libnghttp2 = "libnghttp2.so.14" + const libnghttp2 = "libnghttp2.so" end function __init__() From 7a21da34d4cb0512e21fccd17eb7d00bbcde0cb8 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Thu, 25 Nov 2021 10:46:31 +0100 Subject: [PATCH 2/2] Fix failures --- .../src/CompilerSupportLibraries_jll.jl | 8 ++++---- stdlib/nghttp2_jll/src/nghttp2_jll.jl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index fac47d95b206f..af8a679d87e10 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -41,10 +41,10 @@ elseif Sys.isapple() const libstdcxx = "@rpath/libstdc++.6.dylib" const libgomp = "@rpath/libgomp.1.dylib" else - const libgcc_s = "libgcc_s.so" - const libgfortran = "libgfortran.so" - const libstdcxx = "libstdc++.so" - const libgomp = "libgomp.so" + const libgcc_s = "libgcc_s.so.1" + const libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major) + const libstdcxx = "libstdc++.so.6" + const libgomp = "libgomp.so.1" end function __init__() diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index ab7d029076e7b..0a42cd01a8f37 100644 --- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl +++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl @@ -18,9 +18,9 @@ libnghttp2_handle = C_NULL libnghttp2_path = "" if Sys.iswindows() - const libnghttp2 = "libnghttp2.dll" + const libnghttp2 = "libnghttp2-14.dll" elseif Sys.isapple() - const libnghttp2 = "@rpath/libnghttp2.dylib" + const libnghttp2 = "@rpath/libnghttp2.14.dylib" else const libnghttp2 = "libnghttp2.so" end