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

libzeep is not able to build #30

Closed rytakahas closed 1 year ago

rytakahas commented 1 year ago

Following building instruction, first libzeep is required, with cmake version 3.26.3 and c++ (conda-forge gcc 12.2.0-19) 12.2.0

I got following errors,

cmake .. -DZEEP_BUILD_TESTS=ON
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: alphafill/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
Using resources compiled with .local/bin/mrc
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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  
-- Found Boost:alphafill/lib/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.70.0")  
CMake Error at CMakeLists.txt:74 (find_package):
  By not providing "Finddate.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "date", but
  CMake did not find one.

  Could not find a package configuration file provided by "date" with any of
  the following names:

    dateConfig.cmake
    date-config.cmake

  Add the installation prefix of "date" to CMAKE_PREFIX_PATH or set
  "date_DIR" to a directory containing one of the above files.  If "date"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!

What is "date" package?

Also, in alphafill

@@ -44,9 +44,9 @@ set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)

 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -lstdc++fs -std=c++17")
 elseif(MSVC)
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 -lstdc++fs -std=c++17")
 endif()

for fliesystem, " -lstdc++fs -std=c++17" these flags are required?

mhekkel commented 1 year ago

As mentioned earlier, date is https://github.com/HowardHinnant/date

And I do not understand your question about the diffs you show for the CMakeLists.txt file.

rytakahas commented 1 year ago

And I do not understand your question about the diffs you show for the CMakeLists.txt file.

my question was CMakeLists.txt in the master, " -lstdc++fs -std=c++17" these flags should be in there?

mhekkel commented 1 year ago

The C++ code in alphafill uses features from C++17. So, yes, the -std=c++17 is required for gnu compilers. However, this flag is added by the cmake command set(CMAKE_CXX_STANDARD 17)

Likewise, the -lstdc++fs flag is required for some gnu compilers and the test to see if this is needed is in the FindFileSytem.cmake script.

You should not have to change the CMakeLists.txt file.