Skip to content

Commit

Permalink
apacheGH-44982: [C++] Add support for building system OpenTelemetry (a…
Browse files Browse the repository at this point in the history
…pache#44983)

### Rationale for this change

We don't need to disallow `-Dopentelemetry-cpp_SOURCE=SYSTEM`.

### What changes are included in this PR?

Remove forcing `opentelemetry-cpp_SOURCE=AUTO`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: apache#44982

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Dec 10, 2024
1 parent 5a042fc commit 72dc869
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ci/docker/debian-12-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ RUN /arrow/ci/scripts/install_azurite.sh
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin

# Prioritize system packages and local installation.
#
# The following dependencies will be downloaded due to missing/invalid packages
# provided by the distribution:
# - opentelemetry-cpp-dev is not packaged
ENV ARROW_ACERO=ON \
ARROW_AZURE=ON \
ARROW_BUILD_TESTS=ON \
Expand All @@ -134,6 +139,7 @@ ENV ARROW_ACERO=ON \
AWSSDK_SOURCE=BUNDLED \
Azure_SOURCE=BUNDLED \
google_cloud_cpp_storage_SOURCE=BUNDLED \
opentelemetry_cpp_SOURCE=BUNDLED \
ORC_SOURCE=BUNDLED \
PATH=/usr/lib/ccache/:$PATH \
PYTHON=python3 \
Expand Down
1 change: 1 addition & 0 deletions ci/docker/fedora-39-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ENV ARROW_ACERO=ON \
CC=gcc \
CXX=g++ \
google_cloud_cpp_storage_SOURCE=BUNDLED \
opentelemetry_cpp_SOURCE=BUNDLED \
PARQUET_BUILD_EXAMPLES=ON \
PARQUET_BUILD_EXECUTABLES=ON \
PATH=/usr/lib/ccache/:$PATH \
Expand Down
8 changes: 6 additions & 2 deletions ci/docker/ubuntu-20.04-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,19 @@ RUN /arrow/ci/scripts/install_ceph.sh
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin

# Prioritize system packages and local installation
# Prioritize system packages and local installation.
#
# The following dependencies will be downloaded due to missing/invalid packages
# provided by the distribution:
# - Abseil is not packaged
# - libc-ares-dev does not install CMake config files
# - flatbuffer is not packaged
# - libgtest-dev only provide sources
# - libprotobuf-dev only provide sources
# - opentelemetry-cpp-dev is not packaged
#
# ARROW-17051: this build uses static Protobuf, so we must also use
# static Arrow to run Flight/Flight SQL tests
# static Arrow to run Flight/Flight SQL tests.
ENV absl_SOURCE=BUNDLED \
ARROW_ACERO=ON \
ARROW_AZURE=OFF \
Expand Down Expand Up @@ -179,6 +182,7 @@ ENV absl_SOURCE=BUNDLED \
google_cloud_cpp_storage_SOURCE=BUNDLED \
gRPC_SOURCE=BUNDLED \
GTest_SOURCE=BUNDLED \
opentelemetry_cpp_SOURCE=BUNDLED \
ORC_SOURCE=BUNDLED \
PARQUET_BUILD_EXAMPLES=ON \
PARQUET_BUILD_EXECUTABLES=ON \
Expand Down
5 changes: 4 additions & 1 deletion ci/docker/ubuntu-22.04-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ RUN /arrow/ci/scripts/install_azurite.sh
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin

# Prioritize system packages and local installation
# Prioritize system packages and local installation.
#
# The following dependencies will be downloaded due to missing/invalid packages
# provided by the distribution:
# - Abseil is old
# - libc-ares-dev does not install CMake config files
# - opentelemetry-cpp-dev is not packaged
ENV absl_SOURCE=BUNDLED \
ARROW_ACERO=ON \
ARROW_AZURE=ON \
Expand Down Expand Up @@ -222,6 +224,7 @@ ENV absl_SOURCE=BUNDLED \
AWSSDK_SOURCE=BUNDLED \
Azure_SOURCE=BUNDLED \
google_cloud_cpp_storage_SOURCE=BUNDLED \
opentelemetry_cpp_SOURCE=BUNDLED \
ORC_SOURCE=BUNDLED \
PARQUET_BUILD_EXAMPLES=ON \
PARQUET_BUILD_EXECUTABLES=ON \
Expand Down
7 changes: 6 additions & 1 deletion ci/docker/ubuntu-24.04-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ RUN /arrow/ci/scripts/install_azurite.sh
COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin

# Prioritize system packages and local installation
# Prioritize system packages and local installation.
#
# The following dependencies will be downloaded due to missing/invalid packages
# provided by the distribution:
# - opentelemetry-cpp-dev is not packaged
ENV ARROW_ACERO=ON \
ARROW_AZURE=ON \
ARROW_BUILD_STATIC=ON \
Expand Down Expand Up @@ -205,6 +209,7 @@ ENV ARROW_ACERO=ON \
AWSSDK_SOURCE=BUNDLED \
Azure_SOURCE=BUNDLED \
google_cloud_cpp_storage_SOURCE=BUNDLED \
opentelemetry_cpp_SOURCE=BUNDLED \
ORC_SOURCE=BUNDLED \
PARQUET_BUILD_EXAMPLES=ON \
PARQUET_BUILD_EXECUTABLES=ON \
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/cpp_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ else
-DgRPC_SOURCE=${gRPC_SOURCE:-} \
-DGTest_SOURCE=${GTest_SOURCE:-} \
-Dlz4_SOURCE=${lz4_SOURCE:-} \
-Dopentelemetry-cpp_SOURCE=${opentelemetry_cpp_SOURCE:-} \
-DORC_SOURCE=${ORC_SOURCE:-} \
-DPARQUET_BUILD_EXAMPLES=${PARQUET_BUILD_EXAMPLES:-OFF} \
-DPARQUET_BUILD_EXECUTABLES=${PARQUET_BUILD_EXECUTABLES:-OFF} \
Expand Down
1 change: 0 additions & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4971,7 +4971,6 @@ if(ARROW_WITH_OPENTELEMETRY)
# cURL is required whether we build from source or use an existing installation
# (OTel's cmake files do not call find_curl for you)
find_curl()
set(opentelemetry-cpp_SOURCE "AUTO")
resolve_dependency(opentelemetry-cpp)
set(ARROW_OPENTELEMETRY_LIBS
opentelemetry-cpp::trace
Expand Down

0 comments on commit 72dc869

Please sign in to comment.