From 3b4af00350ef8f9d25722e8692797aeedc978a8c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 29 Dec 2020 23:27:56 +0100 Subject: [PATCH] Update SDPA to new libcxxwrap / libjulia --- S/SDPA/build_tarballs.jl | 54 +++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/S/SDPA/build_tarballs.jl b/S/SDPA/build_tarballs.jl index de2171b061c..3f2de581495 100755 --- a/S/SDPA/build_tarballs.jl +++ b/S/SDPA/build_tarballs.jl @@ -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") ] @@ -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 @@ -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)")