Closed sperezconesa closed 4 years ago
This is one funny problem - and I don't think it is caused by CHAP directly. At least there is no immediate dependence on libz anywhere in CHAP.
My recommendation would be to fix this warning cmake gives you:
CMake Warning at /usr/local/gromacs/share/cmake/gromacs/gromacs-config.cmake:125 (message):
You are compiling with a different C++ compiler from the one that was used
to compile GROMACS. This may lead to linking or runtime problems. GROMACS
was compiled with GNU 5.4.0 (/usr/bin/g++-5).
Call Stack (most recent call first):
CMakeLists.txt:87 (gromacs_check_compiler)
In my experience, "This may lead to linking or runtime problems." is a bit of an understatement and linker errors always ensue when this warning goes unheeded. And it might well be that Gromacs uses libz for its trajectory format, which would explain the odd error you are seeing.
Thanks a lot for the answer. How can I tell chap to use the compiler that I used for GMX?
You can define environment variables CC
and CXX
for the C and C++ compilers respectively like this: export CXX="/usr/bin/g++-5"
. The path you specify obviously needs to point to an existing compiler.
I found the problem. There was an old instalation of gromacs that was being picked up, instead of the one I use that is in my home. I errased the old version and it worked but....
Now... I have another problem hahaha. Cmake does:
-- The CXX compiler identification is GNU 5.5.0
-- The C compiler identification is GNU 5.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Boost version: 1.65.1
-- Found LAPACKE: /usr/include/x86_64-linux-gnu
-- Found GROMACS: 2019.4
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /data/sperez/bin2/chap-version_0_9_1/build
And then make
In file included from /data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:25:0:
/data/sperez/bin2/chap-version_0_9_1/include/analysis-setup/residue_information_provider.hpp:67:42: error: ‘TopologyInformation’ in namespace ‘gmx’ does not name a type
void nameFromTopology(const gmx::TopologyInformation &top);
^
/data/sperez/bin2/chap-version_0_9_1/include/analysis-setup/residue_information_provider.hpp:68:43: error: ‘TopologyInformation’ in namespace ‘gmx’ does not name a type
void chainFromTopology(const gmx::TopologyInformation &top);
^
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:47:20: error: ‘TopologyInformation’ in namespace ‘gmx’ does not name a type
const gmx::TopologyInformation &top)
^
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp: In member function ‘void ResidueInformationProvider::nameFromTopology(const int&)’:
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:50:25: error: request for member ‘topology’ in ‘top’, which is of non-class type ‘const int’
t_atoms atoms = top.topology() -> atoms;
^
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp: At global scope:
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:67:20: error: ‘TopologyInformation’ in namespace ‘gmx’ does not name a type
const gmx::TopologyInformation &top)
^
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp: In member function ‘void ResidueInformationProvider::chainFromTopology(const int&)’:
/data/sperez/bin2/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:70:25: error: request for member ‘topology’ in ‘top’, which is of non-class type ‘const int’
t_atoms atoms = top.topology() -> atoms;
^
CMakeFiles/chap.dir/build.make:158: recipe for target 'CMakeFiles/chap.dir/src/analysis-setup/residue_information_provider.cpp.o' failed
make[2]: *** [CMakeFiles/chap.dir/src/analysis-setup/residue_information_provider.cpp.o] Error 1
CMakeFiles/Makefile2:355: recipe for target 'CMakeFiles/chap.dir/all' failed
make[1]: *** [CMakeFiles/chap.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
I'm using gmx2019.4
Gromacs 2019 changed the API of libgromacs
and is currently not compatible with CHAP. For the time being, you need to use Gromacs 2016 or 2018.
I'll close this issue, since the original problem is solved.
good to know! Thank you!
Hello, I am having some problems installing chap. I have installed the proper libraries and when I do cmake, there is no problem:
But when I compile I get:
This library is an old installation of anaconda that is now removed, but it still finds it. I have checked in my environment variables (using env) and it is not in the environment varibles. Could you help me? Thank you very much in advanced, Best, Sergio