kou opened a new issue, #40855: URL: https://github.com/apache/arrow/issues/40855
### Describe the bug, including details regarding any error messages, version, and platform. almalinux-8-amd64 https://github.com/ursacomputing/crossbow/actions/runs/8448796286/job/23141553341#step:8:3879 ```text [ 91%] Linking CXX executable ../../release/parquet-dump-schema cd /root/rpmbuild/BUILD/apache-arrow-16.0.0.dev387/cpp/build/tools/parquet && /usr/bin/cmake -E cmake_link_script CMakeFiles/parquet-dump-schema.dir/link.txt --verbose=1 /usr/lib64/ccache/c++ -Wno-noexcept-type -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdiagnostics-color=always -Wall -fno-semantic-interposition -msse4.2 -DNDEBUG -ftree-vectorize -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld "CMakeFiles/parquet-dump-schema.dir/parquet_dump_schema.cc.o" -o ../../release/parquet-dump-schema -Wl,-rpath,/root/rpmbuild/BUILD/apache-arrow-16.0.0.dev387/cpp/build/release: ../../release/libparquet.so.1600.0.0 ../../release/libarrow.so.1600.0.0 ../../release/libarrow.so.1600.0.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../release/libarrow.so.1600.0.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' collect2: error: ld returned 1 exit status ``` We use `std::filesystem` by #40697. It seems that we need to use `-lstdc++fs` explicitly with GCC 8. Solutions: 1. Check ORC version statically (not dynamically by `GetOrcMajorVersion()`), use `std::filesystem` only with old ORC and newer GCC, upgrade vendored ORC 2. Add `-lstdc++fs` for GCC 8 and `-lc++fs` for clang 7 I like 1. I don't want to write CMake code for 2... ### 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-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org