Replies: 3 comments 3 replies
-
I tried to dig into this. The Homebrew diff --git a/Formula/glibc.rb b/Formula/glibc.rb
index 14d3cc4af4d..a8998337f3c 100644
--- a/Formula/glibc.rb
+++ b/Formula/glibc.rb
@@ -123,6 +123,10 @@ class Glibc < Formula
ENV["MAKE"] = bootstrap_dir/"bin/make"
# Add -march=core2 and -O2 when building in CI since we are not using the compiler shim.
ENV.append "CFLAGS", "-march=core2 -O2" if ENV["HOMEBREW_GITHUB_ACTIONS"]
+ elsif OS.linux?
+ # shims remove optimization flags which are required by glibc
+ ENV["CC"] = "/usr/bin/cc"
+ ENV["CXX"] = "/usr/bin/c++"
end
# Setting RPATH breaks glibc.
@@ -195,8 +199,10 @@ class Glibc < Formula
rm_f etc/"ld.so.cache"
ensure
- # Delete bootstrap binaries after build is finished.
- rm_rf bootstrap_dir
+ if Hardware::CPU.intel?
+ # Delete bootstrap binaries after build is finished.
+ rm_rf bootstrap_dir
+ end
end
def post_install I will try to create a PR when I have time. But, if you want to create one before it, feel free to. |
Beta Was this translation helpful? Give feedback.
-
I ran into another problem while trying to install diff --git a/Formula/libffi.rb b/Formula/libffi.rb
index 24d346ebd0d..e1249484013 100644
--- a/Formula/libffi.rb
+++ b/Formula/libffi.rb
@@ -26,8 +26,11 @@ class Libffi < Formula
keg_only :provided_by_macos
def install
+ args = std_configure_args
+ args << "--disable-multi-os-directory" if Hardware::CPU.arm? and OS.linux?
+
system "./autogen.sh" if build.head?
- system "./configure", *std_configure_args
+ system "./configure", *args
system "make", "install"
end
As before, if anyone else gets around to creating a PR before me, please go ahead. |
Beta Was this translation helpful? Give feedback.
-
Another problem that I ran into while installing The following patch helped: diff --git a/Formula/gmp.rb b/Formula/gmp.rb
index e210d4840e5..d44ec975b5e 100644
--- a/Formula/gmp.rb
+++ b/Formula/gmp.rb
@@ -50,6 +50,7 @@ class Gmp < Formula
def install
system "./.bootstrap" if build.head?
+ ENV["LD_LIBRARY_PATH"] = "/usr/lib64"
args = std_configure_args
args << "--enable-cxx" |
Beta Was this translation helpful? Give feedback.
-
I know aarch64 is not supported in brew. Since basically everything depends on Glibc as [email protected] depends on it, and gcc depends on [email protected], brew is almost unusable on aarch64 linux servers. Can we make it work somehow?
Seems like if we can turn off the optimization flags in glibc make, it might work. Also if we can make apt's glibc be used by brew, that might work too. How?
Beta Was this translation helpful? Give feedback.
All reactions