PDB-REDO / dssp

Application to assign secondary structure to proteins
BSD 2-Clause "Simplified" License
166 stars 19 forks source link

Error upon build #85

Closed elisedlfg closed 3 months ago

elisedlfg commented 3 months ago

Hello,

I'm trying to install dssp but keep getting this error - seems to be a variable declaration issue in the code but code looks fine. Do you have any idea what might be going wrong there/how to fix this?

Cmake version 3.30.0 Ubuntu 20.04.6 LTS

(dssp) dssp> cmake --build build [ 3%] Building CXX object _deps/cifpp-build/CMakeFiles/cifpp.dir/src/category.cpp.o In file included from dssp/build/_deps/cifpp-src/include/cif++/item.hpp:32, from dssp/build/_deps/cifpp-src/include/cif++/row.hpp:29, from dssp/build/_deps/cifpp-src/include/cif++/condition.hpp:29, from dssp/build/_deps/cifpp-src/include/cif++/category.hpp:31, from dssp/build/_deps/cifpp-src/src/category.cpp:27: dssp/build/_deps/cifpp-src/include/cif++/utilities.hpp:193:2: error: ‘requires’ does not name a type 193 | requires std::is_assignable_v<std::string_view, T> | ^~~~ make[2]: [_deps/cifpp-build/CMakeFiles/cifpp.dir/build.make:76: _deps/cifpp-build/CMakeFiles/cifpp.dir/src/category.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:1079: _deps/cifpp-build/CMakeFiles/cifpp.dir/all] Error 2 make: *** [Makefile:166: all] Error 2

Thanks a lot

mhekkel commented 3 months ago

The requires keyword is something new in C++20. Apparently you're using an older compiler. The minimal version of gcc is 9.4. Don't know for sure what the minimal clang version is.

Please also note that Ubuntu 20.04 is already 4.5 years old. Perhaps you should consider updating to a newer version.

elisedlfg commented 3 months ago

Thanks for a swift answer. I do have gcc 9.4, so I guess a system upgrade is in order. Best

mhekkel commented 3 months ago

In that case... hmmm. You should be able to build dssp using gcc 9.4, but perhaps cmake selected the wrong version in case you have an older compiler installed as well. You can specify the compiler to use, one way to do this is to specify the compiler in the configure step. Like so:

cmake -S . -B build -DCMAKE_CXX_COMPILER=/usr/bin/g++-9