mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #8086 from rmNULL/dynamic-seg-missing
Bug Fix: "Error: DYNAMIC segment not found, might be a statically-linked ELF?" at linking stage
This commit is contained in:
commit
bcf9fce70f
@ -175,6 +175,8 @@ module ELFShim
|
|||||||
private
|
private
|
||||||
|
|
||||||
def needed_libraries(path)
|
def needed_libraries(path)
|
||||||
|
return [nil, []] unless path.dynamic_elf?
|
||||||
|
|
||||||
if HOMEBREW_PATCHELF_RB
|
if HOMEBREW_PATCHELF_RB
|
||||||
needed_libraries_using_patchelf_rb path
|
needed_libraries_using_patchelf_rb path
|
||||||
elsif DevelopmentTools.locate "readelf"
|
elsif DevelopmentTools.locate "readelf"
|
||||||
@ -194,8 +196,6 @@ module ELFShim
|
|||||||
end
|
end
|
||||||
|
|
||||||
def needed_libraries_using_patchelf(path)
|
def needed_libraries_using_patchelf(path)
|
||||||
return [nil, []] unless path.dynamic_elf?
|
|
||||||
|
|
||||||
patchelf = DevelopmentTools.locate "patchelf"
|
patchelf = DevelopmentTools.locate "patchelf"
|
||||||
if path.dylib?
|
if path.dylib?
|
||||||
command = [patchelf, "--print-soname", path.expand_path.to_s]
|
command = [patchelf, "--print-soname", path.expand_path.to_s]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user