avogadro compilation problem

Dear all,

I am trying to comple avogadro-1.2.0 on my centos system. I follow the guide in th INSTALL file in the avogadro-1.2.0 source directory and input the following command:

mkdir build
cd build
cmake …/

and get the following errors:

– The build type is RelWithDebInfo
CMake Warning (dev) at /home/sunyp/software/build/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FindOpenGL.cmake:275 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run “cmake --help-policy CMP0072” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib64/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so

OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
CMakeLists.txt:227 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found lupdate: /usr/bin/lupdate-qt4
– Found lrelease: /usr/bin/lrelease-qt4
– Found lconvert: /usr/bin/lconvert
– Checking for module ‘openbabel-2.0>=2.3.0’
– No package ‘openbabel-2.0’ 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 “/home/sunyp/software/build/avogadro-1.2.0/build/CMakeFiles/CMakeOutput.log”.
See also “/home/sunyp/software/build/avogadro-1.2.0/build/CMakeFiles/CMakeError.log”.

This suggests that openbabel-2.0 cannot be found. So I define the location of the pkgconfig which contains the openbabel-2.0.pc file:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

The time I get the following error:

CMake Error: failed to create symbolic link ‘/home/sunyp/software/build/avogadro-1.2.0/build/libavogadro/include/avogadro//home/sunyp/software/build/avogadro-1.2.0/build/libavogadro/src/config.h’: no such file or directory

So how should I deal with such a problem? With many thanks.

Best regards,
Yeping Sun

When you started cmake what did you set as your prefix / build prefix?

If you can attach your CMakeCache.txt file that would be helpful. There’s something very weird in the message you just posted - the path to config.h obviously shouldn’t have duplicated directory paths.