Home   Manual

Cmake compilation error for installing avogadro

Dear all,

I am trying to install Avogadro in my centos 7 system. The cmake command I give is:

cmake … -DCMAKE_INSTALL_PREFIX=/home/sunyp/software/avogadro/avogadro-1.2.0-install -DEIGEN3_INCLUDE_DIR=/home/sunyp/software/Eigen/eigen-3.3.7-install/include/eigen3

I get the following error:

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

Do you know how to correct this error?

Best regards

Arthur

I think we’d need to know much more about your setup. The path in the error looks very strange - with extra slashes. You also list in your cmake call. Can you post the whole message as an attachment or via pastebin?

The whole output information of cmake is:

– The C compiler identification is GNU 4.8.5
– The CXX compiler identification is GNU 4.8.5
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– The build type is RelWithDebInfo
– Performing Test HAVE_NO_RTTI
– Performing Test HAVE_NO_RTTI - Success
– Performing Test HAVE_RTTI
– Performing Test HAVE_RTTI - Success
– Performing Test HAVE_GCC_VISIBILITY
– Performing Test HAVE_GCC_VISIBILITY - Success
– Performing Test COMPILES_WITHOUT_FPERMISSIVE
– Performing Test COMPILES_WITHOUT_FPERMISSIVE - Failed
– Looking for Q_WS_X11
– Looking for Q_WS_X11 - found
– Looking for Q_WS_WIN
– Looking for Q_WS_WIN - not found
– Looking for Q_WS_QWS
– Looking for Q_WS_QWS - not found
– Looking for Q_WS_MAC
– Looking for Q_WS_MAC - not found
– Found Qt4: /usr/bin/qmake-qt4 (found suitable version “4.8.7”, minimum required is “4.6.0”)
CMake Warning (dev) at /usr/local/share/cmake-3.15/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:229 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found OpenGL: /usr/lib64/libOpenGL.so
– Found X11: /usr/include
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found lupdate: /usr/bin/lupdate-qt4
– Found lrelease: /usr/bin/lrelease-qt4
– Found lconvert: /home/sunyp/software/build/anaconda3/bin/lconvert
– 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’
– Found openbabel-2.0, version 2.4.1
– Found OpenBabel 2.3 or later: openbabel
– Found OpenBabel2 executable: /home/sunyp/software/build/openbabel/bin/babel
– Found Git revision is:
– Building released version.
– Searching for python dependencies…
– [1/5] Boost Python
– Could NOT find Boost (missing: Boost_INCLUDE_DIR python)
– Boost Python NOT found - Python support disabled.
CMake Warning at CMakeLists.txt:284 (message):
Not all python dependencies are found - Python support disabled

– Threaded OpenGL rendering not enabled
– RPath support enabled for installed binaries and libraries
CMake Error: failed to create symbolic link ‘/home/sunyp/software/avogadro/avogadro-1.2.0/build/libavogadro/include/avogadro//home/sunyp/software/avogadro/avogadro-1.2.0/build/libavogadro/src/config.h’: no such file or directory
– Found Qt4: /usr/bin/qmake-qt4 (found suitable version “4.8.7”, minimum required is “4.6”)
– Linking in static plugins: bsdyengine;navigatetool;elementcolor
– Found Doxygen: /usr/bin/doxygen (found version “1.8.5”) found components: doxygen missing components: dot
– docbook tools not found, doc targets disabled
– Configuring done
CMake Warning (dev) in libavogadro/src/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run “cmake --help-policy CMP0022” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Target “avogadro” has an INTERFACE_LINK_LIBRARIES property which differs
from its LINK_INTERFACE_LIBRARIES properties.

INTERFACE_LINK_LIBRARIES:

openbabel;$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib64/libQtOpenGL.so>;$<$<CONFIG:DEBUG>:/usr/lib64/libQtOpenGL_debug.so>;$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib64/libQtGui.so>;$<$<CONFIG:DEBUG>:/usr/lib64/libQtGui_debug.so>;$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib64/libQtCore.so>;$<$<CONFIG:DEBUG>:/usr/lib64/libQtCore_debug.so>;/usr/lib64/libGL.so;/usr/lib64/libGLU.so;bsdyengine;navigatetool;elementcolor

LINK_INTERFACE_LIBRARIES:

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in libavogadro/src/extensions/surfaces/openqube/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run “cmake --help-policy CMP0022” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Target “OpenQube” has an INTERFACE_LINK_LIBRARIES property which differs
from its LINK_INTERFACE_LIBRARIES properties.

INTERFACE_LINK_LIBRARIES:

$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib64/libQtCore.so>;$<$<CONFIG:DEBUG>:/usr/lib64/libQtCore_debug.so>;$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib64/libQtGui.so>;$<$<CONFIG:DEBUG>:/usr/lib64/libQtGui_debug.so>

LINK_INTERFACE_LIBRARIES:

This warning is for project developers. Use -Wno-dev to suppress it.

– Generating done
– Build files have been written to: /home/sunyp/software/avogadro/avogadro-1.2.0/build

Even with this “cannot find config.h” error, I can successfully run “make” and “make install” and install the avogadro. But when I try to launch avogadro by run “./avogadro” in the bin directory, I get:

“./avogadro: symbol lookup error: /usr/lib64/libQtOpenGL.so.4: undefined symbol: qt_x11Data”;

And “./qube” gives:

./qube: symbol lookup error: /usr/lib64/libQtOpenGL.so.4: undefined symbol: _ZN7QWidget8x11EventEP7_XEvent

How to deal with all these problem?
Thank you.

As I replied in your other thread this isn’t an Avogadro problem - there’s clearly something missing either with your Qt4 packages or how Qt4 is linked to X11.

Your best bet is to make sure your Qt4 packages are installed correctly IMHO.