problem in building VOTCA

43 views
Skip to first unread message

Roozbeh R

unread,
Feb 14, 2024, 6:38:36 AMFeb 14
to votca
Hi,
I am trying to install votca on WSL2 (a laptop). I have already installed gromacs2018.8 &  added the address of the gromacs bin to the .bashrc PATH variable file and made sure that it runs smoothly.

 I try to compile votca (v2024), using cmake command line :
"cmake -B builddir -S votca -DBUILD_XTP=ON  -DCMAKE_INSTALL_PREFIX=${prefix}          -DBUILD_OWN_LIBINT=ON"

Upon running, i got the following error message:

"
CMake Error at /usr/local/share/cmake/gromacs/libgromacs.cmake:111 (message):
  The imported target "Gromacs::gmx" references the file

     "/usr/local/bin/gmx"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/share/cmake/gromacs/libgromacs.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/share/cmake/gromacs/gromacs-config.cmake:56 (include)
  CMakeLists.txt:119 (find_package)


Tried resolving it by passing necessary flag containing gromacs info to cmake, like this:

"cmake -B builddir -S votca -DBUILD_XTP=ON -DCMAKE_INSTALL_PREFIX=${prefix} -DBUILD_OWN_LIBINT=ON  -DGROMACS_INCLUDE_DIR=/usr/local/gromacs2018/include -DGROMACS_LIBRARY=/usr/local/gromacs2018/lib/libgromacs.so"

but got the exact same error message as above.

I then tried using the -DBUILD_OWN_GROMACS=ON  :

"cmake -B builddir -S votca -DBUILD_XTP=ON -DCMAKE_INSTALL_PREFIX=${prefix} -DBUILD_OWN_LIBINT=ON  -DBUILD_OWN_GROMACS=ON"

this time, cmake could produce the makefile with no error, however when i continue further to make the votca (cmake --build builddir --parallel 10), got the following error msg  :

"nvcc fatal   : Unsupported gpu architecture 'compute_30'
CMake Error at gpu_utilstest_cuda_generated_devicetransfers.cu.o.Release.cmake:220 (message):
  Error generating
  /root/builddir/gromacs/src/Gromacs_build-build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utilstest_cuda.dir//./gpu_utilstest_cuda_generated_devicetransfers.cu.o"

which is apparently due to the fact that gromacs version which was to be installed (with -DBUILD_OWN_GROMACS=ON) is way too old (probably v.2019...?) to support the system's gpu architecture : nvidia's RTX-4060. (actually i had to compile my build of the gromacs2018.8 without a gpu support for the same reason.)

as a final resort, i tried building votca with spack (spack install votca).
apparently, it proceeded successfully to install all the prerequisite packages and dependencies (including gromacs v2019...) right to the final step of building votca package itself, at which point it just took forever to complete and finally spitted out :"KILLED" 

so after testing all options to build VOTCA , to no avail, I am desperate to find a workaround.
any comment/guidelines  will be highly appreciated!

Thanks!
Roozi
  





Christoph Junghans

unread,
Feb 14, 2024, 8:22:12 AMFeb 14
to vo...@googlegroups.com
On Wed, Feb 14, 2024 at 6:38 AM Roozbeh R <rooz...@gmail.com> wrote:
>
> Hi,
> I am trying to install votca on WSL2 (a laptop). I have already installed gromacs2018.8 & added the address of the gromacs bin to the .bashrc PATH variable file and made sure that it runs smoothly.
>
> I try to compile votca (v2024), using cmake command line :
> "cmake -B builddir -S votca -DBUILD_XTP=ON -DCMAKE_INSTALL_PREFIX=${prefix} -DBUILD_OWN_LIBINT=ON"
>
> Upon running, i got the following error message:
>
> "
> CMake Error at /usr/local/share/cmake/gromacs/libgromacs.cmake:111 (message):
> The imported target "Gromacs::gmx" references the file
>
> "/usr/local/bin/gmx"
This means the installed gromacs is missing the "gmx" binary, you
might want to check where it is located and then fix the location in
the libgromacs.cmake.

>
> but this file does not exist. Possible reasons include:
>
> * The file was deleted, renamed, or moved to another location.
>
> * An install or uninstall procedure did not complete successfully.
>
> * The installation package was faulty and contained
>
> "/usr/local/share/cmake/gromacs/libgromacs.cmake"
>
> but not all the files it references.
>
> Call Stack (most recent call first):
> /usr/local/share/cmake/gromacs/gromacs-config.cmake:56 (include)
> CMakeLists.txt:119 (find_package)
> "
>
> Tried resolving it by passing necessary flag containing gromacs info to cmake, like this:
>
> "cmake -B builddir -S votca -DBUILD_XTP=ON -DCMAKE_INSTALL_PREFIX=${prefix} -DBUILD_OWN_LIBINT=ON -DGROMACS_INCLUDE_DIR=/usr/local/gromacs2018/include -DGROMACS_LIBRARY=/usr/local/gromacs2018/lib/libgromacs.so"
>
> but got the exact same error message as above.
>
> I then tried using the -DBUILD_OWN_GROMACS=ON :
>
> "cmake -B builddir -S votca -DBUILD_XTP=ON -DCMAKE_INSTALL_PREFIX=${prefix} -DBUILD_OWN_LIBINT=ON -DBUILD_OWN_GROMACS=ON"
>
> this time, cmake could produce the makefile with no error, however when i continue further to make the votca (cmake --build builddir --parallel 10), got the following error msg :
>
> "nvcc fatal : Unsupported gpu architecture 'compute_30'
> CMake Error at gpu_utilstest_cuda_generated_devicetransfers.cu.o.Release.cmake:220 (message):
> Error generating
> /root/builddir/gromacs/src/Gromacs_build-build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utilstest_cuda.dir//./gpu_utilstest_cuda_generated_devicetransfers.cu.o"
>
> which is apparently due to the fact that gromacs version which was to be installed (with -DBUILD_OWN_GROMACS=ON) is way too old (probably v.2019...?) to support the system's gpu architecture : nvidia's RTX-4060. (actually i had to compile my build of the gromacs2018.8 without a gpu support for the same reason.)
That might be more of a gromacs issue, but 2019 is too old for
upstream to fix anything.

>
> as a final resort, i tried building votca with spack (spack install votca).
> apparently, it proceeded successfully to install all the prerequisite packages and dependencies (including gromacs v2019...) right to the final step of building votca package itself, at which point it just took forever to complete and finally spitted out :"KILLED"
When is it getting killed? When building VOTCA? Can you post an error message?

>
> so after testing all options to build VOTCA , to no avail, I am desperate to find a workaround.
> any comment/guidelines will be highly appreciated!
Have you tried docker? Just get docker for Windows and then run the
votca/votca container.

Christoph

>
> Thanks!
> Roozi
>
>
>
>
>
>
> --
> Join us on Slack: https://join.slack.com/t/votca/signup
> ---
> You received this message because you are subscribed to the Google Groups "votca" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to votca+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/d49cd700-a1da-4df7-9962-4244cb4004dbn%40googlegroups.com.



--
Christoph Junghans
Web: http://www.compphys.de

Roozbeh R

unread,
Feb 14, 2024, 5:20:07 PMFeb 14
to votca
Hi Christoph,
thank you for the reply.
docker does not work either as i have already tested it for other packages on my system too without success  after lots of trials, so i rather not go after it again.

Re. your question on the failure of Spack , yes it succeeds in installing the dependencies but fails when building VOTCA itself and there is no error message. it just took a long a long time showing "building votca" before it says: KILLED! (tested two times)

As for the standard method of installing VOTCA, (cmake -B builddir -S votca  -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON  -DUSE_CUDA=ON) , i managed to modify  libgromacs.cmake to get read of its earlier complain of not being able to find gmx bin, so now it obviously is possible for cmake to find the location of gmx executable binary,  but now after i run cmake i get a new error message:

"
...
Found Threads: TRUE
-- Found GROMACS: 2019.6
CMake Error at CMakeLists.txt:136 (message):
  Gromacs library was found, but its headers were not.  Make sure you have
  installed the gromacs-devel package or built gromacs with
  -DGMX_INSTALL_LEGACY_API=ON"


but as i checked DGMX_INSTALL_LEGACY_API=ON  option is not  supported by gromacsv2019.6 (which is the last gromacs version supporting tabulated potentials) so this option is not applicable and also i compiled my gromacsv2019.6 manually with -DGMXAPI=ON and -DBUILD_SHARED_LIBS=ON which shall suffice. and i don know what gromacs-devel package even is?!

For the other alternative of making votca to build its own gromacs , i tried:
cmake -B builddir -S votca  -DCMAKE_INSTALL_PREFIX=${prefix}  -DINSTALL_CSGAPPS=ON  -DUSE_CUDA=ON  -GMX_CUDA_TARGET_SM=90  -DBUILD_OWN_GROMACS=ON

hoping that -DGMX_CUDA_TARGET_SM=90 flag will enable proper installation of gromacs by votca automatically ( it worked when i installed  a standalone gromacs2019.6 with cuda support on my machine , so i thought  it might work in this case too) but cmake just says : 

"CMake Warning:
  Manually-specified variables were not used by the project:

    GMX_CUDA_TARGET_SM
    USE_CUDA"

CMAKE indeed made the makefile with no error, but no wonder when i proceed to build the votca , i got the blow error (at the stage of gromacs automatic build) :

" nvcc fatal   : Unsupported gpu architecture 'compute_30'
CMake Error at gpu_utilstest_cuda_generated_devicetransfers.cu.o.Release.cmake:220 (message):
  Error generating
  /root/builddir/gromacs/src/Gromacs_build-build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utilstest_cuda.dir//./gpu_utilstest_cuda_generated_devicetransfers.cu.o "


it is not a surprise since it is mandatory to make the gpu structure clear through an appropriate cmake flag like GMX_CUDA_TARGET_SM,  for building the older versions of gromacs on machines with new GPU architecture according to gromacs team.


Now I think there shall be some subtle easy tuning for cmake to be able to find the gromacs header files it needs in the standard approach(cmake -B builddir -S votca  -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON  -DUSE_CUDA=ON). can you help on how to fix it? i mean which headers cmake is trying to find and how to guide it to find them? because gromacsv2019.6 is already working smoothly on my machine and i can run it from any folder. so i do not understand which headers it is missing? kindly please advise.

also for the 2nd alternative, if one can give right flags to cmake enabling votca building its own gromacs , this shall absolve the issue.so i wonder  why -DGMX_CUDA_TARGET_SM=90 does not work?! while it works fine when used as a flag to build gromacsv2019.6 independently. Any idea how to pass this info to cmake?

Any help will be highly appreciated,
roozi

Christoph Junghans

unread,
Feb 15, 2024, 9:11:06 AMFeb 15
to vo...@googlegroups.com
On Wed, Feb 14, 2024 at 5:20 PM Roozbeh R <rooz...@gmail.com> wrote:
>
> Hi Christoph,
> thank you for the reply.
> docker does not work either as i have already tested it for other packages on my system too without success after lots of trials, so i rather not go after it again.
>
> Re. your question on the failure of Spack , yes it succeeds in installing the dependencies but fails when building VOTCA itself and there is no error message. it just took a long a long time showing "building votca" before it says: KILLED! (tested two times)
Can you do a spack install --verbose ... to see what went on just
before it's aborting.

>
> As for the standard method of installing VOTCA, (cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON) , i managed to modify libgromacs.cmake to get read of its earlier complain of not being able to find gmx bin, so now it obviously is possible for cmake to find the location of gmx executable binary, but now after i run cmake i get a new error message:
>
> "
> ...
> Found Threads: TRUE
> -- Found GROMACS: 2019.6
> CMake Error at CMakeLists.txt:136 (message):
> Gromacs library was found, but its headers were not. Make sure you have
> installed the gromacs-devel package or built gromacs with
> -DGMX_INSTALL_LEGACY_API=ON"
>
> but as i checked DGMX_INSTALL_LEGACY_API=ON option is not supported by gromacsv2019.6 (which is the last gromacs version supporting tabulated potentials) so this option is not applicable and also i compiled my gromacsv2019.6 manually with -DGMXAPI=ON and -DBUILD_SHARED_LIBS=ON which shall suffice. and i don know what gromacs-devel package even is?!

CMake is just checking with gmx's version.h exists, see
https://github.com/votca/votca/blob/master/CMakeLists.txt#L133
Considering you had to modifiy your libgromacs.cmake to find the gmx
binary that hints toward an issue in your installation, but let me do
a build against gmx-2019.6 myself. (We usually use the "release-2019"
branch, which should be the same v2019.6).

>
> For the other alternative of making votca to build its own gromacs , i tried:
> cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON -GMX_CUDA_TARGET_SM=90 -DBUILD_OWN_GROMACS=ON
>
> hoping that -DGMX_CUDA_TARGET_SM=90 flag will enable proper installation of gromacs by votca automatically ( it worked when i installed a standalone gromacs2019.6 with cuda support on my machine , so i thought it might work in this case too) but cmake just says :
>
> "CMake Warning:
> Manually-specified variables were not used by the project:
>
> GMX_CUDA_TARGET_SM
> USE_CUDA"
>
> CMAKE indeed made the makefile with no error, but no wonder when i proceed to build the votca , i got the blow error (at the stage of gromacs automatic build) :
>
> " nvcc fatal : Unsupported gpu architecture 'compute_30'
> CMake Error at gpu_utilstest_cuda_generated_devicetransfers.cu.o.Release.cmake:220 (message):
> Error generating
> /root/builddir/gromacs/src/Gromacs_build-build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utilstest_cuda.dir//./gpu_utilstest_cuda_generated_devicetransfers.cu.o "
>
> it is not a surprise since it is mandatory to make the gpu structure clear through an appropriate cmake flag like GMX_CUDA_TARGET_SM, for building the older versions of gromacs on machines with new GPU architecture according to gromacs team.
>
>
> Now I think there shall be some subtle easy tuning for cmake to be able to find the gromacs header files it needs in the standard approach(cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON). can you help on how to fix it? i mean which headers cmake is trying to find and how to guide it to find them? because gromacsv2019.6 is already working smoothly on my machine and i can run it from any folder. so i do not understand which headers it is missing? kindly please advise.
>
> also for the 2nd alternative, if one can give right flags to cmake enabling votca building its own gromacs , this shall absolve the issue.so i wonder why -DGMX_CUDA_TARGET_SM=90 does not work?! while it works fine when used as a flag to build gromacsv2019.6 independently. Any idea how to pass this info to cmake?
Well, the GMX_CUDA_TARGET_SM is not handover to internal build. Let me
think about how we could fit that.

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/30615895-365a-412d-8e54-1592858c882bn%40googlegroups.com.

Christoph Junghans

unread,
Feb 15, 2024, 9:28:07 AMFeb 15
to vo...@googlegroups.com
Actually we have the GMX_EXTRA_CMAKE_ARGS option for that, so you
could do -DGMX_EXTRA_CMAKE_ARGS="-DGMX_CUDA_TARGET_SM=90".

Christoph Junghans

unread,
Feb 15, 2024, 1:20:36 PMFeb 15
to vo...@googlegroups.com
On Thu, Feb 15, 2024 at 9:27 AM Christoph Junghans <jung...@votca.org> wrote:
>
> On Thu, Feb 15, 2024 at 9:10 AM Christoph Junghans <jung...@votca.org> wrote:
> >
> > On Wed, Feb 14, 2024 at 5:20 PM Roozbeh R <rooz...@gmail.com> wrote:
> > >
> > > Hi Christoph,
> > > thank you for the reply.
> > > docker does not work either as i have already tested it for other packages on my system too without success after lots of trials, so i rather not go after it again.
> > >
> > > Re. your question on the failure of Spack , yes it succeeds in installing the dependencies but fails when building VOTCA itself and there is no error message. it just took a long a long time showing "building votca" before it says: KILLED! (tested two times)
> > Can you do a spack install --verbose ... to see what went on just
> > before it's aborting.
> >
> > >
> > > As for the standard method of installing VOTCA, (cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON) , i managed to modify libgromacs.cmake to get read of its earlier complain of not being able to find gmx bin, so now it obviously is possible for cmake to find the location of gmx executable binary, but now after i run cmake i get a new error message:
> > >
> > > "
> > > ...
> > > Found Threads: TRUE
> > > -- Found GROMACS: 2019.6
> > > CMake Error at CMakeLists.txt:136 (message):
> > > Gromacs library was found, but its headers were not. Make sure you have
> > > installed the gromacs-devel package or built gromacs with
> > > -DGMX_INSTALL_LEGACY_API=ON"
> > >
> > > but as i checked DGMX_INSTALL_LEGACY_API=ON option is not supported by gromacsv2019.6 (which is the last gromacs version supporting tabulated potentials) so this option is not applicable and also i compiled my gromacsv2019.6 manually with -DGMXAPI=ON and -DBUILD_SHARED_LIBS=ON which shall suffice. and i don know what gromacs-devel package even is?!
> >
> > CMake is just checking with gmx's version.h exists, see
> > https://github.com/votca/votca/blob/master/CMakeLists.txt#L133
> > Considering you had to modifiy your libgromacs.cmake to find the gmx
> > binary that hints toward an issue in your installation, but let me do
> > a build against gmx-2019.6 myself. (We usually use the "release-2019"
> > branch, which should be the same v2019.6).
Ok I added a build against v2019.6 here:
https://github.com/votca/buildenv/pull/208 +
https://github.com/votca/votca/pull/1109
and it seems to work:
https://github.com/votca/votca/actions/runs/7917977239/job/21615345535?pr=1109

> >
> > >
> > > For the other alternative of making votca to build its own gromacs , i tried:
> > > cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON -GMX_CUDA_TARGET_SM=90 -DBUILD_OWN_GROMACS=ON
> > >
> > > hoping that -DGMX_CUDA_TARGET_SM=90 flag will enable proper installation of gromacs by votca automatically ( it worked when i installed a standalone gromacs2019.6 with cuda support on my machine , so i thought it might work in this case too) but cmake just says :
> > >
> > > "CMake Warning:
> > > Manually-specified variables were not used by the project:
> > >
> > > GMX_CUDA_TARGET_SM
> > > USE_CUDA"
> > >
> > > CMAKE indeed made the makefile with no error, but no wonder when i proceed to build the votca , i got the blow error (at the stage of gromacs automatic build) :
> > >
> > > " nvcc fatal : Unsupported gpu architecture 'compute_30'
> > > CMake Error at gpu_utilstest_cuda_generated_devicetransfers.cu.o.Release.cmake:220 (message):
> > > Error generating
> > > /root/builddir/gromacs/src/Gromacs_build-build/src/gromacs/gpu_utils/tests/CMakeFiles/gpu_utilstest_cuda.dir//./gpu_utilstest_cuda_generated_devicetransfers.cu.o "
> > >
> > > it is not a surprise since it is mandatory to make the gpu structure clear through an appropriate cmake flag like GMX_CUDA_TARGET_SM, for building the older versions of gromacs on machines with new GPU architecture according to gromacs team.
> > >
> > >
> > > Now I think there shall be some subtle easy tuning for cmake to be able to find the gromacs header files it needs in the standard approach(cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DUSE_CUDA=ON). can you help on how to fix it? i mean which headers cmake is trying to find and how to guide it to find them? because gromacsv2019.6 is already working smoothly on my machine and i can run it from any folder. so i do not understand which headers it is missing? kindly please advise.
> > >
> > > also for the 2nd alternative, if one can give right flags to cmake enabling votca building its own gromacs , this shall absolve the issue.so i wonder why -DGMX_CUDA_TARGET_SM=90 does not work?! while it works fine when used as a flag to build gromacsv2019.6 independently. Any idea how to pass this info to cmake?
> > Well, the GMX_CUDA_TARGET_SM is not handover to internal build. Let me
> > think about how we could fit that.
> Actually we have the GMX_EXTRA_CMAKE_ARGS option for that, so you
> could do -DGMX_EXTRA_CMAKE_ARGS="-DGMX_CUDA_TARGET_SM=90".
I made the GMX option more transparent in
https://github.com/votca/votca/pull/1108

Christoph

Roozbeh R

unread,
Feb 16, 2024, 10:48:56 AMFeb 16
to votca
Hi Christoph,
I tried cmake command line:  cmake -B builddir -S votca  -DCMAKE_INSTALL_PREFIX=${prefix}  -DINSTALL_CSGAPPS=ON  -DBUILD_OWN_GROMACS=ON  -DGMX_EXTRA_CMAKE_ARGS="-DGMX_CUDA_TARGET_SM=90"

and next: 
cmake --build builddir --parallel 10

This time ,at the making stage, it apparently could make GMX with no error , but then a new error message erupts :

"
[  4%] Linking CXX shared library libvotca_tools.so
/usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'
/usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [tools/src/libtools/CMakeFiles/votca_tools.dir/build.make:679: tools/src/libtools/libvotca_tools.so.2024] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1564: tools/src/libtools/CMakeFiles/votca_tools.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

"

it seems like a problem linking against fftw3 library , but as the same library is also used for building gromacs (during the same installation process) it is odd. wondering how to get read of the error? (already tried LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libfftw3.a which did not work)

Re. I shall check on running Spack with -verbose flag as you requested and report back the result later.

but for now , do you have any advice on how to resolve the above err?

kind regards,
roozi

Christoph Junghans

unread,
Feb 16, 2024, 11:02:06 AMFeb 16
to vo...@googlegroups.com
On Fri, Feb 16, 2024 at 10:49 AM Roozbeh R <rooz...@gmail.com> wrote:
>
> Hi Christoph,
> I tried cmake command line: cmake -B builddir -S votca -DCMAKE_INSTALL_PREFIX=${prefix} -DINSTALL_CSGAPPS=ON -DBUILD_OWN_GROMACS=ON -DGMX_EXTRA_CMAKE_ARGS="-DGMX_CUDA_TARGET_SM=90"
>
> and next:
> cmake --build builddir --parallel 10
>
> This time ,at the making stage, it apparently could make GMX with no error , but then a new error message erupts :
>
> "
> [ 4%] Linking CXX shared library libvotca_tools.so
> /usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'
> /usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: bad value
> collect2: error: ld returned 1 exit status
> gmake[2]: *** [tools/src/libtools/CMakeFiles/votca_tools.dir/build.make:679: tools/src/libtools/libvotca_tools.so.2024] Error 1
> gmake[1]: *** [CMakeFiles/Makefile2:1564: tools/src/libtools/CMakeFiles/votca_tools.dir/all] Error 2
> gmake: *** [Makefile:146: all] Error 2
> "
>
> it seems like a problem linking against fftw3 library , but as the same library is also used for building gromacs (during the same installation process) it is odd. wondering how to get read of the error? (already tried LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libfftw3.a which did not work)
>
> Re. I shall check on running Spack with -verbose flag as you requested and report back the result later.
>
> but for now , do you have any advice on how to resolve the above err?
You have a static libfftw (.a), but VOTCA needs a shared one (.so).
You can disable using FFTW with -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=ON,
it won't cut down VOTCA functionality much. [Or you could recompile
fftw with --enable-shared.]

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/3014f281-7e6a-48af-b0d6-c6b6d434bd8fn%40googlegroups.com.

Roozbeh R

unread,
Feb 16, 2024, 2:01:29 PMFeb 16
to votca
Dear Christoph,
after recompiling fftw with --enabled-shared flag , finally i could compile and run votca. I shall come back to you regarding spack installation.

best regards,
Riazi
Reply all
Reply to author
Forward
0 new messages