channotation / chap

CHAP is a tool for the functional annotation of ion channel structures:
http://www.channotation.org
Other
18 stars 10 forks source link

CMAKE ERROR when installing Chap (Version 0.9.1) on Ubuntu 20.04.2 LTS #33

Closed theres-fries closed 3 years ago

theres-fries commented 3 years ago

Hi everyone, I am trying to install Chap (Version 0.9.1) on my Computer (Ubuntu 20.04.2 LTS). When I run make, I get the following error:

#################################################################################################### [ 8%] Building CXX object CMakeFiles/chap.dir/src/aggregation/number_density_calculator.cpp.o In file included from /usr/local/gromacs/include/gromacs/math/vec.h:111, from /home/theres/THERES_projects/tools/chap-version_0_9_1/include/geometry/spline_curve_1D.hpp:33, from /home/theres/THERES_projects/tools/chap-version_0_9_1/include/aggregation/number_density_calculator.hpp:32, from /home/theres/THERES_projects/tools/chap-version_0_9_1/src/aggregation/number_density_calculator.cpp:29: /usr/local/gromacs/include/gromacs/math/vectypes.h:96:41: error: ‘remove_cv_t’ is not a member of ‘std’ static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~ /usr/local/gromacs/include/gromacs/math/vectypes.h:96:41: note: suggested alternative: ‘remove_cv’ static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~ remove_cv /usr/local/gromacs/include/gromacs/math/vectypes.h:96:41: error: ‘remove_cv_t’ is not a member of ‘std’ /usr/local/gromacs/include/gromacs/math/vectypes.h:96:41: note: suggested alternative: ‘remove_cv’ static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~ remove_cv /usr/local/gromacs/include/gromacs/math/vectypes.h:96:53: error: template argument 1 is invalid static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~~~ /usr/local/gromacs/include/gromacs/math/vectypes.h:96:66: error: ‘::value’ has not been declared static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~~~ /usr/local/gromacs/include/gromacs/math/vectypes.h:96:66: note: suggested alternative: ‘valloc’ static_assert(!std::is_pointer<std::remove_cv_t>::value, ^~~~~ valloc In file included from /home/theres/THERES_projects/tools/chap-version_0_9_1/include/geometry/spline_curve_1D.hpp:33, from /home/theres/THERES_projects/tools/chap-version_0_9_1/include/aggregation/number_density_calculator.hpp:32, from /home/theres/THERES_projects/tools/chap-version_0_9_1/src/aggregation/number_density_calculator.cpp:29: /usr/local/gromacs/include/gromacs/math/vec.h:630:6: error: ‘remove_const_t’ in namespace ‘std’ does not name a template type std::remove_const_t norm(T v) ^~~~~~ /usr/local/gromacs/include/gromacs/math/vec.h:630:1: note: suggested alternative: ‘remove_const’ std::remove_const_t norm(T v) ^~~ remove_const /usr/local/gromacs/include/gromacs/math/vec.h:635:6: error: ‘remove_const_t’ in namespace ‘std’ does not name a template type std::remove_const_t norm2(T v) ^~~~~~ /usr/local/gromacs/include/gromacs/math/vec.h:635:1: note: suggested alternative: ‘remove_const’ std::remove_const_t norm2(T v) ^~~ remove_const make[2]: [CMakeFiles/chap.dir/build.make:104: CMakeFiles/chap.dir/src/aggregation/number_density_calculator.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:547: CMakeFiles/chap.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

###################################################################################################### ######################################################################################################

I have installed GROMACS 2020.6 with an external fftw library. In case you need the cmake command I ran for GMX installation: sudo cmake .. -DGMX_BUILD_OWN_FFTW=OFF -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=on -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.2/ -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DBUILD_SHARED_LIBS=OFF

Other information you might need:

######################################################################################################

I am not sure what I am doing wrong and I would be very grateful for any tips or tricks how to deal with this this error. Thank you very much in advance!

DSeiferth commented 3 years ago

I have the same issue, @theres-fries on Ubuntu 20.04.2 LTS. Just read here https://stackoverflow.com/questions/65295680/chrome-v8-sample-complie-error-how-can-i-solve-remove-cv-t-is-not-a-member-of that 'remove_cv_t' was added in C++14.

I was able to get rid of the error messages you had, when I changed line 35 in CMakeLists.txt: set(CMAKE_CXX_STANDARD 14) instead of set(CMAKE_CXX_STANDARD 11)

theres-fries commented 3 years ago

Also worked for me, thank you very much for the help, @DSeiferth!

Inniag commented 3 years ago

Thank you @DSeiferth for suggesting this fix! I am assuming this issue has been resolved and will close the ticket now.