Latest IQmol from GitHub refuses to compile

I can successfully configure the IQmol3 repo from GitHub. When attempting to make it, however, I run into the following issue:

Let me know of any useful information about the machine, compilers, etc. I could provide you. Thank you in advance for your help.

I have just successfully checked out the code together with submodules and built it without any issues on Debian 11 with GCC 10.2.1 and cmake 3.18.4. Could you please provide the details of your system and packages?
Could you also provide the exact IQmol version that you are trying to build (git commit number)?
Could you show the compilation log with make VERBOSE=1 ?

  • OS: Ubuntu 18.04 LTS, glibc 2.27
  • cmake: 3.25.2
  • gcc, g++, gfortran 13.1. I tried with 7.5 and had the same issue.
  • git commit: 3750a8793bc51d515941c9aaad79e4051edfd82d

I will upload the configure and make log files shortly.

Original output of configure:

-- The CXX compiler identification is GNU 13.1.0
-- The C compiler identification is GNU 13.1.0
-- The Fortran compiler identification is GNU 13.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
CMake Error at CMakeLists.txt:27 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/juanes/IQmol3/build/CMakeFiles/CMakeOutput.log".
-- May have to manually edit build/CMakeFiles/IQmol.dir/link.txt to fix linking:
   Replace /path/to/libm.a with -lm
ould not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/juanes/IQmol3/build/CMakeFiles/CMakeOutput.log".

Since the default version of Qt for Ubuntu 18.04 seems to be too outdated, I had to install an updated version (5.15.2) and provide the path in the CMakeLists.txt file.

set(CMAKE_PREFIX_PATH "~/Qt/5.15.2/gcc_64/lib/cmake/Qt5")

It seems to configure fine with it.

-- The CXX compiler identification is GNU 13.1.0
-- The C compiler identification is GNU 13.1.0
-- The Fortran compiler identification is GNU 13.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")  
CMake Warning (dev) at modules/libssh2/CMakeLists.txt:40 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for EVP_aes_128_ctr
-- Looking for EVP_aes_128_ctr - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - found
-- Looking for include file sys/uio.h
-- Looking for include file sys/uio.h - found
-- Looking for include file sys/socket.h
-- Looking for include file sys/socket.h - found
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/un.h
-- Looking for include file sys/un.h - found
-- Looking for include file windows.h
-- Looking for include file windows.h - not found
-- Looking for include file ws2tcpip.h
-- Looking for include file ws2tcpip.h - not found
-- Looking for include file winsock2.h
-- Looking for include file winsock2.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for memset_s
-- Looking for memset_s - not found
-- Looking for poll
-- Looking for poll - found
-- Looking for socket
-- Looking for socket - found
-- Looking for select
-- Looking for select - found
-- Looking for inet_addr
-- Looking for inet_addr - found
-- Performing Test HAVE_O_NONBLOCK
-- Performing Test HAVE_O_NONBLOCK - Success
-- Looking for include file arpa/inet.h
-- Looking for include file arpa/inet.h - found
-- Looking for include file netinet/in.h
-- Looking for include file netinet/in.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for _stricmp
-- Looking for _stricmp - not found
-- Looking for _snprintf
-- Looking for _snprintf - not found
-- Looking for __func__
-- Looking for __func__ - found
-- Looking for __FUNCTION__
-- Looking for __FUNCTION__ - found
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/BundleUtilities.cmake:237 (message):
  Policy CMP0080 is not set: BundleUtilities cannot be included at configure
  time.  Run "cmake --help-policy CMP0080" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/BundleUtilities.cmake:246 (_warn_cmp0080)
  modules/libssh2/tests/CMakeLists.txt:39 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- The following features have been enabled:

 * diffie-hellman-group-exchange-sha1, "new" diffie-hellman-group-exchange-sha1 method

-- The following REQUIRED packages have been found:

 * Qt5PrintSupport
 * ZLIB
 * Threads
 * OpenGL
 * Qt5Core
 * Qt5Gui
 * Qt5Widgets
 * Qt5OpenGL
 * Qt5Xml
 * Qt5
 * OpenSSL

-- The following features have been disabled:

 * Shared library, creating libssh2 as a shared library (.so/.dll)
 * Compression, using zlib for compression
 * "none" cipher
 * "none" MAC
 * Logging, Logging of execution with debug trace

CMake Warning (dev) at modules/openmesh/cmake/ACGCompiler.cmake:106 (set):
  implicitly converting 'STRINGLIST' to 'STRING' type.
Call Stack (most recent call first):
  modules/openmesh/cmake/ACGCommon.cmake:131 (include)
  modules/openmesh/CMakeLists.txt:38 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 

e[40;37m************************************************************e[0m
e[40;37m* e[1;31mACG e[0;40;34mBuildsysteme[0me[40;37m                                          *e[0m
e[40;37m*                                                          *e[0m
e[40;37m* Package : e[32mOpenMesh                                 e[37m      *e[0m
e[40;37m* Version : e[32m8.0                                      e[37m      *e[0m
e[40;37m* Type    : e[32mRelease e[37m                                       *e[0m
e[40;37m************************************************************e[0m
CMake Deprecation Warning at modules/openbabel/CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0042 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Using included inchi library.
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.a (found version "2.9.4") 
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS) 
-- Looking for conio.h
-- Looking for conio.h - not found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for rpc/xdr.h
-- Looking for rpc/xdr.h - found
-- Looking for regex.h
-- Looking for regex.h - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for rint
-- Looking for rint - not found
-- Looking for sranddev
-- Looking for sranddev - not found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Check size of clock_t
-- Check size of clock_t - done
-- Performing Test SCANDIR_NEEDS_CONST
-- Performing Test SCANDIR_NEEDS_CONST - Failed
-- Performing Test HAVE_GCC_VISIBILITY
-- Performing Test HAVE_GCC_VISIBILITY - Success
-- Checking available shared pointer...
-- Performing Test HAVE_STD_SHARED_PTR
-- Performing Test HAVE_STD_SHARED_PTR - Success
-- Performing Test HAVE_STD_TR1_SHARED_PTR
-- Performing Test HAVE_STD_TR1_SHARED_PTR - Failed
-- Performing Test HAVE_STD_TR1_SHARED_PTR_IN_TR1_HEADER
-- Performing Test HAVE_STD_TR1_SHARED_PTR_IN_TR1_HEADER - Success
-- Use std::shared_ptr in memory
-- Found Boost: /usr/include (found version "1.65.1") found components: program_options iostreams regex 
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "2.91.0") 
-- Found Boost: /usr/include (found version "1.65.1") found components: filesystem iostreams unit_test_framework system regex 
-- maeparser include dir set as 'maeparser_INCLUDE_DIRS-NOTFOUND'
-- maeparser libraries set as 'maeparser_LIBRARIES-NOTFOUND'
-- Building existing MaeParser 'v1.2.3' source at /home/juanes/IQmol3/modules/openbabel/external/maeparser-v1.2.3.
-- Found Boost: /usr/include (found version "1.65.1") found components: iostreams regex 
-- Using zlib library for iostreams dependency.
-- Maestro formats will be supported. Using MaeParser 'v1.2.3' at /home/juanes/IQmol3/modules/openbabel/external/maeparser-v1.2.3
-- Coordinate generation with Coordgen will NOT be supported. Please install Boost to enable Maestro formats.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Could NOT find RapidJSON (missing: RAPIDJSON_INCLUDE_DIRS) (Required is at least version "1.1.0")
-- JSON formats will be supported. Using RapidJSON 1.1.0 at /home/juanes/IQmol3/modules/openbabel/external/rapidjson-1.1.0/include
-- Checking for module 'cairo'
--   Found cairo, version 1.15.10
-- Found Cairo: /usr/lib/x86_64-linux-gnu/libcairo.a  
-- Cairo found. PNG output will be supported.
-- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.45.0") found components: system 
-- Found Boost: /usr/include (found version "1.65.1") found components: program_options iostreams regex 
-- Looking for getopt
-- Looking for getopt - found
-- GUI will not be built
-- Found PythonInterp: /usr/bin/python (found version "2.7.17") 
CMake Deprecation Warning at modules/openbabel/scripts/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found Boost: /usr/include (found version "1.65.1") found components: iostreams serialization regex 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/juanes/IQmol3/build
-- May have to manually edit build/CMakeFiles/IQmol.dir/link.txt to fix linking:
   Replace /path/to/libm.a with -lm
bility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found Boost: /usr/include (found version "1.65.1") found components: iostreams serialization regex 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/juanes/IQmol3/build

The (non-verbose) output of

make -j16 > make.log 2>&1

(after running it twice) is:

[  1%] Automatic MOC and UIC for target QGLViewer
[  1%] Automatic MOC and UIC for target Fort
[  1%] Built target data_headers
[  1%] Automatic MOC and UIC for target Util
[  1%] Automatic MOC and UIC for target Parser
[  1%] Built target Util_autogen
[  3%] Built target libssh2
[  3%] Built target Parser_autogen
[  3%] Built target QGLViewer_autogen
[  4%] Built target Fort_autogen
[  5%] Built target OpenMeshCoreStatic
[  8%] Built target OpenMeshCore
[ 11%] Built target yaml-cpp
[ 11%] Built target Fort
[ 12%] Built target maeparser
[ 13%] Built target OpenMeshToolsStatic
[ 17%] Built target Util
[ 20%] Built target QGLViewer
[ 20%] Automatic MOC and UIC for target Plot
[ 20%] Automatic MOC and UIC for target Network
[ 20%] Automatic MOC and UIC for target Math
[ 20%] Built target Network_autogen
[ 20%] Built target Plot_autogen
[ 20%] Built target Math_autogen
[ 23%] Built target Network
[ 24%] Built target Math
[ 25%] Built target Plot
[ 27%] Built target Parser
[ 27%] Automatic MOC and UIC for target Data
[ 27%] Built target Data_autogen
[ 51%] Built target openbabel
[ 55%] Built target Data
[ 55%] Automatic MOC and UIC for target Configurator
[ 55%] Built target Configurator_autogen
[ 65%] Built target Configurator
[ 65%] Automatic MOC and UIC for target Layer
[ 65%] Automatic MOC and UIC for target Grid
[ 65%] Built target Grid_autogen
[ 65%] Built target Layer_autogen
[ 69%] Built target Grid
[ 81%] Built target Layer
[ 81%] Automatic MOC and UIC for target Process
[ 81%] Built target Process_autogen
[ 84%] Built target Process
[ 84%] Automatic MOC and UIC for target Viewer
[ 84%] Automatic MOC and UIC for target Qui
[ 84%] Built target Qui_autogen
[ 84%] Built target Viewer_autogen
[ 91%] Built target Qui
[ 96%] Built target Viewer
[ 96%] Automatic MOC and UIC for target Main
[ 96%] Built target Main_autogen
[100%] Built target Main
[100%] Automatic MOC and UIC for target IQmol
[100%] Built target IQmol_autogen
[100%] Linking CXX executable bin/IQmol
/usr/lib/x86_64-linux-gnu/libm-2.27.a(e_atan2.o): In function `__ieee754_atan2_ifunc':
(.text+0x3fe2): undefined reference to `_dl_x86_cpu_features'
/usr/lib/x86_64-linux-gnu/libm-2.27.a(s_atan.o): In function `__atan_ifunc':
(.text+0x20b2): undefined reference to `_dl_x86_cpu_features'
/usr/lib/x86_64-linux-gnu/libm-2.27.a(s_ceil.o): In function `__ceil_ifunc':
(.text+0x2): undefined reference to `_dl_x86_cpu_features'
/usr/lib/x86_64-linux-gnu/libm-2.27.a(s_floor.o): In function `__floor_ifunc':
(.text+0x2): undefined reference to `_dl_x86_cpu_features'
/usr/lib/x86_64-linux-gnu/libm-2.27.a(s_sin.o): In function `__sin_ifunc':
(.text+0x4d42): undefined reference to `_dl_x86_cpu_features'
/usr/lib/x86_64-linux-gnu/libm-2.27.a(s_sin.o):(.text+0x4da2): more undefined references to `_dl_x86_cpu_features' follow
collect2: error: ld returned 1 exit status
CMakeFiles/IQmol.dir/build.make:302: recipe for target 'bin/IQmol' failed
make[2]: *** [bin/IQmol] Error 1
CMakeFiles/Makefile2:906: recipe for target 'CMakeFiles/IQmol.dir/all' failed
make[1]: *** [CMakeFiles/IQmol.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2

I cannot paste the output of the verbose version because it has too many characters but I’d be happy to provide it any other way.

Well, either the advice at the end of configure

-- May have to manually edit build/CMakeFiles/IQmol.dir/link.txt to fix linking:
   Replace /path/to/libm.a with -lm

was not there before or I did not see it, but following it did the job. I now have a working IQmol3 :+1: