Skip to content

Commit a538fe4

Browse files
GH-45416: [CI][C++][Homebrew] Backport the latest formula changes (#45460)
### Rationale for this change To check the operation of Homebrew after the new version is released, we need to sync the latest formula. ### What changes are included in this PR? Backport the latest formula changes ### Are these changes tested? Yes. ### Are there any user-facing changes? No. Comparison result. ```diff diff -ur /tmp/arrow/apache-arrow-glib.rb dev/tasks/homebrew-formulae/apache-arrow-glib.rb --- /tmp/arrow/apache-arrow-glib.rb 2025-02-03 09:30:42 +++ dev/tasks/homebrew-formulae/apache-arrow-glib.rb 2025-02-07 18:20:47 @@ -1,23 +1,41 @@ +# BSD 2-Clause License +# +# Copyright (c) 2009-present, Homebrew contributors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://github.com/Homebrew/homebrew-core/blob/-/Formula/a/apache-arrow-glib.rb + class ApacheArrowGlib < Formula desc "GLib bindings for Apache Arrow" homepage "https://arrow.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-19.0.0/apache-arrow-19.0.0.tar.gz" - mirror "https://archive.apache.org/dist/arrow/arrow-19.0.0/apache-arrow-19.0.0.tar.gz" - sha256 "f89b93f39954740f7184735ff1e1d3b5be2640396febc872c4955274a011f56b" + url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-20.0.0-SNAPSHOT/apache-arrow-20.0.0-SNAPSHOT.tar.gz" + sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28" license "Apache-2.0" head "https://github.com/apache/arrow.git", branch: "main" livecheck do formula "apache-arrow" - end - - bottle do - sha256 cellar: :any, arm64_sequoia: "e420ce8d7c772054c9040a326f54be83306741c3b13f1f95c1aa660bcc3419bc" - sha256 cellar: :any, arm64_sonoma: "f7f697c4bb8922d0fd7ebea9fdedcb03798bb3ce641525bd5b5def7e30d9dbe4" - sha256 cellar: :any, arm64_ventura: "90c37373807d0607465aeb66dfa6a8f4e1073a1c609ac3d3968234f2f63b12ef" - sha256 cellar: :any, sonoma: "2f66ab77233cfaebd4a6cb35ee75a33b6533973ee25608c88a6a4e0f074762c7" - sha256 cellar: :any, ventura: "8339abe968a0697213167673c40071a958f1eb636f02da0ce33e4f61d3a8de2a" - sha256 x86_64_linux: "6776b45d6bafd3bdc32f1d6d0be57e7ed60b8bf0171e87c5931ad76a176a2191" end depends_on "gobject-introspection" => :build diff -ur /tmp/arrow/apache-arrow.rb dev/tasks/homebrew-formulae/apache-arrow.rb --- /tmp/arrow/apache-arrow.rb 2025-02-02 11:32:18 +++ dev/tasks/homebrew-formulae/apache-arrow.rb 2025-02-07 18:10:13 @@ -1,21 +1,38 @@ +# BSD 2-Clause License +# +# Copyright (c) 2009-present, Homebrew contributors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://github.com/Homebrew/homebrew-core/blob/-/Formula/a/apache-arrow.rb + class ApacheArrow < Formula desc "Columnar in-memory analytics layer designed to accelerate big data" homepage "https://arrow.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-19.0.0/apache-arrow-19.0.0.tar.gz" - mirror "https://archive.apache.org/dist/arrow/arrow-19.0.0/apache-arrow-19.0.0.tar.gz" - sha256 "f89b93f39954740f7184735ff1e1d3b5be2640396febc872c4955274a011f56b" + url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-20.0.0-SNAPSHOT/apache-arrow-20.0.0-SNAPSHOT.tar.gz" + sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28" license "Apache-2.0" - revision 1 head "https://github.com/apache/arrow.git", branch: "main" - - bottle do - sha256 cellar: :any, arm64_sequoia: "a6c9c00a48857deb74c1d00bbf7858466307853629866e9500fe57dc5889eb58" - sha256 cellar: :any, arm64_sonoma: "d1b3aa26f91c7c452a60dca1b590c54b0026a5ee05a9c148782946c66d878c6e" - sha256 cellar: :any, arm64_ventura: "5d71a8bd28fd50e5bf190c3764e5cf1367d2c6ee45fc0b3850da6f178cb0d5eb" - sha256 cellar: :any, sonoma: "45a9742c35214fd74301c6261a5f137e43b5e4be2c0b1281567e5699d35f46a9" - sha256 cellar: :any, ventura: "bac30f19cf4bb0ed2c444a782152b8458ebcdfd3602e0f7f70457e4b0faf9396" - sha256 cellar: :any_skip_relocation, x86_64_linux: "4699146750ca07631a98168da1b237315363dbaa0dd4fae8f4ad29044e724545" - end depends_on "boost" => :build depends_on "cmake" => :build ``` * GitHub Issue: #45416 Authored-by: Hiroyuki Sato <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent f7f4995 commit a538fe4

File tree

2 files changed

+42
-49
lines changed

2 files changed

+42
-49
lines changed

dev/tasks/homebrew-formulae/apache-arrow-glib.rb

+6-24
Original file line numberDiff line numberDiff line change
@@ -41,45 +41,27 @@ class ApacheArrowGlib < Formula
4141
depends_on "gobject-introspection" => :build
4242
depends_on "meson" => :build
4343
depends_on "ninja" => :build
44-
depends_on "pkg-config" => :build
45-
depends_on "vala" => :build
44+
depends_on "pkgconf" => [:build, :test]
4645
depends_on "apache-arrow"
4746
depends_on "glib"
4847

49-
fails_with gcc: "5"
50-
5148
def install
52-
system "meson", "setup", "build", "c_glib", *std_meson_args, "-Dvapi=true"
49+
system "meson", "setup", "build", "c_glib", *std_meson_args
5350
system "meson", "compile", "-C", "build", "--verbose"
5451
system "meson", "install", "-C", "build"
5552
end
5653

5754
test do
58-
(testpath/"test.c").write <<~SOURCE
55+
(testpath/"test.c").write <<~C
5956
#include <arrow-glib/arrow-glib.h>
6057
int main(void) {
6158
GArrowNullArray *array = garrow_null_array_new(10);
6259
g_object_unref(array);
6360
return 0;
6461
}
65-
SOURCE
66-
apache_arrow = Formula["apache-arrow"]
67-
glib = Formula["glib"]
68-
flags = %W[
69-
-I#{include}
70-
-I#{apache_arrow.opt_include}
71-
-I#{glib.opt_include}/glib-2.0
72-
-I#{glib.opt_lib}/glib-2.0/include
73-
-L#{lib}
74-
-L#{apache_arrow.opt_lib}
75-
-L#{glib.opt_lib}
76-
-DNDEBUG
77-
-larrow-glib
78-
-larrow
79-
-lgio-2.0
80-
-lgobject-2.0
81-
-lglib-2.0
82-
]
62+
C
63+
64+
flags = shell_output("pkgconf --cflags --libs arrow-glib gobject-2.0").chomp.split
8365
system ENV.cc, "test.c", "-o", "test", *flags
8466
system "./test"
8567
end

dev/tasks/homebrew-formulae/apache-arrow.rb

+36-25
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,42 @@ class ApacheArrow < Formula
3636

3737
depends_on "boost" => :build
3838
depends_on "cmake" => :build
39-
depends_on "llvm@15" => :build
39+
depends_on "gflags" => :build
40+
depends_on "rapidjson" => :build
41+
depends_on "xsimd" => :build
42+
depends_on "abseil"
43+
depends_on "aws-crt-cpp"
4044
depends_on "aws-sdk-cpp"
4145
depends_on "brotli"
42-
depends_on "bzip2"
43-
depends_on "glog"
4446
depends_on "grpc"
47+
depends_on "llvm"
4548
depends_on "lz4"
46-
depends_on "mimalloc"
4749
depends_on "openssl@3"
4850
depends_on "protobuf"
49-
depends_on "rapidjson"
5051
depends_on "re2"
5152
depends_on "snappy"
5253
depends_on "thrift"
5354
depends_on "utf8proc"
5455
depends_on "zstd"
56+
5557
uses_from_macos "python" => :build
58+
uses_from_macos "bzip2"
59+
uses_from_macos "zlib"
5660

57-
fails_with gcc: "5"
61+
# Issue ref: https://github.com/protocolbuffers/protobuf/issues/19447
62+
fails_with :gcc do
63+
version "12"
64+
cause "Protobuf 29+ generated code with visibility and deprecated attributes needs GCC 13+"
65+
end
5866

5967
def install
60-
# This isn't for https://github.com/Homebrew/homebrew-core/issues/76537 .
61-
# This may improve performance.
62-
ENV.runtime_cpu_detection if Hardware::CPU.intel?
68+
ENV.llvm_clang if OS.linux?
6369

64-
# link against system libc++ instead of llvm provided libc++
65-
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
70+
# We set `ARROW_ORC=OFF` because it fails to build with Protobuf 27.0
6671
args = %W[
6772
-DCMAKE_INSTALL_RPATH=#{rpath}
73+
-DLLVM_ROOT=#{Formula["llvm"].opt_prefix}
74+
-DARROW_DEPENDENCY_SOURCE=SYSTEM
6875
-DARROW_ACERO=ON
6976
-DARROW_COMPUTE=ON
7077
-DARROW_CSV=ON
@@ -73,43 +80,47 @@ def install
7380
-DARROW_FLIGHT=ON
7481
-DARROW_FLIGHT_SQL=ON
7582
-DARROW_GANDIVA=ON
76-
-DARROW_GCS=ON
7783
-DARROW_HDFS=ON
78-
-DARROW_INSTALL_NAME_RPATH=OFF
7984
-DARROW_JSON=ON
80-
-DARROW_MIMALLOC=ON
81-
-DARROW_ORC=ON
85+
-DARROW_ORC=OFF
8286
-DARROW_PARQUET=ON
8387
-DARROW_PROTOBUF_USE_SHARED=ON
8488
-DARROW_S3=ON
85-
-DARROW_WITH_BROTLI=ON
8689
-DARROW_WITH_BZ2=ON
90+
-DARROW_WITH_ZLIB=ON
91+
-DARROW_WITH_ZSTD=ON
8792
-DARROW_WITH_LZ4=ON
8893
-DARROW_WITH_SNAPPY=ON
94+
-DARROW_WITH_BROTLI=ON
8995
-DARROW_WITH_UTF8PROC=ON
90-
-DARROW_WITH_ZLIB=ON
91-
-DARROW_WITH_ZSTD=ON
96+
-DARROW_INSTALL_NAME_RPATH=OFF
9297
-DPARQUET_BUILD_EXECUTABLES=ON
9398
]
94-
# Disable runtime SIMD dispatch. It may cause "illegal opcode"
95-
# error on Intel Mac because of one-definition-rule violation.
96-
#
97-
# https://github.com/apache/arrow/issues/36685
98-
args << "-DARROW_RUNTIME_SIMD_LEVEL=NONE" if OS.mac? and Hardware::CPU.intel?
99+
args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm?
100+
# Reduce overlinking. Can remove on Linux if GCC 11 issue is fixed
101+
args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{OS.mac? ? "-dead_strip_dylibs" : "--as-needed"}"
102+
# ARROW_SIMD_LEVEL sets the minimum required SIMD. Since this defaults to
103+
# SSE4.2 on x86_64, we need to reduce level to match oldest supported CPU.
104+
# Ref: https://arrow.apache.org/docs/cpp/env_vars.html#envvar-ARROW_USER_SIMD_LEVEL
105+
if build.bottle? && Hardware::CPU.intel? && (!OS.mac? || !MacOS.version.requires_sse42?)
106+
args << "-DARROW_SIMD_LEVEL=NONE"
107+
end
99108

100109
system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args
101110
system "cmake", "--build", "build"
102111
system "cmake", "--install", "build"
103112
end
104113

105114
test do
106-
(testpath/"test.cpp").write <<~EOS
115+
ENV.method(DevelopmentTools.default_compiler).call if OS.linux?
116+
117+
(testpath/"test.cpp").write <<~CPP
107118
#include "arrow/api.h"
108119
int main(void) {
109120
arrow::int64();
110121
return 0;
111122
}
112-
EOS
123+
CPP
113124
system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test"
114125
system "./test"
115126
end

0 commit comments

Comments
 (0)