From d1b3604b333ebe23b88ccfbab021b697563ae73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 12:14:01 +0100 Subject: [PATCH 1/8] Add Mac-OS and Windows to ci --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7ee3f7..0b0cfae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,16 @@ jobs: include: - version: '1.10' os: ubuntu-latest - arch: x64 + arch: default - version: '1' os: ubuntu-latest - arch: x64 + arch: default + - version: '1' + os: macOS-latest + arch: default + - version: '1' + os: windows-latest + arch: default steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v3 From efb5de539ad260637ace6439cb26ef511582c653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 17:58:11 +0100 Subject: [PATCH 2/8] Fix mac OS --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b0cfae..7fb0ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,10 @@ jobs: - version: '1' os: ubuntu-latest arch: default + # PENSDP only ships an Intel macOS binary, so pin to an Intel runner. - version: '1' - os: macOS-latest - arch: default + os: macos-13 + arch: x64 - version: '1' os: windows-latest arch: default From 5c48584d947d7e87aa14ae40b31735e144054f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 18:07:38 +0100 Subject: [PATCH 3/8] rm windows --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fb0ed5..07c95a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,6 @@ jobs: - version: '1' os: macos-13 arch: x64 - - version: '1' - os: windows-latest - arch: default steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v3 From 61da36b8e7e90b8d93ca73d56b4f30010cba3223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 18:08:04 +0100 Subject: [PATCH 4/8] MacOS latest --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07c95a6..87fbaf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: arch: default # PENSDP only ships an Intel macOS binary, so pin to an Intel runner. - version: '1' - os: macos-13 + os: macos-latest arch: x64 steps: - uses: actions/checkout@v6 From a4dc205d956416bb5883e575c9c2724c20339c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 18:12:01 +0100 Subject: [PATCH 5/8] force-arch --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87fbaf1..d7b03f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: - version: '1' os: macos-latest arch: x64 + force-arch: true steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v3 From 632ca2f933fb34ab48b76bd1b36941ed5130a914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 18:14:09 +0100 Subject: [PATCH 6/8] fix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7b03f1..158e00f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} + force-arch: ${{ matrix['force-arch'] || false }} - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 From 3538eacaa54f4c9f2ac6d0ff290e88b95563a09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Thu, 4 Jun 2026 21:32:34 +0100 Subject: [PATCH 7/8] Try fixing mac os --- deps/build.jl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index dc406ad..6b4a788 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -70,6 +70,18 @@ function _download_and_extract() return extract_dir end +function _find_macos_gfortran() + for name in ("gfortran", "gfortran-14", "gfortran-13", "gfortran-12", "gfortran-11") + p = Sys.which(name) + p === nothing || return p + end + error( + "No `gfortran` found on PATH. The macOS build needs Homebrew's " * + "gfortran for libquadmath and the libgcc soft-float helpers used " * + "by `libgfortran_mac.a`. Install it with `brew install gcc`.", + ) +end + # Build a shared library that exports the `pensdp` symbol so that it can be # loaded by Julia via `Libdl.dlopen` and called with `ccall`. function _build_shared_library(extract_dir) @@ -94,9 +106,16 @@ function _build_shared_library(extract_dir) elseif os == :apple output = joinpath(LIB_DIR, "libpensdp.dylib") libgfortran_mac = joinpath(lib_src, "libgfortran_mac.a") - cmd = `gcc -dynamiclib -o $(output) + # `libgfortran_mac.a` references libquadmath (`_strtoflt128`, + # `_quadmath_snprintf`, ...) and the libgcc soft-float helpers + # (`___multf3`, `___subtf3`, ...) used for `long double` arithmetic. + # Apple's clang ships neither, so link via Homebrew `gfortran`, which + # adds its own libgcc/libquadmath search paths. + gfortran = _find_macos_gfortran() + cmd = `$(gfortran) -shared -dynamiclib -o $(output) -Wl,-force_load,$(libpensdp_a) $(libgfortran_mac) + -lquadmath -framework Accelerate -lpthread` @info "Linking shared library" cmd From 6f5f344cf054e6ec6569e9f3f2e03158991f26a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Wed, 10 Jun 2026 20:58:55 +0200 Subject: [PATCH 8/8] fix --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 158e00f..62a6f90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,11 @@ jobs: - version: '1' os: ubuntu-latest arch: default - # PENSDP only ships an Intel macOS binary, so pin to an Intel runner. + # PENSDP only ships an Intel macOS binary, so pin to an Intel runner + # (macos-latest is arm64; macos-13 is the last native x86_64 image). - version: '1' - os: macos-latest + os: macos-13 arch: x64 - force-arch: true steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v3