Skip to content
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

[C++][ORC] Need -lstdc++fs with GCC 8 #40855

Closed
kou opened this issue Mar 28, 2024 · 1 comment
Closed

[C++][ORC] Need -lstdc++fs with GCC 8 #40855

kou opened this issue Mar 28, 2024 · 1 comment
Assignees
Milestone

Comments

@kou
Copy link
Member

kou commented Mar 28, 2024

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

[ 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++

@kou kou added the Type: bug label Mar 28, 2024
@kou kou added this to the 16.0.0 milestone Apr 5, 2024
kou added a commit to kou/arrow that referenced this issue Apr 5, 2024
…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.
kou added a commit to kou/arrow that referenced this issue Apr 5, 2024
…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.
kou added a commit that referenced this issue Apr 5, 2024
…C 2.0.0 or later (#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: #40855

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou
Copy link
Member Author

kou commented Apr 5, 2024

Issue resolved by pull request 41023
#41023

@kou kou closed this as completed Apr 5, 2024
tolleybot pushed a commit to tmct/arrow that referenced this issue May 2, 2024
…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]>
vibhatha pushed a commit to vibhatha/arrow that referenced this issue May 25, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant