Description of problem: In Fedora 33 the %cmake macro changed to use out-of-source builds by default. The new macro is backported to Fedora 31 and 32, where the new behaviour is not the default in order not introduce breakage in released Fedora. But it can be used there by adding %undefine __cmake_in_source_build to the specfile. The new macro has also been backported to the %cmake3 macro in the cmake3 package in EPEL 7, where the new behaviour is also not the default but can be activated by undefining __cmake3_in_source_build. Which leaves EPEL 8 as a special case where the new macro can not be used. While cmake3 in EPEL 7 is an EPEL package that can be adapted to the new macro in EPEL, cmake in EPEL 8 is a RHEL package. So unless redhat can be persuaded to updated the package in RHEL to provide the new functionality, the %cmake macro must be overridden in EPEL 8 if the new functionality should be provided. Note that the cmake version if RHEL 8 (3.11.4) does not support the -S and -B flags, so the macro must be reimplemented to not use these in EPEL 8. Version-Release number of selected component (if applicable): cmake-3.11.4-7.el8.x86_64 epel-rpm-macros-8-13.noarch How reproducible: Always Steps to Reproduce: 1. Add %undefine __cmake_in_source_build to an EPEL 8 specfile 2. Build the package expecting the behaviour of the new %cmake makro 3. See it fail Additional info: https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
See PR: https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/18
FEDORA-EPEL-2020-996d6678c8 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8
FEDORA-EPEL-2020-996d6678c8 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report.
I want to reopen this bug because solution not work. Please see comment at https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8 I have the same issue.
Is this still not working? Can you re-test now and if it's not working submit a PR?
hi, I'm seeing the problem on epel8-playground, I think . I'm building fortune-mod on epel8 [1], it builds well on epel-8, but not on epel-8-playground , on epel-8-playground cmake doesn't do "CMake out-of-source builds" [2] HTH [1] https://koji.fedoraproject.org/koji/packageinfo?packageID=1756 [2] /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCOOKIEDIR=/usr/share/games/fortune -DLOCALDIR=/usr/share/games/fortune -DNO_OFFENSIVE=TRUE CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/19 seems to me that is fixed , can we close this bug ?