Cmake buildup of fresh repos failes on WSL Ubuntu 24.04.2

Dear experts,

I have Windows11-WSL, Ubuntu 24.04.2 LTS

I installed almost all Ubuntu packages, but I got this buildup error. Please help.

miroi@MIRO:~/work/software/avogadro2/cloned/.cmake -DQT_VERSION=5 -DBUILD_MOLEQUEUE=OFF -S ./openchemistry -B ./build
-- The CXX compiler identification is GNU 13.3.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
-- Setting build type to 'Debug' as none was specified.
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.14")
-- Configuring done (4.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/miroi/work/software/avogadro2/cloned/build
miroi@MIRO:~/work/software/avogadro2/cloned/.cd build/
miroi@MIRO:~/work/software/avogadro2/cloned/build/.m -j6
[  1%] Creating directories for 'libarchive'
[  4%] Creating directories for 'eigen'
[  4%] Creating directories for 'glew'
[  6%] Creating directories for 'spglib'
[  7%] Creating directories for 'openbabel'
[  9%] Creating directories for 'libmsym'
[ 10%] Performing download step (download, verify and extract) for 'eigen'
[ 12%] Performing download step (download, verify and extract) for 'openbabel'
[ 13%] Performing download step (download, verify and extract) for 'libarchive'
[ 15%] Performing download step (download, verify and extract) for 'glew'
[ 16%] Performing download step (download, verify and extract) for 'libmsym'
[ 18%] Performing download step (download, verify and extract) for 'spglib'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/eigen-3.4.0.tar.gz'
   timeout='none'
   inactivity timeout='none'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/32cf131444c1555c749b356dab44fb9fe275271f.tar.gz'
   timeout='none'
-- Using src='https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz'
   inactivity timeout='none'
-- Using src='https://github.com/openbabel/openbabel/archive/32cf131444c1555c749b356dab44fb9fe275271f.tar.gz'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/v3.7.7.tar.gz'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/libarchive/libarchive/archive/v3.7.7.tar.gz'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/glew-2.2.0.tgz'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/85e47232376a8e735c2a7b5283f40b59b3953db1.tar.gz'
   timeout='none'
-- Downloading...
   dst='/home/miroi/work/software/avogadro2/cloned/build/Downloads/v2.5.0.tar.gz'
   timeout='none'
   inactivity timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/spglib/spglib/archive/v2.5.0.tar.gz'
-- Using src='https://github.com/mcodev31/libmsym/archive/85e47232376a8e735c2a7b5283f40b59b3953db1.tar.gz'
-- verifying file...
       file='/home/miroi/work/software/avogadro2/cloned/build/Downloads/eigen-3.4.0.tar.gz'
-- Downloading... done
-- extracting...
     src='/home/miroi/work/software/avogadro2/cloned/build/Downloads/eigen-3.4.0.tar.gz'
     dst='/home/miroi/work/software/avogadro2/cloned/build/thirdparty/eigen-prefix/src/eigen'
-- extracting... [tar xf]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 20%] No update step for 'eigen'
[ 21%] No patch step for 'eigen'
[ 23%] Performing configure step for 'eigen'
loading initial cache file /home/miroi/work/software/avogadro2/cloned/build/thirdparty/eigen-prefix/tmp/eigen-cache-Debug.cmake
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- verifying file...
       file='/home/miroi/work/software/avogadro2/cloned/build/Downloads/85e47232376a8e735c2a7b5283f40b59b3953db1.tar.gz'
-- Downloading... done
-- extracting...
     src='/home/miroi/work/software/avogadro2/cloned/build/Downloads/85e47232376a8e735c2a7b5283f40b59b3953db1.tar.gz'
     dst='/home/miroi/work/software/avogadro2/cloned/build/thirdparty/libmsym-0.2.3-paper'
-- extracting... [tar xf]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
.
.

-- Checking support for ARCHIVE_CRYPTO_MD5_LIBC
-- Checking support for ARCHIVE_CRYPTO_MD5_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_RMD160_LIBC
-- Checking support for ARCHIVE_CRYPTO_RMD160_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBC
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC2
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC2 -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC2
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC2 -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC2
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC2 -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC3
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBC3 -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC3
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBC3 -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC3
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBC3 -- not found
-- Checking support for ARCHIVE_CRYPTO_MD5_LIBSYSTEM
-- Checking support for ARCHIVE_CRYPTO_MD5_LIBSYSTEM -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBSYSTEM
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBSYSTEM -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBSYSTEM
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBSYSTEM -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBSYSTEM
-- Checking support for ARCHIVE_CRYPTO_SHA384_LIBSYSTEM -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBSYSTEM
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBSYSTEM -- not found
-- Checking support for ARCHIVE_CRYPTO_MD5_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_MD5_OPENSSL -- found
-- Checking support for ARCHIVE_CRYPTO_RMD160_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_RMD160_OPENSSL -- found
-- Checking support for ARCHIVE_CRYPTO_SHA1_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_SHA1_OPENSSL -- found
-- Checking support for ARCHIVE_CRYPTO_SHA256_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_SHA256_OPENSSL -- found
-- Checking support for ARCHIVE_CRYPTO_SHA384_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_SHA384_OPENSSL -- found
-- Checking support for ARCHIVE_CRYPTO_SHA512_OPENSSL
-- Checking support for ARCHIVE_CRYPTO_SHA512_OPENSSL -- found
-- Performing Test HAVE_VISIBILITY_ATTR
-- Performing Test HAVE_VISIBILITY_ATTR - Success
-- Generating /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive/test/list.h
-- Generating /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cat/test/list.h
-- Generating /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/tar/test/list.h
-- Generating /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cpio/test/list.h
-- Generating /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/unzip/test/list.h
-- Configuring done (50.5s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ACL_LIBRARY
    linked by target "archive_static" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive
    linked by target "archive" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive
    linked by target "libarchive_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive/test
    linked by target "bsdcat" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cat
    linked by target "bsdcat_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cat/test
    linked by target "bsdtar" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/tar
    linked by target "bsdtar_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/tar/test
    linked by target "bsdcpio" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cpio
    linked by target "bsdcpio_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cpio/test
    linked by target "bsdunzip" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/unzip
    linked by target "bsdunzip_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/unzip/test

-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
make[2]: *** [thirdparty/CMakeFiles/libarchive.dir/build.make:92: thirdparty/libarchive-prefix/src/libarchive-stamp/libarchive-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:199: thirdparty/CMakeFiles/libarchive.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
miroi@MIRO:~/work/software/avogadro2/cloned/bui

That’s a new one. Looks like you’d want to specify -DENABLE_ACL=OFF

Looks like it might also be https://launchpad.net/ubuntu/+source/acl

Problem with ENABLE_ACL var:

miroi@MIRO:~/work/software/avogadro2/cloned/.cmake -DQT_VERSION=5 -DBUILD_MOLEQUEUE=OFF  -DENABLE_ACL=OFF  -S ./openchemistry -B ./build
-- The CXX compiler identification is GNU 13.3.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
-- Setting build type to 'Debug' as none was specified.
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.14")
-- Configuring done (3.7s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_ACL


-- Build files have been written to: /home/miroi/work/software/avogadro2/cloned/build

Right, it’s the libarchive that uses that flag. You can also install apt-get install libarchive-dev and then ccmake . to set USE_SYSTEM_LIBARCHIVE for openchemistry

Got other errors, but will play with that…

miroi@MIRO:~/work/software/avogadro2/cloned/build/.m -j4 all
[  8%] Performing configure step for 'glew'
[  8%] Performing configure step for 'libarchive'
[ 17%] Built target libmsym
[ 31%] Built target eigen
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


[ 45%] Built target spglib
CMake Error at /usr/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
  Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-4.1/Modules/FindOpenGL.cmake:579 (find_package_handle_standard_args)
  CMakeLists.txt:19 (find_package)


-- Configuring incomplete, errors occurred!
make[2]: *** [thirdparty/CMakeFiles/glew.dir/build.make:92: thirdparty/glew-prefix/src/glew-stamp/glew-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:260: thirdparty/CMakeFiles/glew.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found suitable version "1.3", minimum required is "1.2.1")
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES) (found version "1.0.8")
-- Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.4.5")
-- Extended attributes support: Linux
-- ACL support: libacl (POSIX.1e)
-- Checking support for ARCHIVE_CRYPTO_MD5_LIBMD
-- Checking support for ARCHIVE_CRYPTO_MD5_LIBMD -- not found
-- Checking support for ARCHIVE_CRYPTO_RMD160_LIBMD
-- Checking support for ARCHIVE_CRYPTO_RMD160_LIBMD -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBMD
-- Checking support for ARCHIVE_CRYPTO_SHA1_LIBMD -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBMD
-- Checking support for ARCHIVE_CRYPTO_SHA256_LIBMD -- not found
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBMD
-- Checking support for ARCHIVE_CRYPTO_SHA512_LIBMD -- not found
-- Configuring done (6.0s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ACL_LIBRARY
    linked by target "archive_static" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive
    linked by target "archive" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive
    linked by target "libarchive_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/libarchive/test
    linked by target "bsdcat" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cat
    linked by target "bsdcat_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cat/test
    linked by target "bsdtar" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/tar
    linked by target "bsdtar_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/tar/test
    linked by target "bsdcpio" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cpio
    linked by target "bsdcpio_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/cpio/test
    linked by target "bsdunzip" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/unzip
    linked by target "bsdunzip_test" in directory /home/miroi/work/software/avogadro2/cloned/build/thirdparty/libarchive-src/unzip/test

-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
make[2]: *** [thirdparty/CMakeFiles/libarchive.dir/build.make:92: thirdparty/libarchive-prefix/src/libarchive-stamp/libarchive-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:196: thirdparty/CMakeFiles/libarchive.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

As noted on Building Source Code — Avogadro 1.100.0 documentation

apt-get install glu-dev # which is probably libglu1-mesa-dev

Although I have the package

apt-get install libarchive-dev

still I get the error

CMake Error at thirdparty/CMakeLists.txt:26 (find_package):
   By not providing "FindLIBARCHIVE.cmake" in CMAKE_MODULE_PATH this project
   has asked CMake to find a package configuration file provided by
   "LIBARCHIVE", but CMake did not find one.

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

     LIBARCHIVEConfig.cmake
     libarchive-config.cmake

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

 Configuring incomplete, errors occurred!

I don’t know because I don’t have access to your system to work through things.

My guess is that thirdparty/CMakeLists.txt should reference find_package(LibArchive) (note the difference in capitalization)