mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
linux/diagnostic: fix rpath
returning nil
.
Fixes #13762. There's still a bug in the GCC linkage check, but I'll need a bit more time to work on a fix. This at least makes sure `brew doctor` will not return the error in the issue linked above.
This commit is contained in:
parent
7617109d43
commit
ab696cbbb7
@ -144,6 +144,7 @@ module Homebrew
|
||||
gcc_dependents = Formula.installed.select do |formula|
|
||||
next false unless formula.tap&.core_tap?
|
||||
|
||||
# FIXME: This includes formulae that have no runtime dependency on GCC.
|
||||
formula.recursive_dependencies.map(&:name).include? "gcc"
|
||||
rescue TapFormulaUnavailableError
|
||||
false
|
||||
@ -153,7 +154,7 @@ module Homebrew
|
||||
badly_linked = gcc_dependents.select do |dependent|
|
||||
keg = Keg.new(dependent.prefix)
|
||||
keg.binary_executable_or_library_files.any? do |binary|
|
||||
paths = binary.rpath.split(":")
|
||||
paths = binary.rpaths
|
||||
versioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/\d+$}) }
|
||||
unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }
|
||||
|
||||
|
@ -97,7 +97,7 @@ module ELFShim
|
||||
# An array of runtime search path entries, such as:
|
||||
# ["/lib", "/usr/lib", "/usr/local/lib"]
|
||||
def rpaths
|
||||
rpath.split(":")
|
||||
rpath&.split(":").to_a
|
||||
end
|
||||
|
||||
def interpreter
|
||||
|
Loading…
x
Reference in New Issue
Block a user