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

Build error: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' #8

Open
ghost opened this issue Aug 12, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 12, 2020

I try to build hashcobra howver I get the following error:
make -C third-party/libtomcrypt make[1]: Entering directory '/home/debian/hashcobra/third-party/libtomcrypt' make[1]: Nothing to be done for 'library'. make[1]: Leaving directory '/home/debian/hashcobra/third-party/libtomcrypt' g++ -O3 -Wall -Wextra -std=c++17 -lstdc++fs -march=native -s -Ithird-party/libtomcrypt/src/headers -o hashcobra hashcobra.o -Lthird-party/libtomcrypt -lrocksdb -ltomcrypt /usr/bin/ld: hashcobra.o: in function std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::filesystem::__cxx11::path::format) [clone .constprop.101]':
hashcobra.cpp:(.text+0xb90): undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/bin/ld: hashcobra.o: in function main':
hashcobra.cpp:(.text.startup+0x24f7): undefined reference to std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: hashcobra.cpp:(.text.startup+0x2705): undefined reference to std::filesystem::status(std::filesystem::__cxx11::path const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:16: hashcobra] Error 1`

The issue on other forums seems to be solved by adding -lstdc++fs to the build command however I still get the same error.

Any help would be much appreciated.

@sepehrdaddev
Copy link
Owner

Hi @UnleashMe69, please use a more recent gcc compiler and test whether it will work.

@ghost
Copy link
Author

ghost commented Aug 12, 2020

Right now I'm using the 8.3.0.
Should I try to build a more recent version?

@sepehrdaddev
Copy link
Owner

Yes, try 9.0 or 10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant