The following is the error I got while trying to cmake --build .. I am following steps given in Build - wiki.openchemistry.org.
I am using ubuntu 20.04 LTS.
`CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SPGLIB_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
used as include directory in directory /home/jhalak/Desktop/Gsoc/openchemistry/avogadrolibs/avogadro/core
– Configuring incomplete, errors occurred!
See also “/home/jhalak/Desktop/Gsoc/openchemistry-build/avogadrolibs/CMakeFiles/CMakeOutput.log”.
See also “/home/jhalak/Desktop/Gsoc/openchemistry-build/avogadrolibs/CMakeFiles/CMakeError.log”.
make[2]: *** [CMakeFiles/avogadrolibs.dir/build.make:115: avogadrolibs-prefix/src/avogadrolibs-stamp/avogadrolibs-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:149: CMakeFiles/avogadrolibs.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
`
Please let me know how to resolve this.
Thanks in advance.
I have recently encountered this problem on 2 machines with Ubuntu 20 and version of installation from some month ago (1.93.0-2-gf4e4606). My solution was:
copy the source (src directory) to the directory resulting from avogadro2 build: openchemistry/avogadrolibs/avogadro/core/ and rename that directory to spglib
edit file CMakeLists.txt in the same directory and set the SPGLIB_INCLUDE_DIR variable (using the full path to the same directory in which this CMakeLists.txt file is located), i.e., change from: