brew
                                
                                 brew copied to clipboard
                                
                                    brew copied to clipboard
                            
                            
                            
                        Improve handling of `gcc` and `glibc` dependencies on Linux
Provide a detailed description of the proposed feature
On Linux, depending on the version of GCC/Glibc on the user's system, we may require the installation of Homebrew glibc or a Homebrew GCC (typically gcc@5).
These requirements are not currently handled as formula dependencies, but they should be. This has resulted in a variety of workarounds in a number of places, such as
https://github.com/Homebrew/brew/blob/4a623e0a2532a00a42474c755b8c03e927594676/Library/Homebrew/extend/os/linux/linkage_checker.rb#L75-L78
or
    depends_on "glibc" if Formula["glibc"].any_version_installed?
at https://github.com/Homebrew/homebrew-core/blob/1b2432ecd11bf7161fd6f5c62a7971ec34cd8ec1/Formula/llvm.rb#L48.
See also https://github.com/Homebrew/brew/pull/13577.
What is the motivation for the feature?
This will allow these dependencies to be installed automatically when needed, which is better for users, and allow us to remove the hacks in brew linkage referenced above.
How will the feature be relevant to at least 90% of Homebrew users?
It won't be.
What alternatives to the feature have been considered?
Keep existing hacks and rely on users manually installing dependencies that they need.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Is this fixed by https://github.com/Homebrew/homebrew-core/pull/106837 & https://github.com/Homebrew/glibc-bootstrap/? Or at least now more fixable?
Yes, mostly. But the removal of this hack
https://github.com/Homebrew/brew/blob/4a623e0a2532a00a42474c755b8c03e927594676/Library/Homebrew/extend/os/linux/linkage_checker.rb#L75-L78
is now causing warnings about an undeclared dependency on GCC all over homebrew-core.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Any doc on this?