-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "cmake: fix breaking build tree on version/revision bumps" #198775
Conversation
72b0a76
to
8c0152d
Compare
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
Can we use the patch that was merged upstream instead? |
8c0152d
to
f26e365
Compare
That's possible. I've tried to apply the fix |
8c0152d
to
3113d58
Compare
Actually, the upstream patch also fails on my minimal example of #198772, so I removed it again. The interesting thing is that exactly the same patch works when I build CMake not using brew. So right now the situation with regards to that minimal example is
Probably @carlocab has a better insight on what is going on. |
If I'm understanding this correctly: it seems like this needs to be reported upstream then. Because we can revert #197088 now, but that's just going to break again when upstream changes regarding symlink handling land in a CMake release. Can you try building |
I have now built upstream brew install cmake
cmake .. # fails
/opt/homebrew/bin/cmake .. # fails
/opt/homebrew/Cellar/cmake/3.31.1/bin/cmake .. # succeeds
brew unlink cmake
ln -s ../Cellar/cmake/master/bin/cmake /opt/homebrew/bin/cmake
cmake .. # succeeds I have started from a clean build folder with each Footnotes |
Great, can we backport https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9987? |
3113d58
to
1f22aa2
Compare
I've done that now and put the diff inside the formula in this PR. For some reason, this still fails on #198772 when I install it via brew. But when I build exactly the same status via
it works. I'm not sure what brew is doing here that breaks it when I build via brew. |
I have figured out what is happening now:
So it's not an issue with CMake. I propose deleting homebrew-core/Formula/e/eigen.rb Line 27 in 9a7cff2
to fix this issue, because it has been deprecated by Eigen. The file has been deleted on their master branch. @carlocab Is it okay if I open another PR for that one? Feel free to close or merge this PR. |
EDIT: Didn't see @akretz comment before posting. Same analysis. Partly an issue in Eigen as current Eigen installs both FindEigen3.cmake (module) and Eigen3Config.cmake (config). Modules should be removed in future - https://gitlab.com/libeigen/eigen/-/commit/f2984cd0778dd0a1d7e74216d826eaff2bc6bfab CMake defaults to searching module before config. With realpath handling, this means it would only pick modules installed by CMake. After no longer resolving realpath, this means it picks up modules installed by other formulae and linked into The problem is FindEigen3.cmake adds a default version number (2.91.0) which causes havoc in the package lookup. Can see this by trying workarounds like: find_package(Eigen3 3.4.0) find_package(Eigen3 CONFIG) |
That's because it isn't sufficient to symlink only
This seems fine to me. |
This backports https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9987 to 3.31.1
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?