-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Describe the bug, including details regarding any error messages, version, and platform.
almalinux-8-amd64
[ 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:
- Check ORC version statically (not dynamically by
GetOrcMajorVersion()), usestd::filesystemonly with old ORC and newer GCC, upgrade vendored ORC - Add
-lstdc++fsfor GCC 8 and-lc++fsfor clang 7
I like 1. I don't want to write CMake code for 2...
Component(s)
C++