feat(eigen): Feature System v2 — eigen_blas provider + use_blas/use_lapacke/mpl2only#52
Merged
Merged
Conversation
…apacke/mpl2only
Requires mcpp >= 0.0.69 (feature defines + capabilities); older mcpp ignores the
new keys (skip-unknown), so the recipe stays parseable everywhere.
- eigen_blas : compile Eigen's own reference BLAS AND advertise the 'blas'
capability (provides=["blas"]).
- use_blas : define EIGEN_USE_BLAS + requires=["blas"] — Eigen delegates to
an external BLAS bound by the resolver.
- use_lapacke : define EIGEN_USE_LAPACKE + requires=["lapack"].
- mpl2only : define EIGEN_MPL2_ONLY (no capability).
Header comment documents the provider-vs-consumer split and the verified mutual
exclusion: enabling eigen_blas + use_blas together is self-contradictory (the
blas/*_impl.h functype dispatch tables vs the -DEIGEN_USE_BLAS backend signature)
— use eigen_blas alone, or use_blas with a separate provider.
Verified on mcpp 0.0.69: header-only mpl2only consumer builds+runs; eigen_blas
alone compiles; compile_commands.json carries EIGEN_USE_BLAS / EIGEN_MPL2_ONLY.
…las') The recipe renamed the BLAS-provider feature blas -> eigen_blas; update the example's dependency spec to match (it referenced the now-removed 'blas', failing the smoke). eigen_blas alone (no EIGEN_USE_BLAS) compiles cleanly.
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.
Brings
compat.eigenonto mcpp's Feature System v2 (mcpp ≥ 0.0.69). Older mcpp ignores the newdefines/requires/provideskeys (skip-unknown), so the recipe stays parseable everywhere — the v2 behaviours are simply inert there.Features
eigen_blas— compile Eigen's own reference BLAS (blas/*.cpp+blas/f2c/*.c) AND advertise theblascapability (provides = ["blas"]). Self-contained, no Fortran.use_blas—defines = ["EIGEN_USE_BLAS"]+requires = ["blas"]: Eigen's kernels delegate to an external BLAS that the resolver binds.use_lapacke—EIGEN_USE_LAPACKE+requires = ["lapack"].mpl2only—EIGEN_MPL2_ONLY(no capability).This fixes the original report: enabling Eigen's BLAS feature now actually emits
-DEIGEN_USE_BLAS(not only-DMCPP_FEATURE_BLAS).Mutual exclusion (documented in the recipe header)
eigen_blasanduse_blasare opposite roles and must not be combined: compiling Eigen's own BLAS sources with-DEIGEN_USE_BLASdefined is self-contradictory (theblas/*_impl.hfunctype dispatch tables stop matching the by-value backendrunsignatures →[-fpermissive]on level2/level3). Useeigen_blasalone, oruse_blaswith a separate provider.Verified (mcpp 0.0.69)
mpl2onlyconsumer builds + runs;eigen_blasalone compiles;compile_commands.jsoncarriesEIGEN_USE_BLAS/EIGEN_MPL2_ONLY.Design: mcpp
.agents/docs/2026-06-29-feature-capability-model-design.md.