From e79eeb756088505a0b21f0feacd1fca9e520c950 Mon Sep 17 00:00:00 2001 From: rmnull Date: Sun, 26 Jul 2020 04:43:30 +0530 Subject: [PATCH] Bug Fix: Don't search for needed libraries on non DYNAMIC ELFs. --- Library/Homebrew/os/linux/elf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/os/linux/elf.rb b/Library/Homebrew/os/linux/elf.rb index 449c5dd7e3..06baa117f1 100644 --- a/Library/Homebrew/os/linux/elf.rb +++ b/Library/Homebrew/os/linux/elf.rb @@ -175,6 +175,8 @@ module ELFShim private def needed_libraries(path) + return [nil, []] unless path.dynamic_elf? + if HOMEBREW_PATCHELF_RB needed_libraries_using_patchelf_rb path elsif DevelopmentTools.locate "readelf" @@ -194,8 +196,6 @@ module ELFShim end def needed_libraries_using_patchelf(path) - return [nil, []] unless path.dynamic_elf? - patchelf = DevelopmentTools.locate "patchelf" if path.dylib? command = [patchelf, "--print-soname", path.expand_path.to_s]