Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev/tasks/homebrew-formulae/apache-arrow-glib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
27 changes: 13 additions & 14 deletions dev/tasks/homebrew-formulae/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")}
Expand Down Expand Up @@ -97,24 +99,21 @@ 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"
system "cmake", "--install", "build"
end

test do
ENV.method(DevelopmentTools.default_compiler).call if OS.linux?

(testpath/"test.cpp").write <<~CPP
#include "arrow/api.h"
int main(void) {
Expand Down
Loading