Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mbedtls #126

Merged
merged 2 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pin_run_as_build:
max_pin: x.x.x
zlib:
max_pin: x.x
suitesparse:
- '5'
target_platform:
- linux-64
zip_keys:
Expand Down
7 changes: 0 additions & 7 deletions .ci_support/migrations/libgit212.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ pin_run_as_build:
max_pin: x.x.x
zlib:
max_pin: x.x
suitesparse:
- '5'
target_platform:
- osx-64
zip_keys:
Expand Down
9 changes: 4 additions & 5 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ make -C base version_git.jl.phony CC=$CC CXX=$CXX FC=$FC

export EXTRA_MAKEFLAGS=""
if [[ "${target_platform}" == osx-* ]]; then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=0"
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_MBEDTLS=0"
elif [[ "${target_platform}" == linux-* ]]; then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=1"
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBGIT2=1 USE_SYSTEM_MBEDTLS=1"
fi
# See the following link for how official Julia sets JULIA_CPU_TARGET
# https://github.com/JuliaCI/julia-buildbot/blob/ba448c690935fe53d2b1fc5ce22bc60fd1e251a7/master/inventory.py
Expand All @@ -39,7 +39,7 @@ else
exit 1
fi

make -j 4 prefix=${PREFIX} sysconfigdir=${PREFIX}/etc \
make -j${CPU_COUNT} prefix=${PREFIX} sysconfigdir=${PREFIX}/etc \
LIBBLAS=-lopenblas64_ LIBBLASNAME=libopenblas64_ LIBLAPACK=-lopenblas64_ LIBLAPACKNAME=libopenblas64_ \
USE_SYSTEM_ARPACK=1 \
USE_SYSTEM_BLAS=1 \
Expand All @@ -58,11 +58,10 @@ make -j 4 prefix=${PREFIX} sysconfigdir=${PREFIX}/etc \
USE_SYSTEM_LIBUNWIND=1 \
USE_SYSTEM_LIBUV=0 \
USE_SYSTEM_UTF8PROC=1 \
USE_SYSTEM_MBEDTLS=0 \
USE_SYSTEM_NGHTTP2=1 \
USE_SYSTEM_ZLIB=1 \
USE_SYSTEM_P7ZIP=1 \
${EXTRA_MAKEFLAGS} \
${EXTRA_MAKEFLAGS} \
TAGGED_RELEASE_BANNER="conda-forge-julia release" \
CC=$CC CXX=$CXX FC=$FC \
install
Expand Down
118 changes: 118 additions & 0 deletions recipe/julia-hardcoded-libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
From 620661455ec175ecd50c49f08e1ac4f6fdb84a78 Mon Sep 17 00:00:00 2001
From: Ista Zahn <[email protected]>
Date: Mon, 20 Sep 2021 10:56:40 -0400
Subject: [PATCH] remove more hard coded libraries

---
stdlib/LibGit2_jll/src/LibGit2_jll.jl | 4 ++--
stdlib/LibSSH2_jll/src/LibSSH2_jll.jl | 4 ++--
stdlib/MbedTLS_jll/src/MbedTLS_jll.jl | 12 ++++++------
stdlib/OpenLibm_jll/src/OpenLibm_jll.jl | 4 ++--
stdlib/libLLVM_jll/src/libLLVM_jll.jl | 2 +-
stdlib/nghttp2_jll/src/nghttp2_jll.jl | 4 ++--
6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
index 8d1629e..b5a3b60 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 69a2fe6..6bd21b3 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/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
index a7ca666..62774b9 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 e0ac190..1f64e24 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/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
index fa45e75..b51812e 100644
--- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl
+++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
@@ -23,7 +23,7 @@ if Sys.iswindows()
elseif Sys.isapple()
const libLLVM = "@rpath/libLLVM.dylib"
else
- const libLLVM = "libLLVM-11jl.so"
+ const libLLVM = "libLLVM.so"
end

function __init__()
diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
index 8b98c76..d926449 100644
--- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl
+++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
@@ -20,9 +20,9 @@ libnghttp2_path = ""
if Sys.iswindows()
const libnghttp2 = "libnghttp2-14.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__()
--
2.33.0

13 changes: 10 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ source:
fn: julia-{{ version }}-full.tar.gz
url: https://github.com/JuliaLang/julia/releases/download/v{{ version }}/julia-{{ version }}-full.tar.gz
sha256: {{ sha256 }}
patches:
## from https://github.com/archlinux/svntogit-community/tree/packages/julia/trunk
- julia-hardcoded-libs.patch

build:
skip: true # [win]
number: 2
number: 3
features:

requirements:
Expand All @@ -34,8 +37,9 @@ requirements:
- libssh2
- libosxunwind # [osx]
- libunwind # [linux]
- mbedtls # [not osx]
- arpack
- suitesparse =5.4.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the pin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used https://github.com/archlinux/svntogit-community/blob/packages/julia/trunk/julia-hardcoded-libs.patch to patch out the hard-coded mbedtls version. Since that patch also removes suitesparse version hard-coding we don't need to pin anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be interested to see how this interacts with the issue in #118, which is why the pin was added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should test to make sure that issue is fixed by this PR before merging.

- suitesparse
- pcre2
- git
- libutf8proc
Expand All @@ -51,11 +55,12 @@ requirements:
- mpfr
- openlibm
- arpack
- suitesparse =5.4.0
- suitesparse
- pcre2
- curl
- libgit2 # [not osx]
- libssh2
- mbedtls # [not osx]
- git
- libutf8proc
- libnghttp2
Expand Down Expand Up @@ -88,6 +93,8 @@ test:
"reinterpretarray", "syntax", "corelogging", "missing", "asyncmap",
"smallarrayshrink", "download"])' # all except stdlib, add "opaque_closure", "filesystem" with 1.7
- julia -e 'Base.runtests(["math"])' # [not osx] due to failure on math.jl:296, pre-haswell processor
- julia -e 'import Pkg;Pkg.add("LibSSH2_jll")'
- julia -e 'import Pkg;Pkg.add("Sundials")'
requires:
- perl

Expand Down