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

GCC 8 not supported #15

Open
pacio5 opened this issue May 22, 2021 · 2 comments
Open

GCC 8 not supported #15

pacio5 opened this issue May 22, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@pacio5
Copy link

pacio5 commented May 22, 2021

When running the last build command on debian 10, version gcc 8.

I get the following error

utente@debian:~/chia-log-analysis$ cmake --build build --config Release [ 25%] Linking CXX executable chia-log-analysis /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.o: in function main':
main.cpp:(.text+0x1ab): undefined reference to std::filesystem::file_size(std::filesystem::__cxx11::path const&)' /usr/bin/ld: main.cpp:(.text+0x434): undefined reference to std::filesystem::__cxx11::directory_iterator::operator*() const'
/usr/bin/ld: main.cpp:(.text+0x14c7): undefined reference to std::filesystem::__cxx11::directory_iterator::operator++()' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.o: in function std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&)':
main.cpp:(.text._ZNSt10filesystem7__cxx1118directory_iteratorC2ERKNS0_4pathE[_ZNSt10filesystem7__cxx1118directory_iteratorC5ERKNS0_4pathE]+0x26): undefined reference to std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.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)':
main.cpp:(.text._ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE[_ZNSt10filesystem7__cxx114pathC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE]+0x64): undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/InputHandler.cpp.o: in function std::filesystem::is_directory(std::filesystem::__cxx11::path const&)':
InputHandler.cpp:(.text._ZNSt10filesystem12is_directoryERKNS_7__cxx114pathE[_ZNSt10filesystem12is_directoryERKNS_7__cxx114pathE]+0x14): undefined reference to std::filesystem::status(std::filesystem::__cxx11::path const&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/chia-log-analysis.dir/build.make:114: chia-log-analysis] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chia-log-analysis.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

@Pengor
Copy link
Owner

Pengor commented May 22, 2021

Looks like GCC 8 needs a special flag to enable support for the <filesystem> header that Chia Log Analysis uses. I'll see if there's a way to have that flag set by default. I'm away from my PC for the weekend so won't be able to look into it for a while, but there might be a way to tell CMake how to pass the -lstdc++fs flag to the compiler in the meantime. You could also upgrade to a newer version of GCC but I know that's not always practical!

@pacio5
Copy link
Author

pacio5 commented May 22, 2021

I proposed a solution in the pull requests. I tried it on my debian 10 with gcc8 and it works.

When you can take a look at it.

@Pengor Pengor linked a pull request May 24, 2021 that will close this issue
@Pengor Pengor added the enhancement New feature or request label Jun 1, 2021
@Pengor Pengor changed the title Problem with the last build command GCC 8 not supported Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants