Skip to content

CI: rebuild isitgr from source on macOS (its sdist ships a Linux binary) - #1320

Merged
johannct merged 1 commit into
fix_isitgr_import_oserrorfrom
ci_rebuild_isitgr_macos
Oct 27, 2026
Merged

johannct merged 1 commit into
fix_isitgr_import_oserrorfrom
ci_rebuild_isitgr_macos

Conversation

@johannct

Copy link
Copy Markdown
Contributor

Follow-up to #1316.

The isitgr sdist ships a prebuilt Linux ELF (isitgr/isitgrlib.so) and its setup.py
ignores the exit status of make, so on macOS pip installs the ELF and
import isitgr fails (dlopen: slice is not valid mach-o file).
Once the binary is removed, the build fails with conda-forge's gfortran 15,
because fortran/Makefile links with -static-libgcc & co. while no static
libgomp.a is shipped (ld: file not found: libgomp.a).

This adds a macOS-only step (before "Install CCL") that:

  • removes the shipped binary from the sdist,
  • strips the three static-link options from fortran/Makefile,
  • reinstalls isitgr from the patched sources.

Upstream issue: mishakb/ISiTGR#7. The step carries a TODO
to remove it once that is fixed.

Result: the isitgr unit tests and benchmarks run on macOS instead of being skipped.
The skips added in #1316 are kept as a safety net. Linux is unchanged (the step is
skipped there).

Checked on macos-latest, Python 3.11: 932 unit tests and 441 benchmarks passed,
0 skipped. [Update with the results of this PR's CI for 3.10 / 3.12 / 3.13 / 3.14.]

Notes:

  • The step is idempotent: it works whether the conda environment was freshly built
    or restored from the cache.
  • It adds some compile time to each macOS job.

@coveralls

coveralls commented Oct 26, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 40483085502

Warning

No base build found for commit c73ee08 on fix_isitgr_import_oserror.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 97.471%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 6801
Covered Lines: 6629
Line Coverage: 97.47%
Coverage Strength: 4.87 hits per line

💛 - Coveralls

@johannct

Copy link
Copy Markdown
Contributor Author

note that this PR remains relevant even if isitgr is fixed upstream

@carlosggarcia carlosggarcia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you've tested it and works. LGTM

@carlosggarcia
carlosggarcia force-pushed the ci_rebuild_isitgr_macos branch from 3deff84 to fe53da1 Compare October 27, 2026 09:44
@johannct
johannct merged commit de7b91d into master Oct 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants