-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-40855: [C++][ORC] Fix std::filesystem related link error with ORC 2.0.0 or later
#41023
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
Conversation
|
@github-actions crossbow submit almalinux-8-amd64 |
|
Revision: 7e2e6128a51dc7db57be96aab1b5fb2d044130ad Submitted crossbow builds: ursacomputing/crossbow @ actions-0fade13009
|
|
My guess was wrong... |
cpp/cmake_modules/FindorcAlt.cmake
Outdated
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 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### 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 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 695e0f3) Signed-off-by: Dongjoon Hyun <[email protected]>
…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 <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Rationale for this change
If we use
std::filesystem, we need-lstdc++fswith GCC 8 and-lc++fsfor clang 7. We don't want to maintain CMake code for GCC 8/clang 7.What changes are included in this PR?
std::filesystemwith ORC 2.0.0 or later.-lstdc++fs/-lc++fswith bundled ORC 2.0.0.Are these changes tested?
Yes.
Are there any user-facing changes?
No.