-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Addition of cmake flag FETCHCONTENT_FULLY_DISCONNECTED=ON breaks formulas #17187
Comments
I'm open to a PR that restricts this flag only to Homebrew/core. I'd prefer that this be our last resort, though. However, in case you didn't already know, you can override the flag by passing I also agree that the resulting |
@carlocab agreed on all points. I think the change is in principle a good idea, I will change my repo to not use FetchContent when building with I've opened https://gitlab.kitware.com/cmake/cmake/-/issues/25946 |
For reference to others coming across this issue in the future: for my formula the solution was to first try to find the package with a normal And then adding a Can be closed for me, but I'll leave that to @carlocab in case you want to keep it open. |
I've responded with a comment on the PR that added |
This should be addressed (partly) via #17310 - the intention is still to block |
Since Homebrew/brew#17075, CMake `FetchContent` is disabled by default. Which made the Solidity formula to crash due to missing build dependencies: https://github.com/Homebrew/homebrew-core/actions/runs/9175554982/job/25228895627?pr=172324. This commit fix that by explicitly enabling it back. See: Homebrew/brew#17187 (comment) for context.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Trying to build a formula with
--HEAD
that worked until a few weeks ago. The formula is a tap,cwi-dis/cwipc
, but I'm pretty convinced that many other formulae will run into this problem.What happened (include all command output)?
It did not build. One of the cmake dependencies,
nlohmann_json::nlohman_json
, was not found. TheCMakeLists.txt
of thecwipc
repo uses theFetchContent
macro to obtain thenlohmann_json
package (which is a header-file-only package, and FetchContent is the preferred way of including it in your build.Since the merge of #17075 brew will disable downloading of additional content by FetchContent. I fully understand the reasoning behind this merge (and I even somewhat agree:-), but as of this merge I presume many formulae have been broken, and moreover there is no clear error message that the formula maintainer gets that indicates what the problem is.
Unfortunately
FetchContent()
does not give an error or warning message if it has to download a package but is not allowed to do so. So the errors occur only much later in the build process, when the package is used but found to be missing.What did you expect to happen?
Build should work.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: