PDB-REDO / alphafill

AlphaFill is an algorithm based on sequence and structure similarity that “transplants” missing compounds to the AlphaFold models. By adding the molecular context to the protein structures, the models can be more easily appreciated in terms of function and structure integrity.
https://alphafill.eu
BSD 2-Clause "Simplified" License
89 stars 16 forks source link

compiling of alphafill fails with "variable CIFPP_SHARE_DIR does not exist" #35

Closed schloegl closed 1 year ago

schloegl commented 1 year ago

I'm trying to install alphafill, and have been able to install all prerequisites into the target $PREFIX/alphafill/2.0.0

$ cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX/alphafill/2.0.0/ -DCMAKE_BUILD_TYPE=Release && make -j4 && make install 

Using resources compiled with $PREFIX/bin/mrc
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.13") 
CMake Error at $PREFIX/eigen/3.4.0/share/eigen3/cmake/Eigen3Config.cmake:14 (message):
  File or directory
  $PREFIX/eigen/3.4.0/share/libcifpp referenced by
  variable CIFPP_SHARE_DIR does not exist !
Call Stack (most recent call first):
  $PREFIX/alphafill/2.0.0/lib/cmake/cifpp/cifppConfig.cmake:39 (set_and_check)
  CMakeLists.txt:102 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/schloegl-src-alphafill-2.0.0-MHDXdKIP/alphafill-2.0.0/build/CMakeFiles/CMakeOutput.log".

It is correct that $PREFIX/eigen/3.4.0/share/libcifpp does not exist, but $PREFIX/alphafill/2.0.0/share/libcifpp does exist in my case. Trying to define
export CIFPP_SHARE_DIR=$PREFIX/alphafill/2.0.0/share/libcifpp or with cmake -DCIFPP_SHARE_DIR=$PREFIX/alphafill/2.0.0/share/libcifpp .... does not help.
Do you have any hints how to fix this ?

mhekkel commented 1 year ago

Given that the error message displays $PREFIX, are you sure that $PREFIX is defined in bash when you run that configure step? I mean, if you type

echo $PREFIX

Does it give you the string $PREFIX or some path defined earlier?

schloegl commented 1 year ago

$PREFIX is just a placeholder, I replaced used it as a replacement of the installpath which is in my case too long to be included here. For the sake of this discussion, you can replace it with any directory name you like.

mhekkel commented 1 year ago

OK. If you are in a hurry, simply create the directory cmake is claiming not to exist. Then run that configure step again. Should do the trick.

The 2.0.0 release of alphafill is not released yet and I'm also currently fixing up libcifpp for a new release, I've seen this problem myself recently and I thought I fixed it but maybe that's still in a development branch on one of my work computers.

mhekkel commented 1 year ago

I was wrong, now I remember.

The problem is caused by an error in FindEigen3.cmake. This config file redefines set_and_check after which it no longer works in the cifppConfig.cmake file. This issue should have been fixed in libcifpp version 5.1.2.

schloegl commented 1 year ago

According to https://github.com/PDB-REDO/alphafill/releases, alphafill/2.0.0 has been released on Jun 1st, libcifpp 5.1.2 has not been released yet, according to https://github.com/PDB-REDO/libcifpp/releases

schloegl commented 1 year ago

I can confirm that libcifpp 5.1.2 fixes the issue, and I was able to install alphafill/2.0.0

sadiogo commented 12 months ago

I have installed libcifpp 5.1.2 and still get this error when trying to install alphafill/2.0.0

CMake Error at /home/sadiogo/libzeep/build/zeep/zeepConfig.cmake:32 (include):
  include could not find requested file:

    /home/sadiogo/libzeep/build/zeep/zeepTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:104 (find_package)

CMake Error at /home/sadiogo/libcifpp/build/cifpp/cifppConfig.cmake:27 (include):
  include could not find requested file:

    /home/sadiogo/libcifpp/build/cifpp/cifppTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:105 (find_package)

CMake Error at /home/sadiogo/libcifpp/build/cifpp/cifppConfig.cmake:11 (message):
  File or directory /home/sadiogo/share/libcifpp referenced by variable
  CIFPP_SHARE_DIR does not exist !
Call Stack (most recent call first):
  /home/sadiogo/libcifpp/build/cifpp/cifppConfig.cmake:32 (set_and_check)
  CMakeLists.txt:105 (find_package)

I managed to overcome the error by creating the share and libcifpp folders. Now I am getting the following error:

CMake Error at /home/sadiogo/libzeep/build/zeep/zeepConfig.cmake:32 (include):
  include could not find requested file:

    /home/sadiogo/libzeep/build/zeep/zeepTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:104 (find_package)

CMake Error at /home/sadiogo/libcifpp/build/cifpp/cifppConfig.cmake:27 (include):
  include could not find requested file:

    /home/sadiogo/libcifpp/build/cifpp/cifppTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:105 (find_package)

I overcame this error by creating the cifppTargets.cmake file (left the content in blank). Now i get:

CMake Error at CMakeLists.txt:176 (target_link_libraries):
  Target "alphafill" links to:

    cifpp::cifpp

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

It should be noted that I had to add the following lines in the CMAKELists.txt files to get the build to this stage:

set(zeep_DIR "/home/sadiogo/libzeep/build/zeep")
set(date_DIR "/home/sadiogo/vcpkg/packages/date_x64-linux/share/date")
set(cifpp_DIR "/home/sadiogo/libcifpp/build/cifpp")

Any suggestions on how to proceed?