From f047108d09d9f3de656d018ff7810ca6ad9b3ece Mon Sep 17 00:00:00 2001 From: odow Date: Sun, 5 Dec 2021 14:06:05 +1300 Subject: [PATCH 1/6] [SHOT] v1.1 and build on experimental platforms --- C/Coin-OR/SHOT/build_tarballs.jl | 15 +++++---------- C/Coin-OR/coin-or-common.jl | 3 +++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/C/Coin-OR/SHOT/build_tarballs.jl b/C/Coin-OR/SHOT/build_tarballs.jl index aeeee887ad3..1c520650075 100644 --- a/C/Coin-OR/SHOT/build_tarballs.jl +++ b/C/Coin-OR/SHOT/build_tarballs.jl @@ -1,14 +1,9 @@ include("../coin-or-common.jl") -name = "SHOT" -version = v"1.0.1" - -# Not actually v1.0.1. This is the latest commit as of the 13-07-2021 -# https://github.com/coin-or/SHOT/commit/edbff51d392d2f347331a28364cbffa89b44218f sources = [ GitSource( "https://github.com/coin-or/SHOT.git", - "edbff51d392d2f347331a28364cbffa89b44218f", + SHOT_gitsha, ), ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz", "2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"), @@ -67,15 +62,15 @@ products = [ dependencies = [ Dependency("ASL_jll", ASL_version), - Dependency("Cbc_jll", Cbc_version), - Dependency("Ipopt_jll", Ipopt_version), + Dependency("Cbc_jll", compat="$(Cbc_version)"), + Dependency("Ipopt_jll", compat="$(Ipopt_version)"), Dependency("CompilerSupportLibraries_jll"), ] build_tarballs( ARGS, - name, - version, + "SHOT", + SHOT_version, sources, script, platforms, diff --git a/C/Coin-OR/coin-or-common.jl b/C/Coin-OR/coin-or-common.jl index fed601ee9c7..db3fc9220b5 100644 --- a/C/Coin-OR/coin-or-common.jl +++ b/C/Coin-OR/coin-or-common.jl @@ -83,6 +83,9 @@ SYMPHONY_version = MibS_version = v"1.1.3" MibS_gitsha = "4b7ec93c4bd1d6a978deff9987cf1df74f6598d3" +SHOT_gitsha = "11fda1ecb84af9718f1e0c0ebf7ae5ae8c45041a" +SHOT_version = offset_version(v"1.1.0", "0.0.0") + # Third-party packages needed by COIN-OR libraries. ASL_version = v"0.1.3" METIS_version = v"5.1.1" From bf90cb76e33a5b206bff7f5bcba6ebc5e004704b Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sun, 5 Dec 2021 14:24:49 +1300 Subject: [PATCH 2/6] Update coin-or-common.jl --- C/Coin-OR/coin-or-common.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/Coin-OR/coin-or-common.jl b/C/Coin-OR/coin-or-common.jl index db3fc9220b5..9ef0bdc4800 100644 --- a/C/Coin-OR/coin-or-common.jl +++ b/C/Coin-OR/coin-or-common.jl @@ -84,7 +84,7 @@ MibS_version = v"1.1.3" MibS_gitsha = "4b7ec93c4bd1d6a978deff9987cf1df74f6598d3" SHOT_gitsha = "11fda1ecb84af9718f1e0c0ebf7ae5ae8c45041a" -SHOT_version = offset_version(v"1.1.0", "0.0.0") +SHOT_version = offset_version(v"1.1.0", v"0.0.0") # Third-party packages needed by COIN-OR libraries. ASL_version = v"0.1.3" From b710760dcae0f8535d631b1640a2fcb114572dd3 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sun, 5 Dec 2021 14:58:27 +1300 Subject: [PATCH 3/6] Update build_tarballs.jl --- C/Coin-OR/SHOT/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/Coin-OR/SHOT/build_tarballs.jl b/C/Coin-OR/SHOT/build_tarballs.jl index 1c520650075..98ded4f1988 100644 --- a/C/Coin-OR/SHOT/build_tarballs.jl +++ b/C/Coin-OR/SHOT/build_tarballs.jl @@ -15,7 +15,7 @@ cd $WORKSPACE/srcdir/SHOT git submodule update --init --recursive # Disable run_source_test in CppAD atomic_patch -p1 ../patches/CppAD.patch -if [[ "${target}" == *-darwin* ]]; then +if [[ "${target}" == *-x86_64-apple-darwin* ]]; then # Work around the issue # /workspace/srcdir/SHOT/src/Model/../Model/Simplifications.h:1370:26: error: 'value' is unavailable: introduced in macOS 10.14 # optional.value()->coefficient *= -1.0; From 7e3b2883898319b5b6b19bbe8c355bb487b72612 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sun, 5 Dec 2021 15:02:06 +1300 Subject: [PATCH 4/6] Update C/Coin-OR/SHOT/build_tarballs.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mosè Giordano --- C/Coin-OR/SHOT/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/Coin-OR/SHOT/build_tarballs.jl b/C/Coin-OR/SHOT/build_tarballs.jl index 98ded4f1988..67b9c10df79 100644 --- a/C/Coin-OR/SHOT/build_tarballs.jl +++ b/C/Coin-OR/SHOT/build_tarballs.jl @@ -15,7 +15,7 @@ cd $WORKSPACE/srcdir/SHOT git submodule update --init --recursive # Disable run_source_test in CppAD atomic_patch -p1 ../patches/CppAD.patch -if [[ "${target}" == *-x86_64-apple-darwin* ]]; then +if [[ "${target}" == x86_64-apple-darwin* ]]; then # Work around the issue # /workspace/srcdir/SHOT/src/Model/../Model/Simplifications.h:1370:26: error: 'value' is unavailable: introduced in macOS 10.14 # optional.value()->coefficient *= -1.0; From 5b338895d05efa809be173ab9ffbd8e506c67286 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sun, 5 Dec 2021 16:39:48 +1300 Subject: [PATCH 5/6] Update build_tarballs.jl --- C/Coin-OR/SHOT/build_tarballs.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C/Coin-OR/SHOT/build_tarballs.jl b/C/Coin-OR/SHOT/build_tarballs.jl index 67b9c10df79..dd9725d460e 100644 --- a/C/Coin-OR/SHOT/build_tarballs.jl +++ b/C/Coin-OR/SHOT/build_tarballs.jl @@ -15,7 +15,7 @@ cd $WORKSPACE/srcdir/SHOT git submodule update --init --recursive # Disable run_source_test in CppAD atomic_patch -p1 ../patches/CppAD.patch -if [[ "${target}" == x86_64-apple-darwin* ]]; then +if [[ "${target}" == *-darwin* ]]; then # Work around the issue # /workspace/srcdir/SHOT/src/Model/../Model/Simplifications.h:1370:26: error: 'value' is unavailable: introduced in macOS 10.14 # optional.value()->coefficient *= -1.0; @@ -55,6 +55,8 @@ make install install_license ../LICENSE """ +filter!(p -> p != Platform("aarch64", "macOS"), platforms) + products = [ ExecutableProduct("SHOT", :amplexe), LibraryProduct("libSHOTSolver", :libshotsolver), From abe559f935fe732e7a6cab74b9cfb2b11b9aa6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 6 Dec 2021 01:32:50 +0000 Subject: [PATCH 6/6] [SHOT] Fix compilation for `aarch64-apple-darwin` --- C/Coin-OR/SHOT/build_tarballs.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C/Coin-OR/SHOT/build_tarballs.jl b/C/Coin-OR/SHOT/build_tarballs.jl index dd9725d460e..a12fcab3e67 100644 --- a/C/Coin-OR/SHOT/build_tarballs.jl +++ b/C/Coin-OR/SHOT/build_tarballs.jl @@ -15,7 +15,7 @@ cd $WORKSPACE/srcdir/SHOT git submodule update --init --recursive # Disable run_source_test in CppAD atomic_patch -p1 ../patches/CppAD.patch -if [[ "${target}" == *-darwin* ]]; then +if [[ "${target}" == x86_64-apple-darwin* ]]; then # Work around the issue # /workspace/srcdir/SHOT/src/Model/../Model/Simplifications.h:1370:26: error: 'value' is unavailable: introduced in macOS 10.14 # optional.value()->coefficient *= -1.0; @@ -30,6 +30,9 @@ if [[ "${target}" == *-darwin* ]]; then cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/." cp -ra System "/opt/${target}/${target}/sys-root/." popd +elif [[ "${target}" == aarch64-apple-darwin* ]]; then + # TODO: we need to fix this in the compiler wrappers + export CXXFLAGS="-mmacosx-version-min=11.0" elif [[ ${target} == *mingw* ]]; then export LDFLAGS="-L${libdir}" fi @@ -55,8 +58,6 @@ make install install_license ../LICENSE """ -filter!(p -> p != Platform("aarch64", "macOS"), platforms) - products = [ ExecutableProduct("SHOT", :amplexe), LibraryProduct("libSHOTSolver", :libshotsolver),