Bug 2240311 - cmake-3.27.4-7 breaks configuration - CMake can not determine linker language for target
Summary: cmake-3.27.4-7 breaks configuration - CMake can not determine linker language...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cmake
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Björn 'besser82' Esser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F39FinalFreezeException 2238263
TreeView+ depends on / blocked
 
Reported: 2023-09-23 02:42 UTC by Orion Poplawski
Modified: 2023-10-10 22:15 UTC (History)
8 users (show)

Fixed In Version: cmake-3.27.6-1.fc40 cmake-3.27.6-1.fc38 cmake-3.27.7-1.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-10 22:15:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2023-09-23 02:42:36 UTC
I've submitted dbcsr for review and it had been building fine.  But with the jump from 3.27.4-6 to -7 it fails with:

-- FYPP preprocessor found.
-- Configuring done (5.5s)
CMake Error: CMake can not determine linker language for target: fypp_DBCSR_FORTRAN_SRCS
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:
    CMAKE_INSTALL_DO_STRIP
    INCLUDE_INSTALL_DIR
    LIB_INSTALL_DIR
    LIB_SUFFIX
    SHARE_INSTALL_PREFIX
    SYSCONF_INSTALL_DIR
CMake Generate step failed.  Build files cannot be regenerated correctly.
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.GET0PH (%build)
    Bad exit status from /var/tmp/rpm-tmp.GET0PH (%build)
Child return code was: 1

Review is here: https://bugzilla.redhat.com/show_bug.cgi?id=2238263

Spec URL: https://orion.fedorapeople.org/dbcsr.spec
SRPM URL: https://orion.fedorapeople.org/dbcsr-2.6.0-1.fc40.src.rpm

I'm not sure it this is a regression or more strict behavior by cmake.  Unclear why the custom target needs a linker.

function (ADD_FYPP_SOURCES OUTVAR)
  set(outfiles)

  foreach (f ${ARGN})
    # first we might need to make the input file absolute
    get_filename_component(f "${f}" ABSOLUTE)
    get_filename_component(ext "${f}" EXT)
    # get the relative path of the file to the current source dir
    file(RELATIVE_PATH rf "${CMAKE_CURRENT_SOURCE_DIR}" "${f}")
    # set the output filename of fypped sources
    set(of "${CMAKE_CURRENT_BINARY_DIR}/${rf}")

    # create the output directory if it doesn't exist
    get_filename_component(d "${of}" PATH)
    if (NOT IS_DIRECTORY "${d}")
      file(MAKE_DIRECTORY "${d}")
    endif ()

    if ("${f}" MATCHES ".F$")
      # append the output file to the list of outputs
      list(APPEND outfiles "${of}")
      # now add the custom command to generate the output file
      add_custom_command(
        OUTPUT "${of}"
        COMMAND ${Python_EXECUTABLE} ${FYPP_EXECUTABLE} ARGS ${fypp_flags}
                "${f}" "${of}"
        MAIN_DEPENDENCY "${f}"
        VERBATIM)
    elseif ("${f}" MATCHES ".h$")
      # append the output file to the list of outputs
      list(APPEND outfiles "${of}")
      # now add the custom command to generate the output file
      add_custom_command(
        OUTPUT "${of}"
        COMMAND ${Python_EXECUTABLE} ${FYPP_EXECUTABLE} ARGS "-F" "${f}" "${of}"
        DEPENDS "${f}")
    else ()
      configure_file("${f}" "${of}" COPYONLY)
    endif ()
  endforeach ()

  # build a custom target to fypp seperately (required for example by the doc
  # target)
  add_custom_target("fypp_${OUTVAR}" DEPENDS ${outfiles})
  add_dependencies(fypp "fypp_${OUTVAR}")

  # set the output list in the calling scope
  set(${OUTVAR}
      ${outfiles}
      PARENT_SCOPE)
endfunction ()

Reproducible: Always

Comment 1 Orion Poplawski 2023-09-23 02:48:32 UTC
Upstream issue with fix: https://gitlab.kitware.com/cmake/cmake/-/issues/25252

Comment 2 Dominik 'Rathann' Mierzejewski 2023-09-23 08:33:03 UTC
FYI, link to the MR fixing this: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8814

Comment 3 Fedora Update System 2023-09-27 21:55:50 UTC
FEDORA-2023-d836537730 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d836537730

Comment 4 Fedora Update System 2023-09-27 22:26:31 UTC
FEDORA-2023-c6982072ca has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c6982072ca

Comment 5 Fedora Update System 2023-09-27 22:37:42 UTC
FEDORA-2023-52a0129614 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-52a0129614

Comment 6 Fedora Update System 2023-09-27 23:25:47 UTC
FEDORA-2023-d836537730 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2023-09-27 23:30:43 UTC
FEDORA-2023-6ef8830f85 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6ef8830f85

Comment 8 Fedora Update System 2023-09-28 01:31:46 UTC
FEDORA-2023-52a0129614 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-52a0129614`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-52a0129614

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-09-28 02:05:54 UTC
FEDORA-2023-6ef8830f85 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-6ef8830f85`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6ef8830f85

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-09-28 20:17:43 UTC
FEDORA-2023-c6982072ca has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c6982072ca`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c6982072ca

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-09-29 01:28:07 UTC
FEDORA-2023-6ef8830f85 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2023-10-08 01:22:05 UTC
FEDORA-2023-c9bc846f11 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c9bc846f11`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c9bc846f11

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-10-08 01:31:29 UTC
FEDORA-2023-bbf0e382b2 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bbf0e382b2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bbf0e382b2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Björn 'besser82' Esser 2023-10-09 09:13:34 UTC
Reopening, as F39 is also affected.

Comment 15 Fedora Blocker Bugs Application 2023-10-09 09:14:01 UTC
Proposed as a Freeze Exception for 39-final by Fedora user besser82 using the blocker tracking app because:

 cmake 3.27.4-7, which is currently in the f39 stable repo, breaks linking when compiling Fortran sources.  We shouldn't ship a broken package for release, so I'm proposing this as a freeze exception.  There is an update (https://bodhi.fedoraproject.org/updates/FEDORA-2023-c9bc846f11) to cmake-3.27.7-1.fc39 which is a known to work version, that should be shipped in the frozen base repo for release instead.

Comment 16 Geoffrey Marr 2023-10-09 17:58:06 UTC
Discussed during the 2023-10-09 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedFreezeException (Final)" was made as it is a noticeable issue that cannot be fixed with an update.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2023-10-09/f39-blocker-review.2023-10-09-16.00.txt

Comment 17 Fedora Update System 2023-10-10 22:15:59 UTC
FEDORA-2023-c9bc846f11 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.