gfan: add v0.8beta - #6090
Conversation
|
@d-torrance, I requrested a light copilot review just do see what it says. It should be better than in the past, but still take care, it might still hallucinate convincingly! |
There was a problem hiding this comment.
Pull request overview
This PR updates Spack’s package recipes to introduce gfan version 0.8beta (needed for macaulay2@1.26.06) and adjusts macaulay2 to use the newer gfan instead of carrying a local patch to relax the gfan minimum version.
Changes:
- Add
gfan@0.8betawith a new patch to broaden compiler/toolchain compatibility and add atbbdependency for that version. - Update
macaulay2@1.26.06:to requiregfan@0.8beta:and drop the priorallow-older-gfan.patch. - Remove
repos/spack_repo/builtin/packages/macaulay2/allow-older-gfan.patchfrom the package.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| repos/spack_repo/builtin/packages/macaulay2/package.py | Constrains gfan dependency for macaulay2@1.26.06: and removes the older local workaround patch. |
| repos/spack_repo/builtin/packages/macaulay2/allow-older-gfan.patch | Deleted patch that previously relaxed Macaulay2’s gfan version check. |
| repos/spack_repo/builtin/packages/gfan/package.py | Adds gfan@0.8beta, tbb dependency for that version, and applies the compatibility patch. |
| repos/spack_repo/builtin/packages/gfan/compile-on-more-systems-0.8beta.patch | Upstream-style patch to make gfan@0.8beta build on more compilers/platforms (notably macOS/clang and older GCC). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @property | ||
| def build_targets(self): | ||
| return [f"CXX={spack_cxx}"] | ||
|
|
There was a problem hiding this comment.
Good catch! This is an also an issue for cddlib and gmp. I just force-pushed a new version of this commit setting these flags
We also include a patch from that allows it to build using a much wider variety of compilers. Also we pass a bunch of variables to make: * CXX, or the Makefile would overwrite it with "g++" * Drop flag_handler and move the flags we set there to build_targets for consistency. * The rest are noops in Linux, but in macOS, the Makefile would have us looking for Homebrew packages for the dependencies.
Now that gfan 0.8beta is available, then we can just depend on it rather than patching out the check for it. (Furthermore, we'll actually need it soon as the gfanInterface package is being updated to add 0.8-only features.)
It now includes a FreeBSD to fix the build on Clang 19+: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282851
|
I just pushed one more commit - the v0.6.2 builds were failing on macos due to a known bug (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282851) when compiling w/ Clang 19+. The patch we were already using for 0.6.2 from the Macaulay2 repo had already been updated to include the FreeBSD patch, so I just bumped the commit. |
We add gfan 0.8beta, which is required for Macaulay2 1.26.06. Previously, we patched Macaulay2 to allow for an older gfan, but this won't work soon, as likely at the next release there will be features that require the new version.
This version of gfan doesn't build on machines w/o a new-ish version of GCC (and GCC specifically, so no Clang at all), so we add a patch (also submitted upstream) that makes this possible. (AI Disclosure: Claude 🤖 wrote the patch with lots of oversight from me.) See Macaulay2/M2#4643 for more specifics about what the patch contains.
We also drop the old Macaulay2 patch and instead tell it to depend on this new version. (I hope this is okay -- this is the first time I've proposed updating two packages in one PR, but they naturally fit together.)