-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-40855: [C++][ORC] Fix std::filesystem
related link error with ORC 2.0.0 or later
#41023
Conversation
@github-actions crossbow submit almalinux-8-amd64 |
Revision: 7e2e612 Submitted crossbow builds: ursacomputing/crossbow @ actions-0fade13009
|
My guess was wrong... |
@@ -29,6 +29,7 @@ endif() | |||
find_package(orc ${find_package_args}) | |||
if(orc_FOUND) | |||
set(orcAlt_FOUND TRUE) | |||
set(orcAlt_VERSION ${orc_VERSION}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with conan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope so...
Do you know conan's ORC recipe provide valid(?) CMake package for ORC?
(BTW, is there a plan that ORC provides its CMake package?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know conan's ORC recipe provide valid(?) CMake package for ORC?
I suppose it does. It was added by me: https://github.com/conan-io/conan-center-index/blob/master/recipes/orc/all/conanfile.py#L145
is there a plan that ORC provides its CMake package?
I'm not sure if I understand the question correctly, do you mean the ORC community provides an official FindOrc.cmake file or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
(orcConfig.cmake
will be better than FindOrc.cmake
.)
FYI: Apache Arrow provides ArrowConfig.cmake
, ArrowFlightConfig.cmake
, ParquetConfig.cmake
and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let me investigate how does it work and add it to ORC.
Is any other module doing the same thing, or ORC is the only one that requires std::filesystem? |
…r later If we use `std::filesystem`, we need `-lstdc++fs` with GCC 8 and `-lc++fs` for clang 7. We don't want to maintain CMake code for GCC 8/clang 7. So this avoids using `std::filesystem` with ORC 2.0.0 or later.
@github-actions crossbow submit almalinux-8-amd64 |
Revision: 9987fb6 Submitted crossbow builds: ursacomputing/crossbow @ actions-297049266f
|
The latter. |
I can fix that on the ORC side by removing std::filesystem dependency in 2.0.1 if you think appropriate and revert ORC 2.0.0 to 1.9.3. |
It'll be helpful. Could you do it? But we don't need to revert bundled ORC to 1.9.3. Time zone DB path check in ORC 2.0.0 will be useful. And this PR will fix this |
OK, I will remove std::filesystem dependency but keep the TZDB check on the ORC side. |
Thanks! |
@github-actions crossbow submit -g cpp |
Revision: 9987fb6 Submitted crossbow builds: ursacomputing/crossbow @ actions-45d2d9e22b |
std:;filesystem
related link error ith ORC 2.0.0 or later
std:;filesystem
related link error ith ORC 2.0.0 or laterstd::filesystem
related link error with ORC 2.0.0 or later
|
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit df7da77. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 11 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### What changes were proposed in this pull request? Remove std::filesystem and use OS API instead. ### Why are the changes needed? Apache Arrow C++ library is required to support old compilers like clang8. Since Apache ORC C++ library has used std::filesystem to check TZDB availability since 2.0.0, Apache Arrow requires to add more linking options for std::filesystem. See apache/arrow#41023 for detail. ### How was this patch tested? Passing CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #1886 from wgtmac/ORC-1686. Authored-by: Gang Wu <ustcwg@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? Remove std::filesystem and use OS API instead. ### Why are the changes needed? Apache Arrow C++ library is required to support old compilers like clang8. Since Apache ORC C++ library has used std::filesystem to check TZDB availability since 2.0.0, Apache Arrow requires to add more linking options for std::filesystem. See apache/arrow#41023 for detail. ### How was this patch tested? Passing CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #1886 from wgtmac/ORC-1686. Authored-by: Gang Wu <ustcwg@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 695e0f3) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…ith ORC 2.0.0 or later (apache#41023) ### Rationale for this change If we use `std::filesystem`, we need `-lstdc++fs` with GCC 8 and `-lc++fs` for clang 7. We don't want to maintain CMake code for GCC 8/clang 7. ### What changes are included in this PR? * Don't use `std::filesystem` with ORC 2.0.0 or later. * Use missing `-lstdc++fs`/`-lc++fs` with bundled ORC 2.0.0. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#40855 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…ith ORC 2.0.0 or later (apache#41023) ### Rationale for this change If we use `std::filesystem`, we need `-lstdc++fs` with GCC 8 and `-lc++fs` for clang 7. We don't want to maintain CMake code for GCC 8/clang 7. ### What changes are included in this PR? * Don't use `std::filesystem` with ORC 2.0.0 or later. * Use missing `-lstdc++fs`/`-lc++fs` with bundled ORC 2.0.0. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#40855 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Rationale for this change
If we use
std::filesystem
, we need-lstdc++fs
with GCC 8 and-lc++fs
for clang 7. We don't want to maintain CMake code for GCC 8/clang 7.What changes are included in this PR?
std::filesystem
with ORC 2.0.0 or later.-lstdc++fs
/-lc++fs
with bundled ORC 2.0.0.Are these changes tested?
Yes.
Are there any user-facing changes?
No.