Repository navigation
GH-33849: [C++] Fix builds with ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON - #34350
Conversation
|
It seems that we also need to care about Apache Arrow Flight related examples: diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt
index aa33c18e76..76c176086a 100644
--- a/cpp/examples/arrow/CMakeLists.txt
+++ b/cpp/examples/arrow/CMakeLists.txt
@@ -34,7 +40,7 @@ endif()
if(ARROW_FLIGHT)
# Static gRPC means we cannot linked to shared Arrow, since then
# we'll violate ODR for gRPC symbols
- if(ARROW_GRPC_USE_SHARED)
+ if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED)
set(FLIGHT_EXAMPLES_LINK_LIBS arrow_flight_shared)
if(APPLE)
set(GRPC_REFLECTION_LINK_LIBS gRPC::grpc++_reflection)
@@ -100,7 +106,7 @@ if(ARROW_FLIGHT)
"${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
if(ARROW_FLIGHT_SQL)
- if(ARROW_GRPC_USE_SHARED)
+ if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED)
set(FLIGHT_SQL_EXAMPLES_LINK_LIBS arrow_flight_sql_shared)
else()
set(FLIGHT_SQL_EXAMPLES_LINK_LIBS arrow_flight_sql_static)Could you install gRPC and try |
|
Thanks for your comment. |
|
@kou As for Flight, if |
|
Yes. |
…W_BUILD_EXAMPLES=ON Signed-off-by: abetomo <abe@enzou.tokyo>
|
I could reproduce the error. If I just added |
…_SHARED=OFF Signed-off-by: abetomo <abe@enzou.tokyo>
7e66ec5 to
d9fa805
Compare
|
The build was successful with the #34350 (comment) patch. |
|
@github-actions crossbow submit example |
|
Revision: d9fa805 Submitted crossbow builds: ursacomputing/crossbow @ actions-46b0d97237
|
|
Benchmark runs are scheduled for baseline = 5b2fbad and contender = 29ec779. 29ec779 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Rationale for this change
Building with
ARROW_BUILD_SHARED=OFFandARROW_BUILD_EXAMPLES=ONcauses an error.What changes are included in this PR?
At
examples/arrow/CMakeLists.txt, setarrow_substrait_[shared|static]andgandiva_[shared|static]appropriately according toARROW_BUILD_SHARED.Are these changes tested?
In
--preset ninja-debug-maximal,ARROW_BUILD_EXAMPLES=ON.Build was completed.
Build was completed.
Are there any user-facing changes?