Description of problem: CMake 3.22 forces an installation libdir of lib/ instead of lib64/ when the system has a conda environment installed Version-Release number of selected component (if applicable):CMake 3.22 How reproducible: 100% Steps to Reproduce: 1. Stock, updated F35 install updated to have at least CMake version 3.22 and a conda build environment both installed 2. rpkg or rpmbuild any cmake-driven package build from SRPM, eg, Coin4-devel Actual results: CMake forces installation to usr/lib/ rather than usr/lib64, build fails in files check Expected results CMake 3.21 and earlier install in the correct /usr/lib64 location and succeed. Additional info: Also filed upstream at https://gitlab.kitware.com/cmake/cmake/-/issues/22962 Edited text from that report: CMake commit ecaca8c1, now released in CMake 3.22.0, breaks builds on F35 and probably all other RedHat platforms. The problem has a few interacting components, some of which preexist the visible breakage: RH dev and build machines normally have the 'conda' build environment installed and set up for use. That means the various CONDA_XXX environment vars are always present in the shell environment, even on containerized 'clean' builds, whether building in the conda environment or not. This has ~always been the case AFAIK. CMake has always treated the mere presence of the ENV{CONDA_XXXX} vars as indicating we're building with conda, whether we are or not. This is pre-existing breakage, and __system_type_for_install gets set to "conda" in GNUInstallDirs.cmake. Although CMkae has always made this error, it has not been visible until... ecaca8c1 changed: diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index ead55ca1d8..1b9cfce258 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake [...] @@ -251,7 +277,8 @@ set(__LAST_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") endif() endif() - else() # not debian, rely on CMAKE_SIZEOF_VOID_P: + elseif(NOT DEFINED __system_type_for_install) + # not debian, alpine, arch, or conda so rely on CMAKE_SIZEOF_VOID_P: if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") set(_LIBDIR_DEFAULT "lib64") if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX) Now instead of getting lib64 if 'not debian', we get lib64 only if __system_type_for_install is unset, but it's set to the misidentified 'conda'. So CMake tries to install to lib/ on 64-bit RedHat distros. Note that the other 'improvement' of checking to see if the conda install dir exist is uninvolved (and neither helps nor hurts) here; it's set by the system to '/usr' Obviously, the best course is to fix conda detection, but given that it was always broken on RH, perhaps temporarily rolling back the change for now is sufficient if fixing conda detect is tricky.
FEDORA-2021-eff2e9b46a has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-eff2e9b46a
FEDORA-2021-de5fcd83c1 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-de5fcd83c1
FEDORA-2021-eff2e9b46a has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-de5fcd83c1 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-de5fcd83c1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-de5fcd83c1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-de5fcd83c1 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.