# avogadro compilation problem

**URL:** <https://discuss.avogadro.cc/t/avogadro-compilation-problem/2946>\
**Category:** General Discussion\
**Created:** [June 30, 2019, 10:39am UTC](https://discuss.avogadro.cc/t/avogadro-compilation-problem/2946 "2019-06-30T10:39:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sun\_Yeping](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/sun_yeping/32/512_2.png) [@Sun\_Yeping](https://discuss.avogadro.cc/u/Sun_Yeping)\
**Post date:** [June 30, 2019, 10:39am UTC](https://discuss.avogadro.cc/t/avogadro-compilation-problem/2946/1 "2019-06-30T10:39:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [July 2, 2019, 7:05pm UTC](https://discuss.avogadro.cc/t/avogadro-compilation-problem/2946/2 "2019-07-02T19:05:41Z")

</div>

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.
