-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Use unversioned GCC for runtime libraries when required. #13916
Conversation
Review period will end on 2022-09-23 at 08:42:28 UTC. |
Review period ended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I agree with this. Doesn't this make it fairly likely you'll need gcc@11 and gcc installed?
I'm a little confused by that, since this is my understanding of the conclusion of our discussion at Homebrew/homebrew-core#110010. In any case: This PR does not change the likelihood of needing both What this PR does change is the likelihood of needing three different versions of GCC installed. In particular, this PR makes sure that That said: needing multiple GCCs is not likely at all, at least for users who only use bottles. This is something you can always do in the default prefix (whenever a bottle is available). With this PR, you'll only ever need a second GCC if you build from source. On the other hand, without this PR, some bottle users will need two GCCs ( |
Sorry about that.
Yeh, I'd rather we nailed down what we want to do here unless GCC 13 is landing imminently. I'm ok with this change if we also consider bumping the compiler to gcc@12 and then ideally do something like allowing either gcc@12 or higher to be installed for folks that only need it at runtime and just gcc@12 for folks that need it from building from source. I think we share the goal of minimising GCC versions: I think one for both runtime and building from source cases seems ideal. |
Ok, here's an idea: We make the compiler dependency a "soft" dependency, in the sense that This way, we make it a bit easier to make sure that users ever only need one GCC installed, but in the event that they need a second one, we nudge them towards the version we use in CI to maximise the probability of a successful source build. [*] |
I'm suggesting we use GCC@12 in CI for build, too, given the weird Ubuntu libstdc++/compiler mismatch and the fact that we can just |
I don't want to use |
@carlocab In our workers: sure. When we install GCC for users: we should install the same one we use in CI for consistency. If we're going to install GCC for build and runtime on the same machine: these should ideally be the same GCC. If we're going to install GCC for runtime libraries only: I don't really care what version it is. If we're going to install GCC for build only: it should be the same we use in CI. Does that makes sense? Do you agree? |
Yes, I agree with this. However, I think I'd like to punt on making the GCC we build with GCC 12 -- that will require a bit more care and coordination to avoid disruption to Homebrew/core, and I think merging this will unblock Homebrew/actions#308. We need Homebrew/actions#308 to unbreak Homebrew/core -- our publish workflow has broken because |
I do think we should just move to use GCC 12 to build everything. There's really no point in using GCC 11 given that the GCC 12 runtime libraries are needed anyway. I'm ambivalent about using the latest GCC at run time instead of what we use in CI. Either we should use GCC 12 for building and runtime of C/C++ programs, and the newest GCC for building and runtime of Fortran, or we use the newest version for all runtimes, and install GCC 12 when building C/C++ programs from source. Both of those solutions mean the user only ever has to have 2 versions of GCC installed, thought the latter choice does mean fewer users will need 2 versions installed. |
Having said the above comments, I think we should probably merge this now so that we can fix the existing breakages. |
I rebased to make sure tests run against the tip of
https://github.com/Homebrew/brew/actions/runs/3133106631/jobs/5086140404 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's merge to unblock things.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?See discussion at Homebrew/homebrew-core#110010.