Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29725

Jom build/install issue with OpenSSL and ExternalProject_Add

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • Qt Creator 11.0.3
    • Jom
    • None
    • Windows 10
    • Windows

    Description

      I have discovered an issue when using Jom to build OpenSSL using ExternalProject_Add with CMake.

      After OpenSSL finishes building, when Jom is invoked to perform the install step, there still seems to be handles open to other files (specifically what seems to be temporary makefiles)

      E.g. Trying to rename makefile-25040 -> makefile: Permission denied

      This can be reproduced with the CMakeLists.txt file below:

      cmake_minimum_required(VERSION 3.22)

      project(jom-repro)

      include(ExternalProject)
      include(ProcessorCount)

      ProcessorCount(CPU_COUNT)

      ExternalProject_Add(
        openssl
        GIT_REPOSITORY https://github.com/openssl/openssl.git
        GIT_TAG openssl-3.2.0-alpha2
        GIT_SHALLOW ON
        UPDATE_COMMAND ""
        BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openssl/build
        CONFIGURE_COMMAND perl <SOURCE_DIR>/Configure no-docs no-tests no-legacy /FS
                          --prefix=${CMAKE_CURRENT_BINARY_DIR} --openssldir=ssl
        BUILD_COMMAND jom -j ${CPU_COUNT}
        INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}
        INSTALL_COMMAND jom install_sw)

      With this CMakeLists.txt file in a new directory, simply run:

      cmake -B build

      cmake --build build

      And see the error occur:

      [3/4] Performing install step for 'openssl'
      FAILED: openssl-prefix/src/openssl-stamp/openssl-install C:/.../jom-repro/build/openssl-prefix/src/openssl-stamp/openssl-install
      cmd.exe /C "cd /D C:\...\jom-repro\build\openssl\build && jom install_sw && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/.../jom-repro/build/openssl-prefix/src/openssl-stamp/openssl-install"

      jom 1.1.4 - empower your cores

              C:\...\jom_1_1_4\jom.exe / depend
              C:\...\jom_1_1_4\jom.exe / depend
      Trying to rename makefile-25040 -> makefile: Permission denied
      jom: C:\...\jom-repro\build\openssl\build\Makefile [depend] Error 13
              C:\...\jom_1_1_4\jom.exe / depend
              C:\...\jom_1_1_4\jom.exe / _build_libs
              C:\...\jom_1_1_4\jom.exe / _build_modules
      jom: C:\...\jom-repro\build\openssl\build\Makefile [build_programs] Error 2
      ninja: build stopped: subcommand failed.

      The reason I am reporting this here and not to OpenSSL is this above works as expected if using nmake, it just takes a lot longer. If I run the build command a second time, it succeeds.

      Update: One workaround for this is simply to use nmake in the install command, but it feels like jom should work and that this bug is maybe a symptom of something more serious potentially? It isn't a huge deal but I just wanted to mention it in case. Thanks!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            tom_h_h Tom Hulton-Harrop
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes