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

Update SDPA to new libcxxwrap / libjulia #2327

Merged
merged 1 commit into from
Jan 2, 2021
Merged
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
54 changes: 34 additions & 20 deletions S/SDPA/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

julia_version = v"1.5.3"

# The version of this JLL is decoupled from the upstream version.
# Whenever we package a new upstream release, we initially map its
# version X.Y.Z to X00.Y00.Z00 (i.e., multiply each component by 100).
# So for example version 2.6.3 would become 200.600.300.
#
# Together, this allows to increment the patch level of the JLL for minor tweaks.
# If a rebuild of the JLL is needed which keeps the upstream version identical
# but breaks ABI compatibility for any reason, one can increment the minor or major
# version (depending on whether package using this JLL use `~` or `^` compat entries)
# e.g. go from 200.600.300 to 200.601.300 or 201.600.300
# Similar tricks can also be used to package prerelease versions; e.g. one might
# map a prerelease of 2.7.0 to 200.690.000.

name = "SDPA"
version = v"7.3.8"
version = v"700.300.800"
upstream_version = v"7.3.8"

# Collection of sources required to build SDPABuilder
sources = [
ArchiveSource("https://sourceforge.net/projects/sdpa/files/sdpa/sdpa_$(version).tar.gz",
ArchiveSource("https://sourceforge.net/projects/sdpa/files/sdpa/sdpa_$(upstream_version).tar.gz",
"c7541333da2f0bb2d18e90dbf758ac7cc099f3f7da3f256b284b0725f96d4117")
DirectorySource("./bundled")
]
Expand Down Expand Up @@ -68,15 +86,15 @@ if [[ $target == *"apple-darwin"* ]]; then
macos_extra_flags="-DCMAKE_CXX_COMPILER_ID=AppleClang -DCMAKE_CXX_COMPILER_VERSION=10.0.0 -DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT=11"
fi

cmake $macos_extra_flags -DCMAKE_INSTALL_PREFIX=${prefix} \
cmake $macos_extra_flags \
-DCMAKE_FIND_ROOT_PATH=${prefix} \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DJulia_PREFIX=${prefix} \
-DSDPA_DIR=$prefix \
-DMUMPS_INCLUDE_DIR="../../destdir/include/mumps_seq" \
-DCMAKE_FIND_ROOT_PATH=${prefix} \
-DJulia_PREFIX=${prefix} \
-DSDPA_LIBRARY="-lsdpa" \
-D_GLIBCXX_USE_CXX11_ABI=1 \
-DJlCxx_DIR=${prefix}/lib/cmake/JlCxx \
..
cmake --build . --config Release --target install

Expand All @@ -94,29 +112,25 @@ products = [
LibraryProduct("libsdpawrap", :libsdpawrap)
]

# Pick platforms from L/libcxxwrap-julia/build_tarballs.jl
platforms = [
FreeBSD(:x86_64; compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Linux(:armv7l; libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Linux(:aarch64; libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Linux(:x86_64; libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Linux(:i686; libc=:glibc, compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
MacOS(:x86_64; compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Windows(:x86_64; compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
Windows(:i686; compiler_abi=CompilerABI(libgfortran_version=v"4", cxxstring_abi=:cxx11)),
]
#platforms = expand_gfortran_versions(platforms)
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
include("../../L/libjulia/common.jl")
platforms = libjulia_platforms(julia_version)
platforms = expand_cxxstring_abis(platforms)
platforms = expand_gfortran_versions(platforms)
filter!(p -> libgfortran_version(p) >= v"4", platforms)

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("libcxxwrap_julia_jll"),
Dependency("OpenBLAS32_jll"),
Dependency("CompilerSupportLibraries_jll"),
BuildDependency(PackageSpec(name="Julia_jll", version="v1.4.1")),
BuildDependency(PackageSpec(name="libjulia_jll", version=julia_version)),
BuildDependency(MUMPS_seq_packagespec),
BuildDependency(METIS_packagespec),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
preferred_gcc_version=v"7")
preferred_gcc_version=v"8",
julia_compat = "$(julia_version.major).$(julia_version.minor)")