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

Can't build unittest with gcc8.5 and clang 12 #1939

Open
2 tasks done
Smityz opened this issue Dec 18, 2023 · 0 comments · May be fixed by #1940
Open
2 tasks done

Can't build unittest with gcc8.5 and clang 12 #1939

Smityz opened this issue Dec 18, 2023 · 0 comments · May be fixed by #1940
Labels
bug type bug

Comments

@Smityz
Copy link

Smityz commented Dec 18, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Version

centos8/gcc8.5/clang12
kvrocks: unstable/2ecf764d

Minimal reproduce step

./x.py build -j 20 --unittest

Consolidate compiler generated dependencies of target unittest
[ 94%] Linking CXX executable unittest
CMakeFiles/unittest.dir/tests/cppunit/compact_test.cc.o: In function `Compact_Filter_Test::TestBody()':
/usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
CMakeFiles/unittest.dir/tests/cppunit/compact_test.cc.o: In function `Compact_Filter_Test::TestBody()':
/home/yanzhao.tang/Code/kvrocks/tests/cppunit/compact_test.cc:128: undefined reference to `std::filesystem::remove_all(std::filesystem::__cxx11::path const&, std::error_code&)'
CMakeFiles/unittest.dir/tests/cppunit/disk_test.cc.o: In function `TestBase::~TestBase()':
/usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
CMakeFiles/unittest.dir/tests/cppunit/disk_test.cc.o: In function `TestBase::~TestBase()':

./x.py build -j 20 --unittest --compiler clang

[100%] Linking CXX executable unittest
ld.lld: error: undefined symbol: std::filesystem::__cxx11::path::_M_split_cmpts()
>>> referenced by fs_path.h:185 (/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:185)
>>>               CMakeFiles/unittest.dir/tests/cppunit/compact_test.cc.o:(Compact_Filter_Test::TestBody())
>>> referenced by fs_path.h:185 (/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:185)
>>>               CMakeFiles/unittest.dir/tests/cppunit/disk_test.cc.o:(TestBase::~TestBase())
>>> referenced by fs_path.h:185 (/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:185)
>>>               CMakeFiles/unittest.dir/tests/cppunit/rdb_test.cc.o:(std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::filesystem::__cxx11::path::format))

What did you expect to see?

code compiled

What did you see instead?

code not compiled

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@Smityz Smityz added the bug type bug label Dec 18, 2023
@Smityz Smityz linked a pull request Dec 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant