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

Remove indirect MbedTLS_jll dependency from a few packages #8386

Merged
merged 10 commits into from
Mar 30, 2024
13 changes: 4 additions & 9 deletions A/Aria2/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ sources = [
script = raw"""
cd $WORKSPACE/srcdir/aria2-*/

export CPPFLAGS="-I${includedir}"
export LDFLAGS="-L${libdir}"

# Note: we explicitly set `LIBSSH2_LIBS` to avoid pulling in mbedtls when
# linking to older builds of libssh2.
./configure \
--prefix=${prefix} --build=${MACHTYPE} --host=${target} \
--with-pic --enable-shared --enable-libaria2 \
--with-openssl --with-libxml2 --with-libz --with-libssh2
--with-openssl --with-libxml2 --with-libz --with-libssh2 \
LIBSSH2_LIBS="-L${libdir} -lssh2 "

make -j${nproc}
make install
Expand All @@ -45,11 +45,6 @@ products = [
dependencies = [
Dependency(PackageSpec(name="Cares_jll")),
Dependency(PackageSpec(name="LibSSH2_jll")),
# `MbedTLS_jll` is a dependency of `LibSSH2_jll`. Strangely, we
# are getting a newer version in the build than the one
# `LibSSH2_jll` was compiled with. So we explicitly select the
# right version here.
BuildDependency(PackageSpec(name="MbedTLS_jll", version=v"2.28")),
Dependency(PackageSpec(name="OpenSSL_jll"); compat="3.0.8"),
Dependency(PackageSpec(name="XML2_jll")),
Dependency(PackageSpec(name="Zlib_jll")),
Expand Down
4 changes: 0 additions & 4 deletions A/AzStorage/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"); platforms=filter(!Sys.isbsd, platforms)),
Dependency(PackageSpec(name="LLVMOpenMP_jll", uuid="1d63c593-3942-5779-bab2-d838dc0a180e"); platforms=filter(Sys.isbsd, platforms)),
Dependency("LibCURL_jll", v"7.73.0"),
# MbedTLS is only an indirect dependency (through LibCURL), but we want to
# be sure to have the right version of MbedTLS for the corresponding version
# of Julia.
BuildDependency(PackageSpec(; name="MbedTLS_jll", version=v"2.24.0")),
]

#=
Expand Down
19 changes: 10 additions & 9 deletions N/NetCDFF/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using BinaryBuilder, Pkg

name = "NetCDFF"
version = v"4.6.0"
version = v"4.6.1"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v$(version).tar.gz",
"8194aa70e400c0adfc456127c1d97af2c6489207171d13b10cd754a16da8b0ca"),
ArchiveSource("https://downloads.unidata.ucar.edu/netcdf-fortran/$(version)/netcdf-fortran-$(version).tar.gz",
"b50b0c72b8b16b140201a020936aa8aeda5c79cf265c55160986cd637807a37a"),
]

# Bash recipe for building across all platforms
Expand All @@ -29,10 +29,11 @@ rm ${prefix}/lib/*.a
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "linux"; libc = "glibc"),
Platform("x86_64", "macos"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("x86_64", "windows"),
Platform("x86_64", "macos"),
Platform("aarch64", "macos"),
Platform("i686", "windows"),
Platform("x86_64", "windows"),
]
platforms = expand_gfortran_versions(platforms)

Expand All @@ -45,10 +46,10 @@ products = [
dependencies = [
Dependency(PackageSpec(name="NetCDF_jll", uuid="7243133f-43d8-5620-bbf4-c2c921802cf3"); compat="400.902.5"),
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
# `MbedTLS_jll` is an indirect dependency through NetCDF, we need to specify
# a compatible build version for this to work.
BuildDependency(PackageSpec(; name="MbedTLS_jll", version=v"2.24.0")),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
# Note: for some reason GCC 4.8 is still linked to glibc 2.12, we
# need to use GCC 5 to have glibc 2.17.
julia_compat="1.6", preferred_gcc_version=v"5")
28 changes: 14 additions & 14 deletions S/samtools/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
using BinaryBuilder, Pkg

name = "samtools"
version = v"1.14"
version = v"1.19.2"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/samtools/samtools.git", "c29621d3ae075573fce83e229a5e02348d4e8147"),
GitSource("https://github.com/samtools/samtools.git", "66830a3178c7dca941ec0f3b699477464bd44b76"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/samtools/
autoheader
autoconf -Wno-syntax
export CPPFLAGS="-I${includedir}"
if [[ "${target}" != *-darwin* ]]; then
# Need to pass `-lcurl` because it's needed by libhts
export LIBS="-lcurl"
if [[ "${target}" == x86_64-linux-musl ]]; then
# Need to pass `-lcurl -lnghttp2` because it's needed by libhts
# TODO: find a way to avoid this.
export LIBS="-lcurl -lnghttp2"
elif [[ "${target}" == *-freebsd* ]]; then
export CPPFLAGS="-I${includedir}"
fi
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make -j${nproc}
Expand All @@ -27,7 +29,7 @@ make install

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms(; experimental=true, exclude=Sys.iswindows)
platforms = supported_platforms(; exclude=Sys.iswindows)

# The products that we will ensure are always built
products = [
Expand All @@ -37,13 +39,11 @@ products = [
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Ncurses_jll", uuid="68e3532b-a499-55ff-9963-d1c0c0748b3a"))
Dependency(PackageSpec(name="htslib_jll", uuid="f06fe41e-9474-5571-8c61-5634d2b2700c"))
# `MbedTLS_jll` is an indirect dependency through `htslib_jll` (-> `LibCURL_jll` ->
# `MbedTLS_jll`). For some reasons that aren't clear to me at the moment, we are
# getting a version of `MbedTLS_jll` which doesn't match the one `LibCURL_jll` was
# compiled with.
BuildDependency(PackageSpec(; name="MbedTLS_jll", version="2.24"))
Dependency(PackageSpec(name="htslib_jll", uuid="f06fe41e-9474-5571-8c61-5634d2b2700c"); compat="1.19.1")
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
# Note: for some reason GCC 4.8 is still linked to glibc 2.12, we
# need to use at least GCC 5 to have glibc 2.17.
julia_compat="1.6", preferred_gcc_version=v"6")
19 changes: 10 additions & 9 deletions T/TempestModel/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const YGGDRASIL_DIR = "../.."
include(joinpath(YGGDRASIL_DIR, "platforms", "mpi.jl"))

name = "TempestModel"
version = v"0.1.1"
version = v"0.1.2"
tempestmodel_version = v"0.1"
sources = [
GitSource("https://github.com/paullric/tempestmodel",
Expand Down Expand Up @@ -83,7 +83,7 @@ platforms = [
]
platforms = expand_cxxstring_abis(platforms)

platforms, platform_dependencies = MPI.augment_platforms(platforms)
platforms, platform_dependencies = MPI.augment_platforms(platforms; MPItrampoline_compat="5.3.1", OpenMPI_compat="4.1.6, 5")

# Avoid platforms where the MPI implementation isn't supported
# OpenMPI
Expand Down Expand Up @@ -124,16 +124,17 @@ products = [
]

dependencies = [
Dependency("MKL_jll"),
Dependency("NetCDF_jll"; compat="400.701.400 - 400.799"),
# MKL 2023 is the last version which supports x86_64 macOS, so we use that version for
# building. We don't set compat bounds for the time being because apart from that MKL is
# moderately stable and their versioning scheme is calendar-based, rather than something
# semver-like.
Dependency("MKL_jll", v"2023.2.0"),
Dependency("NetCDF_jll"; compat="400.902.208 - 400.999"),
# Updating to a newer HDF5 version is likely possible without problems but requires rebuilding this package
Dependency("HDF5_jll"; compat="~1.12"),
# `MbedTLS_jll` is an indirect dependency through NetCDF, we need to specify
# a compatible build version for this to work.
BuildDependency(PackageSpec(; name="MbedTLS_jll", version=v"2.24.0")),
Dependency("HDF5_jll"; compat="~1.14.3"),
]
append!(dependencies, platform_dependencies)

build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
augment_platform_block, julia_compat="1.6",
augment_platform_block, julia_compat="1.6", preferred_gcc_version=v"5",
)
2 changes: 0 additions & 2 deletions V/VMEC/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
# MbedTLS is an indirect dependency, fix the version for building
BuildDependency(PackageSpec(name = "MbedTLS_jll")),
Dependency("SCALAPACK_jll"),
Dependency("OpenBLAS_jll"),
Dependency("MKL_jll"),
Expand Down