Home   Manual

Trouble installing avogadro on centos7


#1

I have looked all over for a solution to this but can’t seem to find anything. I am trying to install avogadro on CentOS7, however every time I go into the build directory and type ‘cmake …/’ i get the following error:

– Found lrelease: /usr/bin/lrelease-qt4
– Found lconvert: /usr/bin/lconvert
– Found Eigen3: /usr/include/eigen3 (Required is at least version “2.91.0”)
– Found ZLIB: /usr/lib64/libz.so (found version “1.2.7”)
– Found PkgConfig: /usr/bin/pkg-config (found version “0.27.1”)
– checking for module ‘openbabel-2.0>=2.3.0’
– package ‘openbabel-2.0>=2.3.0’ not found
CMake Error at cmake/modules/FindOpenBabel2.cmake:69 (message):
Could NOT find OpenBabel 2.3 or later
Call Stack (most recent call first):
CMakeLists.txt:244 (find_package)

– Configuring incomplete, errors occurred!
See also “/usr/app/avogadro-1.2.0/build/CMakeFiles/CMakeOutput.log”.
See also “/usr/app/avogadro-1.2.0/build/CMakeFiles/CMakeError.log”.

This continues to happen despite the fact I have installed openbabel-2.3. Any ideas?


#2

As indicated in the instructions, you can set flags when calling cmake:

cmake -DOPENBABEL2_INCLUDE_DIR=$HOME/src/openbabel/include \ -DOPENBABEL2_LIBRARIES=$HOME/src/openbabel/src/.libs/libopenbabel.so \ -DOPENBABEL2_VERSION_MET=true


#3

Thanks, ghutchis. I did as you described and was able to run cmake. However now when I run “make -j2” I get the following error:

[ 0%] [ 0%] Building CXX object libavogadro/src/colors/CMakeFiles/elementcolor.dir/elementcolor.cpp.o
Building CXX object libavogadro/src/engines/CMakeFiles/bsdyengine.dir/bsdyengine.cpp.o
In file included from /usr/include/eigen3/Eigen/Core:373:0,
from /usr/app/avogadro-1.2.0/build/libavogadro/include/avogadro/primitive.h:36,
from /usr/app/avogadro-1.2.0/libavogadro/src/colors/elementcolor.cpp:27:
/usr/include/eigen3/Eigen/Eigen2Support:20:2: warning: #warning is a GCC extension [enabled by default]
#warning “Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)”
^
/usr/include/eigen3/Eigen/Eigen2Support:20:2: warning: #warning “Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)” [-Wcpp]
In file included from /usr/app/avogadro-1.2.0/libavogadro/src/colors/elementcolor.cpp:31:0:
/bin/openbabel-2.3/include/openbabel/mol.h:25:35: fatal error: openbabel/babelconfig.h: No such file or directory
#include <openbabel/babelconfig.h>
^
compilation terminated.
In file included from /usr/include/eigen3/Eigen/Core:373:0,
from /usr/app/avogadro-1.2.0/build/libavogadro/include/avogadro/primitive.h:36,
from /usr/app/avogadro-1.2.0/build/libavogadro/include/avogadro/primitivelist.h:29,
from /usr/app/avogadro-1.2.0/build/libavogadro/include/avogadro/engine.h:37,
from /usr/app/avogadro-1.2.0/libavogadro/src/engines/bsdyengine.h:29,
from /usr/app/avogadro-1.2.0/libavogadro/src/engines/bsdyengine.cpp:25:
/usr/include/eigen3/Eigen/Eigen2Support:20:2: warning: #warning is a GCC extension [enabled by default]
#warning “Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)”
^
/usr/include/eigen3/Eigen/Eigen2Support:20:2: warning: #warning “Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)” [-Wcpp]
In file included from /usr/app/avogadro-1.2.0/libavogadro/src/engines/bsdyengine.cpp:39:0:
/bin/openbabel-2.3/include/openbabel/mol.h:25:35: fatal error: openbabel/babelconfig.h: No such file or directory
#include <openbabel/babelconfig.h>
^
compilation terminated.
make[2]: *** [libavogadro/src/colors/CMakeFiles/elementcolor.dir/elementcolor.cpp.o] Error 1
make[1]: *** [libavogadro/src/colors/CMakeFiles/elementcolor.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
make[2]: *** [libavogadro/src/engines/CMakeFiles/bsdyengine.dir/bsdyengine.cpp.o] Error 1
make[1]: *** [libavogadro/src/engines/CMakeFiles/bsdyengine.dir/all] Error 2
make: *** [all] Error 2

Do you have any recommendations to proceed?

Thanks!


#4

How did you install Open Babel? It’s clearly missing the babelconfig.h header that’s installed by default.