You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/01/24 08:29:13 UTC
[GitHub] [arrow] kou opened a new issue, #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] abetomo commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "abetomo (via GitHub)" <gi...@apache.org>.
abetomo commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1423372616
take
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] abetomo commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "abetomo (via GitHub)" <gi...@apache.org>.
abetomo commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1437810666
The full error log is this.
```
$ cmake --build .
[4/23] Linking CXX executable debug/engine-substrait-consumption
FAILED: debug/engine-substrait-consumption
: && /usr/bin/c++ -Wno-noexcept-type -fdiagnostics-color=always -Wall -Wno-conversion -Wno-sign-conversion -Wunused-result -fno-semantic-interposition -msse4.2 -g -Werror -O0 -ggdb examples/arrow/CMakeFiles/engine-substrait-consumption.dir/engine_substrait_consumption.cc.o -o debug/engine-substrait-consumption debug/libarrow.a -larrow_substrait_shared brotli_ep/src/brotli_ep-install/lib/libbrotlienc-static.a brotli_ep/src/brotli_ep-install/lib/libbrotlidec-static.a brotli_ep/src/brotli_ep-install/lib/libbrotlicommon-static.a bzip2_ep-install/lib/libbz2.a orc_ep-install/lib/liborc.a lz4_ep-install/lib/liblz4.a snappy_ep/src/snappy_ep-install/lib/libsnappy.a zstd_ep-install/lib/libzstd.a protobuf_ep-install/lib/libprotobuf.a google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_storage.a /usr/lib/x86_64-linux-gnu/libz.so google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_rest_internal.a google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_common.a absl_ep-install/l
ib/libabsl_bad_optional_access.a absl_ep-install/lib/libabsl_str_format_internal.a absl_ep-install/lib/libabsl_time.a absl_ep-install/lib/libabsl_strings.a absl_ep-install/lib/libabsl_strings_internal.a absl_ep-install/lib/libabsl_throw_delegate.a absl_ep-install/lib/libabsl_base.a absl_ep-install/lib/libabsl_spinlock_wait.a absl_ep-install/lib/libabsl_int128.a absl_ep-install/lib/libabsl_civil_time.a absl_ep-install/lib/libabsl_time_zone.a absl_ep-install/lib/libabsl_bad_variant_access.a absl_ep-install/lib/libabsl_raw_logging_internal.a absl_ep-install/lib/libabsl_log_severity.a crc32c_ep-install/lib/libcrc32c.a awssdk_ep-install/lib/libaws-cpp-sdk-identity-management.a awssdk_ep-install/lib/libaws-cpp-sdk-sts.a awssdk_ep-install/lib/libaws-cpp-sdk-cognito-identity.a awssdk_ep-install/lib/libaws-cpp-sdk-s3.a awssdk_ep-install/lib/libaws-cpp-sdk-core.a /usr/lib/x86_64-linux-gnu/libcurl.so awssdk_ep-install/lib/libaws-crt-cpp.a awssdk_ep-install/lib/libaws-c-s3
.a awssdk_ep-install/lib/libaws-c-auth.a awssdk_ep-install/lib/libaws-c-mqtt.a awssdk_ep-install/lib/libaws-c-http.a awssdk_ep-install/lib/libaws-c-compression.a awssdk_ep-install/lib/libaws-c-sdkutils.a awssdk_ep-install/lib/libaws-c-event-stream.a awssdk_ep-install/lib/libaws-c-io.a awssdk_ep-install/lib/libaws-c-cal.a /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so awssdk_ep-install/lib/libaws-checksums.a awssdk_ep-install/lib/libaws-c-common.a awssdk_ep-install/lib/libs2n.a utf8proc_ep-install/lib/libutf8proc.a re2_ep-install/lib/libre2.a -ldl jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a mimalloc_ep/src/mimalloc_ep/lib/mimalloc-2.0/libmimalloc-debug.a -lrt && :
/usr/bin/ld: cannot find -larrow_substrait_shared: No such file or directory
collect2: error: ld returned 1 exit status
[6/23] Bundling /home/xxx/arrow/cpp/build/debug/libarrow_bundled_dependencies.a
ninja: build stopped: subcommand failed.
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] kou closed issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
URL: https://github.com/apache/arrow/issues/33849
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] kou commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1437749229
Could you show more full error log?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] abetomo commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "abetomo (via GitHub)" <gi...@apache.org>.
abetomo commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1445113596
Build with only patches related to `ARROW_SUBSTRAIT` applied.
The following error.
```
$ cmake --build .
[4/5] Linking CXX executable debug/gandiva-example
FAILED: debug/gandiva-example
: && /usr/bin/c++ -Wno-noexcept-type -fdiagnostics-color=always -Wall -Wno-conversion -Wno-sign-conversion -Wunused-result -fno-semantic-interposition -msse4.2 -g -Werror -O0 -ggdb examples/arrow/CMakeFiles/gandiva-example.dir/gandiva_example.cc.o -o debug/gandiva-example debug/libarrow.a -lgandiva_shared brotli_ep/src/brotli_ep-install/lib/libbrotlienc-static.a brotli_ep/src/brotli_ep-install/lib/libbrotlidec-static.a brotli_ep/src/brotli_ep-install/lib/libbrotlicommon-static.a /usr/lib/x86_64-linux-gnu/libbz2.so orc_ep-install/lib/liborc.a lz4_ep-install/lib/liblz4.a snappy_ep/src/snappy_ep-install/lib/libsnappy.a zstd_ep-install/lib/libzstd.a protobuf_ep-install/lib/libprotobuf.a google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_storage.a /usr/lib/x86_64-linux-gnu/libz.so google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_rest_internal.a google_cloud_cpp_ep-install/lib/libgoogle_cloud_cpp_common.a absl_ep-install/lib/libabsl_bad_optional_access.a absl_ep
-install/lib/libabsl_str_format_internal.a absl_ep-install/lib/libabsl_time.a absl_ep-install/lib/libabsl_strings.a absl_ep-install/lib/libabsl_strings_internal.a absl_ep-install/lib/libabsl_throw_delegate.a absl_ep-install/lib/libabsl_base.a absl_ep-install/lib/libabsl_spinlock_wait.a absl_ep-install/lib/libabsl_int128.a absl_ep-install/lib/libabsl_civil_time.a absl_ep-install/lib/libabsl_time_zone.a absl_ep-install/lib/libabsl_bad_variant_access.a absl_ep-install/lib/libabsl_raw_logging_internal.a absl_ep-install/lib/libabsl_log_severity.a crc32c_ep-install/lib/libcrc32c.a awssdk_ep-install/lib/libaws-cpp-sdk-identity-management.a awssdk_ep-install/lib/libaws-cpp-sdk-sts.a awssdk_ep-install/lib/libaws-cpp-sdk-cognito-identity.a awssdk_ep-install/lib/libaws-cpp-sdk-s3.a awssdk_ep-install/lib/libaws-cpp-sdk-core.a /usr/lib/x86_64-linux-gnu/libcurl.so awssdk_ep-install/lib/libaws-crt-cpp.a awssdk_ep-install/lib/libaws-c-s3.a awssdk_ep-install/lib/libaws-c-auth.a
awssdk_ep-install/lib/libaws-c-mqtt.a awssdk_ep-install/lib/libaws-c-http.a awssdk_ep-install/lib/libaws-c-compression.a awssdk_ep-install/lib/libaws-c-sdkutils.a awssdk_ep-install/lib/libaws-c-event-stream.a awssdk_ep-install/lib/libaws-c-io.a awssdk_ep-install/lib/libaws-c-cal.a /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so awssdk_ep-install/lib/libaws-checksums.a awssdk_ep-install/lib/libaws-c-common.a awssdk_ep-install/lib/libs2n.a utf8proc_ep-install/lib/libutf8proc.a re2_ep-install/lib/libre2.a -ldl jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a mimalloc_ep/src/mimalloc_ep/lib/mimalloc-2.0/libmimalloc-debug.a -lrt && :
/usr/bin/ld: cannot find -lgandiva_shared: No such file or directory
collect2: error: ld returned 1 exit status
[5/5] Bundling /home/vagrant/work/arrow/cpp/build/debug/libarrow_bundled_dependencies.a
ninja: build stopped: subcommand failed.
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] abetomo commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "abetomo (via GitHub)" <gi...@apache.org>.
abetomo commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1437663276
## Executed command:
```
$ cmake .. --preset ninja-debug-maximal -DARROW_BUILD_SHARED=OFF -DARROW_BUILD_STATIC=ON
$ cmake --build .
```
## Errors
```
/usr/bin/ld: cannot find -larrow_substrait_shared: No such file or directory
collect2: error: ld returned 1 exit status
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] kou commented on issue #33849: [C++] ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON causes build error
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #33849:
URL: https://github.com/apache/arrow/issues/33849#issuecomment-1437823812
Thanks. This is reproduced.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org