Closed JoshuaSBrown closed 2 years ago
I'm wondering if all the gmx files now need a refactor.
I'm getting tones of linker errors now as well.
Any details?
I had an old version of a gromacs libarray around, which caused those errors. Everything is fine now, it was a user error.
We might need to update cmake,
Found GROMACS: /usr/lib/x86_64-linux-gnu/libgromacs_d.so (found suitable version "2019.6", minimum required is "2018")
Here is a list of the errors
../libcsg/libvotca_csg.so.7: undefined reference to gmx_mtop_t::gmx_mtop_t()' ../libcsg/libvotca_csg.so.7: undefined reference to
read_first_frame(gmx_output_env_t const*, t_trxstatus*, char const, t_trxframe, int)'
../libcsg/libvotca_csg.so.7: undefined reference to `open_trx(char const, char const)'
../libcsg/libvotca_csg.so.7: undefined reference to `close_trx(t_trxstatus)'
../libcsg/libvotca_csg.so.7: undefined reference to output_env_init(gmx_output_env_t**, gmx::IProgramContext const&, time_unit_t, bool, xvg_format_t, int)' ../libcsg/libvotca_csg.so.7: undefined reference to
read_next_frame(gmx_output_env_t const.,. /t_trxstatuslibcsg/,libvotca_csg.so.7 :t_trxframe undefined) 'reference
.to. /libcsggmx_mtop_t/:libvotca_csg.so.7::gmx_mtop_t (undefined) 'reference .to. /
libcsggmx_mtop_t/:libvotca_csg.so.7::~ gmx_mtop_tundefined( )reference'
to. .`/read_first_framelibcsg(/gmx_output_env_tlibvotca_csg.so.7 :const undefined, referencet_trxstatus to ,` write_trxframechar( t_trxstatusconst,, t_trxframet_trxframe,, gmx_conect_tint*))''
.collect2: error: ld returned 1 exit status
./libcsg/libvotca_csg.so.7: undefined reference to open_trx(char const*, char const*)' ../libcsg/libvotca_csg.so.7: undefined src/tools/CMakeFiles/csg_property.dir/build.make:98: recipe for target 'src/tools/csg_property' failed referencemake[2]: *** [src/tools/csg_property] Error 1 toCMakeFiles/Makefile2:939: recipe for target 'src/tools/CMakeFiles/csg_property.dir/all' failed make[1]: *** [src/tools/CMakeFiles/csg_property.dir/all] Error 2
make[1]: Waiting for unfinished jobs....
close_trx(t_trxstatus)'
../libcsg/libvotca_csg.so.7: undefined reference to `output_env_init(gmx_output_env_t, gmx::IProgramContext const&, time_unit_t, bool, xvg_format_t, int)'
../libcsg/libvotca_csg.so.7: undefined reference to read_next_frame(gmx_output_env_t const*, t_trxstatus*, t_trxframe*)' ../libcsg/libvotca_csg.so.7: undefined reference to
gmx_mtop_t::~gmx_mtop_t()'
../libcsg/libvotca_csg.so.7: undefined reference to `write_trxframe(t_trxstatus, t_trxframe, gmx_conect_t*)'
collect2: error: ld returned 1 exit status
src/tools/CMakeFiles/csg_resample.dir/build.make:98: recipe for target 'src/tools/csg_resample' failed
make[2]: [src/tools/csg_resample] Error 1
CMakeFiles/Makefile2:976: recipe for target 'src/tools/CMakeFiles/csg_resample.dir/all' failed
make[1]: [src/tools/CMakeFiles/csg_resample.dir/all] Error 2
I'll look into this to make sure I'm not doing something wonky with the files in my system library/includes. This passes the ci but I cann't build it locally.
@junghans what versions of gromacs are being used in the ci?
We build against:
There is a problem with the FindGromacs cmake module. Recently the gromacs has switched the api versioning system. Current versions of gromacs are now versioning starting at version 0 which breaks our current cmake module.
Also using the spack gromacs causes problems because it is built with openmpi, gromacs_mpi and libgromacs_mpi need to be added as possible options. I'm working on a solution but welcome feedback.
Also using the spack gromacs causes problems because it is built with openmpi, gromacs_mpi and libgromacs_mpi need to be added as possible options. I'm working on a solution but welcome feedback.
There is something wrong, in spack votca-csg depends on gromacs without mpi: https://github.com/spack/spack/blob/a20ba315f57bcbbb73838d1b67a15a9e14d580cd/var/spack/repos/builtin/packages/votca-csg/package.py#L35
There is a problem with the FindGromacs cmake module. Recently the gromacs has switched the api versioning system. Current versions of gromacs are now versioning starting at version 0 which breaks our current cmake module.
Remember that we have two mechanisms to detect gromacs: https://github.com/votca/csg/blob/master/CMakeLists.txt#L86-L89 First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.
Plus whatever you do make sure we can still use gromacs-2018/2019 as this is needed for the coarse-graining part.
First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.
I have a question why can't we use the config method for also finding earlier versions?
First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.
I have a question why can't we use the config method for also finding earlier versions?
Because it is brocken in earlier versions. I just fixed that recently https://gitlab.com/gromacs/gromacs/-/merge_requests/48
Fixed in #554.
@JensWehner you had trouble with gromacs file readers before, did you ever get the problem fixed. I'm getting tones of linker errors now as well.