-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
brew test
CompilerSelectionError when using fails_with
& build-only compiler dependency
#11795
Comments
They don't need for runtime but they do for testing because that's how Homebrew works. This is something I'd review a PR for but I don't see as being a high priority given the workaround is so trivial on our side. |
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 test
CompilerSelectionError even if test doesn't need compilerbrew test
CompilerSelectionError when using fails_with
& build-only compiler dependency
Related issue, with no workarounds that I know of: Homebrew/homebrew-core#86826 (comment) See |
The compiler used to a build a formula is typically not needed during the test. This will allow us to get rid of some `:test` dependencies, which were added to prevent `brew` from throwing a `CompilerSelectionError` because the formula declares `fails_with` the default compiler. This also helps us get more accurate results from `brew linkage` in cases of unintended linkage with the compiler used to build. Fixes Homebrew#11795.
brew config
outputbrew doctor
outputbrew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Linux CI run onenvoy
Homebrew/homebrew-core#82077 with diff to disable default GCC for build (fails_with gcc: "5"
) and only enable working GCC in necessary section, i.e. build (depends_on "gcc@9" => :build
).EDIT: Issue is more for LLVM rather than GCC since GCC-dependency often carries newer runtime library dependency. Specific examples:
dotnet
dotnet 5.0.205 homebrew-core#81945 when trying to only enablellvm
for build.swift
fibjs
It would also be more accurate to test without extra brewed
gcc
/llvm
dependency to make sure it truly isn't used by runtime.What happened (include all command output)?
brew test
fails during set up due to compiler selection error. The error message complains about being unable to "build" the formula, even though it should be testing an already built/installed formula.See https://github.com/Homebrew/homebrew-core/runs/3190458966
What did you expect to happen?
brew test
should not fail onCompilerSelectionError
. It should run in the test block as is, without requiring extra/unneeded compiler dependencies.Some clarification/changes to
fails_with
is necessary so that there is a way to just disable GCC-5(Linux) or Apple Clang in build, but allow usage during test.Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: