kou opened a new issue, #33849:
URL: https://github.com/apache/arrow/issues/33849
### Describe the bug, including details regarding any error messages,
version, and platform.
`cpp/examples/arrow/CMakeLists.txt` uses `arrow_substrait_shared` and
`gandiva_shared` unconditionally. We can't use them with
`ARROW_BUILD_SHARED=OFF`.
The following patch may fix this:
```diff
diff --git a/cpp/examples/arrow/CMakeLists.txt
b/cpp/examples/arrow/CMakeLists.txt
index aa33c18e76..184f6953b9 100644
--- a/cpp/examples/arrow/CMakeLists.txt
+++ b/cpp/examples/arrow/CMakeLists.txt
@@ -24,7 +24,12 @@ if(ARROW_COMPUTE)
endif()
if(ARROW_SUBSTRAIT)
- add_arrow_example(engine_substrait_consumption EXTRA_LINK_LIBS
arrow_substrait_shared)
+ if(ARROW_BUILD_SHARED)
+ set(ENGINE_SUBSTRAIT_CONSUMPTION_LINK_LIBS arrow_substrait_shared)
+ else()
+ set(ENGINE_SUBSTRAIT_CONSUMPTION_LINK_LIBS arrow_substrait_static)
+ endif()
+ add_arrow_example(engine_substrait_consumption EXTRA_LINK_LIBS
${ENGINE_SUBSTRAIT_CONSUMPTION_LINK_LIBS})
endif()
if(ARROW_COMPUTE AND ARROW_CSV)
@@ -167,5 +172,10 @@ if(ARROW_PARQUET AND ARROW_DATASET)
endif()
if(ARROW_GANDIVA)
- add_arrow_example(gandiva_example EXTRA_LINK_LIBS gandiva_shared)
+ if(ARROW_BUILD_SHARED)
+ set(GANDIVA_EXAMPLE_LINK_LIBS gandiva_shared)
+ else()
+ set(GANDIVA_EXAMPLE_LINK_LIBS gandiva_static)
+ endif()
+ add_arrow_example(gandiva_example EXTRA_LINK_LIBS
${GANDIVA_EXAMPLE_LINK_LIBS})
endif()
```
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]