Conversation
Propagate dependency usage requirements through CMake configs or pkg-config, export the installed Debug and TBB settings, and test relocated shared/static consumers in CI. Retain the existing TBB auto detection and SONAME setup. Co-authored-by: Codex <noreply@openai.com>
Build tagged Autotools dependencies in a temporary prefix because current Homebrew CMake bottles omit package metadata. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
dimpase
commented
Sep 19, 2026
dimpase
left a comment
Author
There was a problem hiding this comment.
OK, looks good. Can be simplified once memtailor and mathic cmake changes are propagated into new releases (and into upstreams)
@d-torrance - over to you
Co-authored-by: Codex <noreply@openai.com>
dimpase
marked this pull request as ready for review
September 19, 2026 19:30
d-torrance
requested changes
Sep 25, 2026
| ) | ||
| find_library(MEMTAILOR_LIBRARIES NAMES memtailor | ||
| PATHS ${LIB_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/lib | ||
| ) |
Member
There was a problem hiding this comment.
I think we should keep these as a fallback. In particular, this would mean we could keep using the homebrew packages in CI instead of having to build them from source.
Same comment for mathic.
Author
There was a problem hiding this comment.
as we maintain the Homebrew taps in question, we can just update them, then everything will be OK. Anyhow, you merged my mathic PR already...
Author
There was a problem hiding this comment.
anyhow, fixed by afacdb8
please see Macaulay2/mathic#30 for the corresponding fix for mathic.
Signed-off-by: Dima Pasechnik <dima@pasechnik.info>
Signed-off-by: Dima Pasechnik <dima@pasechnik.info>
Signed-off-by: Dima Pasechnik <dima@pasechnik.info>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current CMake build has SONAMEs, GNUInstallDirs, TBB selection, and pkg-config installation, but lacks a consumable CMake package. It also reconstructs mathic and memtailor as static imported libraries without their usage requirements. The CMake-generated pkg-config file omits
MATHICGB_DEBUG, and a direct configuration-dependent export would select the consumer's Debug ABI instead of the installed library's ABI.Install
mathicgbConfig.cmake, version metadata, andmathicgb::mathicgb, with C++17 and transitive dependencies. Prefer dependency CMake configs, then pkg-config metadata, and retain header/library discovery as a fallback for older installations such as the current Homebrew bottles. Preserve the current TBB ON/OFF/auto behavior and SONAME setup.Export the installed library's Debug setting through both metadata formats, retain the TBB/no-TBB usage requirements, and explicitly install static archives and the public header. Install documentation using
CMAKE_INSTALL_DOCDIRinstead of the nonstandardlicenses/mathicgbdirectory, allowing Gentoo to select/usr/share/doc/${PF}. Enable root-level CTest. Extend the existing Linux/macOS, Debug/Release, TBB-on/off CI matrix with shared/static installation checks, pkg-config flag checks, and separate Release consumers of relocated installations. Add the templates and fixtures to Autotools distributions and document usage. CMake 3.18 is required for aliases of non-global imported dependency targets.macOS CMake CI uses the existing Homebrew memtailor and mathic packages directly. The fallback allows this even when their bottles lack CMake config and pkg-config metadata. Installed pkg-config flag checks run when the dependencies provide
.pcfiles; the installed CMake consumer is tested on both platforms.Local Gentoo validation, at low priority with two compilation jobs:
make distsucceeded with a nonstandard mathic prefix and includes the new CMake config and consumer fixtures.The documentation-path follow-up was checked by applying the updated Gentoo patch to the release and staging an installation: documentation is under
/usr/share/doc/mathicgb-1.4-r2, with no/usr/licenses. Overlay QA passed.The discovery fallback was tested with both dependency CMake configs and pkg-config disabled. Mathicgb and
mgbbuilt against installed headers and libraries; a staged installed CMake consumer compiled, linked, and passed its runtime test.Related work: Macaulay2/memtailor#23 and Macaulay2/mathic#29. This adapts the Gentoo packaging work to current mathicgb master without reverting its newer CMake improvements. External mathicgb selection in M2 remains separate.