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

Issue with "Make" command #34

Open
joe781114 opened this issue May 18, 2021 · 8 comments
Open

Issue with "Make" command #34

joe781114 opened this issue May 18, 2021 · 8 comments
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Comments

@joe781114
Copy link

Hi sir,
I am trying to install chap 0.9.1 on my workstation which is the Ubuntu 18.04.5 LTS and the gromacs version is 2020.5.
Following the installation guide, I first touch the same issue here, then follow the command below by changing the "set(CMAKE_CXX_STANDARD 11)" to "set(CMAKE_CXX_STANDARD 14)", I can successfully get rid of this error message.
However, when typing the "make" command again, it shows another error below:

[ 6%] Built target googletest
[ 6%] Building CXX object CMakeFiles/chap.dir/src/analysis-setup/residue_information_provider.cpp.o
In file included from /home/joe/Downloads/chap-version_0_9_1/src/analysis-setup/residue_information_provider.cpp:25:0:
/home/joe/Downloads/chap-version_0_9_1/include/analysis-setup/residue_information_provider.hpp:32:10: fatal error: gromacs/topology/atoms.h: No such file or directory
#include <gromacs/topology/atoms.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
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 am curious if that means my gromacs program just lost the file "atoms.h"? And I should reinstall the gromacs?
Or anything else I should do to fix this error.

Sorry for the interruption, and looking forward to any idea/solution.

@jesucastin
Copy link

I am facing the same error. Can anyone help?

@philbiggin
Copy link
Collaborator

I believe you need to compile this with an older version of gromacs (2018 or 2019) - the gromacs library changed in the 2020 version onwards.

@philbiggin
Copy link
Collaborator

Or rather atoms.h and topology.h are no longer found in the include directory which is where CHAP expects to see them - in fact these files are still in the src directory of gromacs so another solution is to tell the install script where to find them.

@Inniag
Copy link
Collaborator

Inniag commented Jun 27, 2021

As explained by @philbiggin, the issue is that libgromacs has API-breaking changes between the major versions of Gromacs releases and CHAP has not yet been updated to keep up with these changes.

The easiest workaround is indeed to install CHAP against an older Gromacs version such as 2018. This should then still be able to process trajectories created with the newer Gromacs versions (unless Gromacs has changed something about the trajectory file format itself).

If anyone wants to create a pull request for adjusting the cmake directives to make CHAP find the atoms.h and topology.h files in their new locations, I would be happy to accept that. Only requirement would be that downward compatibility with older Gromacs versions (down to 2016) is maintained.

@Inniag Inniag added dependencies Pull requests that update a dependency file help wanted Extra attention is needed labels Jun 27, 2021
@havebeen
Copy link

Hi all,

I faced this problem as well, and I took the recommendation from Inniag to install Gromacs 2016. However, the link of the regression tests (http://gerrit.******) is failed during installing. Please modify the link in gromacs-2016/tests/CMakeLists.txt to https://ftp.gromacs.org/regressiontests/regressiontests-2016.tar.gz accordingly. In the end, I install the package successfully, and I hope the comment will help others.

@DSeiferth
Copy link
Collaborator

DSeiferth commented Mar 16, 2022

Hi @havebeen ,

thanks for your comment!

We have uploaded a precompiled chap version with a singularity image (using gmx 2018). If you have singularity installed, you can use chap without worrying about the dependencies.

https://github.com/channotation/chap/blob/singularity_branch/docs/_docs/getting-started/index.md

@havebeen
Copy link

Hi @DSeiferth ,

Speaking to the singularity image... I cannot use that since the singularity said it cannot recognise the image format. I'm quite not sure why it is. For the both .sif and .simg. :(

image

@amagg2024
Copy link

Hi Everyone,

I got a similar error as follows with the make command. Can anyone help me to solve the problem?

[ 40%] Building CXX object CMakeFiles/chap.dir/src/statistics/kernel_density_estimator.cpp.o
[ 40%] Building CXX object CMakeFiles/chap.dir/src/statistics/kernel_function.cpp.o
[ 41%] Building CXX object CMakeFiles/chap.dir/src/statistics/summary_statistics.cpp.o
[ 42%] Building CXX object CMakeFiles/chap.dir/src/statistics/weighted_kernel_density_estimator.cpp.o
[ 43%] Building CXX object CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o
[ 43%] Building CXX object CMakeFiles/chap.dir/config/version.cpp.o
[ 44%] Building CXX object CMakeFiles/chap.dir/config/config.cpp.o
[ 45%] Linking CXX executable chap
/usr/bin/ld: CMakeFiles/chap.dir/src/analysis-setup/residue_information_provider.cpp.o: in function ResidueInformationProvider::nameFromTopology(gmx::TopologyInformation const&)': residue_information_provider.cpp:(.text+0x707): undefined reference to gmx::TopologyInformation::topology() const'
/usr/bin/ld: CMakeFiles/chap.dir/src/analysis-setup/residue_information_provider.cpp.o: in function ResidueInformationProvider::chainFromTopology(gmx::TopologyInformation const&)': residue_information_provider.cpp:(.text+0x9f9): undefined reference to gmx::TopologyInformation::topology() const'
/usr/bin/ld: CMakeFiles/chap.dir/src/io/pdb_io.cpp.o: in function PdbStructure::fromTopology(gmx::TopologyInformation const&)': pdb_io.cpp:(.text+0x1c): undefined reference to gmx::TopologyInformation::getTopologyConf(float (**) [3], float () [3]) const'
/usr/bin/ld: pdb_io.cpp:(.text+0x24): undefined reference to gmx::TopologyInformation::topology() const' /usr/bin/ld: CMakeFiles/chap.dir/src/io/pdb_io.cpp.o: in function PdbIo::write(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, PdbStructure)':
pdb_io.cpp:(.text+0x2e3): undefined reference to write_sto_conf' /usr/bin/ld: CMakeFiles/chap.dir/src/main.cpp.o: in function main':
main.cpp:(.text.startup+0x117): undefined reference to gmx::TrajectoryAnalysisCommandLineRunner::runAsMain(int, char**, std::function<std::unique_ptr<gmx::TrajectoryAnalysisModule, std::default_delete<gmx::TrajectoryAnalysisModule> > ()>)' /usr/bin/ld: CMakeFiles/chap.dir/src/path-finding/vdw_radius_provider.cpp.o: in function VdwRadiusProvider::vdwRadiiForTopology(gmx::TopologyInformation const&, std::vector<int, std::allocator >)':
vdw_radius_provider.cpp:(.text+0x25ac): undefined reference to gmx::TopologyInformation::topology() const' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function ChapTrajectoryAnalysis::initAnalysis(gmx::TrajectoryAnalysisSettings const&, gmx::TopologyInformation const&)':
chap_trajectory_analysis.cpp:(.text+0x1b8c): undefined reference to gmx::AbstractAnalysisData::addModule(std::shared_ptr<gmx::IAnalysisDataModule>)' /usr/bin/ld: chap_trajectory_analysis.cpp:(.text+0x1cee): undefined reference to gmx::SelectionCollection::setTopology(gmx_mtop_t
, int)'
/usr/bin/ld: chap_trajectory_analysis.cpp:(.text+0x1dd3): undefined reference to gmx::SelectionCollection::setTopology(gmx_mtop_t*, int)' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function gmx::EnumOption::createStorage(gmx::OptionManagerContainer const&) const':
chap_trajectory_analysis.cpp:(.text._ZNK3gmx10EnumOptionI23eHydrophobicityDatabaseE13createStorageERKNS_22OptionManagerContainerE[_ZNK3gmx10EnumOptionI23eHydrophobicityDatabaseE13createStorageERKNS_22OptionManagerContainerE]+0x182): undefined reference to gmx::internal::createEnumOptionStorage(gmx::AbstractOption const&, char const* const*, int, int, int, gmx::IOptionValueStore<int>*)' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function gmx::EnumOption::createStorage(gmx::OptionManagerContainer const&) const':
chap_trajectory_analysis.cpp:(.text._ZNK3gmx10EnumOptionI17eDensityEstimatorE13createStorageERKNS_22OptionManagerContainerE[_ZNK3gmx10EnumOptionI17eDensityEstimatorE13createStorageERKNS_22OptionManagerContainerE]+0x182): undefined reference to gmx::internal::createEnumOptionStorage(gmx::AbstractOption const&, char const* const*, int, int, int, gmx::IOptionValueStore<int>*)' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function gmx::EnumOption::createStorage(gmx::OptionManagerContainer const&) const':
chap_trajectory_analysis.cpp:(.text._ZNK3gmx10EnumOptionI20ePathAlignmentMethodE13createStorageERKNS_22OptionManagerContainerE[_ZNK3gmx10EnumOptionI20ePathAlignmentMethodE13createStorageERKNS_22OptionManagerContainerE]+0x182): undefined reference to gmx::internal::createEnumOptionStorage(gmx::AbstractOption const&, char const* const*, int, int, int, gmx::IOptionValueStore<int>*)' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function gmx::EnumOption::createStorage(gmx::OptionManagerContainer const&) const':
chap_trajectory_analysis.cpp:(.text._ZNK3gmx10EnumOptionI18eVdwRadiusDatabaseE13createStorageERKNS_22OptionManagerContainerE[_ZNK3gmx10EnumOptionI18eVdwRadiusDatabaseE13createStorageERKNS_22OptionManagerContainerE]+0x182): undefined reference to gmx::internal::createEnumOptionStorage(gmx::AbstractOption const&, char const* const*, int, int, int, gmx::IOptionValueStore<int>*)' /usr/bin/ld: CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o: in function gmx::EnumOption::createStorage(gmx::OptionManagerContainer const&) const':
chap_trajectory_analysis.cpp:(.text._ZNK3gmx10EnumOptionI18ePathFindingMethodE13createStorageERKNS_22OptionManagerContainerE[_ZNK3gmx10EnumOptionI18ePathFindingMethodE13createStorageERKNS_22OptionManagerContainerE]+0x182): undefined reference to `gmx::internal::createEnumOptionStorage(gmx::AbstractOption const&, char const* const*, int, int, int, gmx::IOptionValueStore*)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/chap.dir/build.make:889: chap] Error 1
make[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/chap.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants