From 99ec757f443128a202b011fda7a7fd2d5ee6925b Mon Sep 17 00:00:00 2001 From: Tadeja Kadunc Date: Mon, 2 Nov 2026 20:39:43 +0100 Subject: [PATCH] Sync with homebrew-core --- .../homebrew-formulae/apache-arrow-glib.rb | 2 ++ dev/tasks/homebrew-formulae/apache-arrow.rb | 27 +++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dev/tasks/homebrew-formulae/apache-arrow-glib.rb b/dev/tasks/homebrew-formulae/apache-arrow-glib.rb index a7b856ae737..8bc1ab8d0a9 100644 --- a/dev/tasks/homebrew-formulae/apache-arrow-glib.rb +++ b/dev/tasks/homebrew-formulae/apache-arrow-glib.rb @@ -45,6 +45,8 @@ class ApacheArrowGlib < Formula depends_on "apache-arrow" depends_on "glib" + deny_network_access! + def install system "meson", "setup", "build", "c_glib", *std_meson_args system "meson", "compile", "-C", "build", "--verbose" diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb index dc7d3f58641..81b2fa52ed1 100644 --- a/dev/tasks/homebrew-formulae/apache-arrow.rb +++ b/dev/tasks/homebrew-formulae/apache-arrow.rb @@ -46,9 +46,10 @@ class ApacheArrow < Formula depends_on "grpc" depends_on "llvm" depends_on "lz4" - depends_on "openssl@3" + depends_on "openssl@4" depends_on "protobuf" depends_on "re2" + depends_on "simdjson" depends_on "snappy" depends_on "thrift" depends_on "uriparser" @@ -57,18 +58,19 @@ class ApacheArrow < Formula uses_from_macos "python" => :build uses_from_macos "bzip2" - uses_from_macos "zlib" - # Issue ref: https://github.com/protocolbuffers/protobuf/issues/19447 + on_linux do + depends_on "zlib-ng-compat" + end + fails_with :gcc do version "12" - cause "Protobuf 29+ generated code with visibility and deprecated attributes needs GCC 13+" + cause "fails handling PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED" end def install - ENV.llvm_clang if OS.linux? + ENV.runtime_cpu_detection - # We set `ARROW_ORC=OFF` because it fails to build with Protobuf 27.0 args = %W[ -DCMAKE_INSTALL_RPATH=#{rpath} -DLLVM_ROOT=#{formula_opt_prefix("llvm")} @@ -97,15 +99,14 @@ def install -DARROW_INSTALL_NAME_RPATH=OFF -DPARQUET_BUILD_EXECUTABLES=ON ] - args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm? - # Reduce overlinking. Can remove on Linux if GCC 11 issue is fixed - args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{OS.mac? ? "-dead_strip_dylibs" : "--as-needed"}" + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac? # Reduce overlinking + # ARROW_SIMD_LEVEL sets the minimum required SIMD. Since this defaults to # SSE4.2 on x86_64, we need to reduce level to match oldest supported CPU. # Ref: https://arrow.apache.org/docs/cpp/env_vars.html#envvar-ARROW_USER_SIMD_LEVEL - if build.bottle? && Hardware::CPU.intel? && (!OS.mac? || !MacOS.version.requires_sse42?) - args << "-DARROW_SIMD_LEVEL=NONE" - end + # + # NOTE: Do not remove this while Core 2 is oldest supported CPU + args << "-DARROW_SIMD_LEVEL=NONE" if Hardware::CPU.intel? system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args system "cmake", "--build", "build" @@ -113,8 +114,6 @@ def install end test do - ENV.method(DevelopmentTools.default_compiler).call if OS.linux? - (testpath/"test.cpp").write <<~CPP #include "arrow/api.h" int main(void) {