From 9091ac0dad119317d43c098365a74836860d4b8e Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 9 Sep 2022 20:55:59 +0100 Subject: [PATCH] Create GCC and glibc symlinks after install is complete Fixes #13836. --- Library/Homebrew/extend/os/linux/install.rb | 6 ++++++ Library/Homebrew/formula_installer.rb | 2 ++ Library/Homebrew/install.rb | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/Library/Homebrew/extend/os/linux/install.rb b/Library/Homebrew/extend/os/linux/install.rb index abf3a7c449..e2ef4088ca 100644 --- a/Library/Homebrew/extend/os/linux/install.rb +++ b/Library/Homebrew/extend/os/linux/install.rb @@ -40,6 +40,12 @@ module Homebrew symlink_gcc_libs end + def global_post_install + generic_global_post_install + symlink_ld_so + symlink_gcc_libs + end + def check_cpu return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? return if Hardware::CPU.arm? diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 3859439458..e0a696fd0e 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -775,6 +775,8 @@ class FormulaInstaller fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation? + Homebrew::Install.global_post_install + if build_bottle? ohai "Not running 'post_install' as we're building a bottle" puts "You can run it manually using:" diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 3d838dac3e..be0467fa23 100644 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -30,6 +30,10 @@ module Homebrew Diagnostic.checks(:build_from_source_checks, fatal: all_fatal) end + def global_post_install; end + alias generic_global_post_install global_post_install + module_function :generic_global_post_install + def check_prefix if (Hardware::CPU.intel? || Hardware::CPU.in_rosetta2?) && HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX