Skip to content

Commit

Permalink
GH-43158: [Packaging] Use bundled nlohmann/json on AlmaLinux 8/CentOS…
Browse files Browse the repository at this point in the history
… Stream 8 (#43159)

### Rationale for this change

Because json-devel on them don't provide nlohmann/json_fwd.h that is required by google-cloud-cpp.

The upstream issue:
googleapis/google-cloud-cpp#14438

### What changes are included in this PR?

Use bundled nlohmann/json instead.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #43158

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou committed Jul 6, 2024
1 parent ca7108d commit 8d5b289
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
%define gcc_package gcc
%endif

%define use_bundled_nlohmann_json (%{_rhel} == 8)
%define use_flight (%{_rhel} >= 8 || %{_amzn} >= 2023)
%define use_gandiva (%{_rhel} >= 8 || %{_amzn} >= 2023)
%define use_gcs (%{_rhel} >= 8)
Expand Down Expand Up @@ -117,7 +118,7 @@ BuildRequires: glog-devel
BuildRequires: grpc-devel
BuildRequires: grpc-plugins
%endif
%if %{use_gcs}
%if %{use_gcs} && !%{use_bundled_nlohmann_json}
BuildRequires: json-devel
%endif
BuildRequires: libzstd-devel
Expand Down Expand Up @@ -194,6 +195,9 @@ cd cpp
-DCMAKE_BUILD_TYPE=$cpp_build_type \
-DPARQUET_BUILD_EXECUTABLES=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON \
%if %{use_bundled_nlohmann_json}
-Dnlohmann_json_SOURCE=BUNDLED \
%endif
-G"Unix Makefiles"
%arrow_cmake_build
cd -
Expand Down Expand Up @@ -280,7 +284,7 @@ Requires: %{name}%{so_version}-libs = %{version}-%{release}
Requires: brotli-devel
Requires: bzip2-devel
Requires: curl-devel
%if %{use_gcs}
%if %{use_gcs} && !%{use_bundled_nlohmann_json}
Requires: json-devel
%endif
Requires: libzstd-devel
Expand Down

0 comments on commit 8d5b289

Please sign in to comment.