There are at least five instances where a formula has libraries compiled
with `-flat_namespace` due to a bug in detecting the macOS version (cf.
Homebrew/homebrew-core#87103, Homebrew/homebrew-core#85974,
Homebrew/homebrew-core#85973).
I think it makes sense to check for this more generally. It is
sometimes intentional, so I've added a check for an allowlist for
those instances. Running this on the current `util-linux` bottle
produces
❯ brew audit --strict util-linux
util-linux:
* Libraries were compiled with a flat namespace.
This can cause linker errors due to name collisions, and
is often due to a bug in detecting the macOS version.
/usr/local/Cellar/util-linux/2.37.2/lib/libblkid.1.dylib
/usr/local/Cellar/util-linux/2.37.2/lib/libfdisk.1.dylib
/usr/local/Cellar/util-linux/2.37.2/lib/libsmartcols.1.dylib
/usr/local/Cellar/util-linux/2.37.2/lib/libuuid.1.dylib
Error: 1 problem in 1 formula detected
Some things that still need to be done here:
- fix this check for universal binaries
- check if we want to restrict this audit check to newer versions of macOS
- fix false positives (try `brew audit --strict llvm` and compare the
output of `otool -hV` on the identified files)
While we're here, let's fix the formatting of the output of these other
audits (cf. #12217).
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
- Accelerate provides more than just BLAS and LAPACK functionality, see
https://developer.apple.com/documentation/accelerate
- Veclibfort exists only to wrap Accelerate's BLAS/LAPACK
- LAPACK is a slow, seldom updated reference implementation
- Encourage usage of OpenBLAS
- Reverts PR #6130
- veclibfort exists soley to wrap Apple's accelerate and provide BLAS/LAPACK
access to Accelerate
- Improve the help message for that audit to mention veclibfort
1. Running `brew linkage some_package` does not set the cache.
2. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `true` should build the cache.
3. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `false` should use the cache.
Ensure that a non-zero exit code is set both for missing random dylibs
and random missing dependencies.
Additionally, while we are here, drastically trim down the public
interface for this class to the bare minimum and allow getting the
output from `display_test_output` as a variable.
Fixes issue mentioned by @ilovezfs in:
https://github.com/Homebrew/brew/pull/3940#issuecomment-383794520