Bug 2060781

Summary: kicad: FTBFS with cmake 3.23.0 in Fedora Rawhide
Product: [Fedora] Fedora Reporter: Jitka Plesnikova <jplesnik>
Component: kicadAssignee: Steven A. Falco <stevenfalco>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aimylios, alain.vigne.14, gmarr, ian.s.mcinerney, kiarakovalevsky, stevenfalco, thibault
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/kicad
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-04 21:23:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2059201    
Bug Blocks: 2045102    

Description Jitka Plesnikova 2022-03-04 09:51:08 UTC
Description of problem:
Package kicad fails to build from source in Fedora Rawhide.

-- Build files have been written to: /builddir/build/BUILD/kicad-6.0.2
+ /usr/bin/cmake --build redhat-linux-build -j6 --verbose
Error: /builddir/build/BUILD/kicad-6.0.2/redhat-linux-build is not a directory
error: Bad exit status from /var/tmp/rpm-tmp.4PB3Ib (%build)

Version-Release number of selected component (if applicable):
6.0.2-1.fc37

Steps to Reproduce:
koji build --scratch f37 kicad-6.0.2-1.fc37.src.rpm

Dependency changes from last successful build:
https://koschei.fedoraproject.org/build/12249957

It is probably related to update cmake to version 3.23.0-0.1.rc2.fc37.

Comment 1 Steven A. Falco 2022-03-04 13:05:34 UTC
Do you have a link to your koji build so I can see the error messages?

Comment 2 Jitka Plesnikova 2022-03-04 13:17:34 UTC
I found the error in Koschei.

https://koschei.fedoraproject.org/package/kicad?collection=f37

Comment 3 Steven A. Falco 2022-03-04 13:36:35 UTC
I was able to reproduce the error.  Here is a link to a failed scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=83638808

Comment 4 Steven A. Falco 2022-03-04 14:07:07 UTC
I filed an issue in KiCad: https://gitlab.com/kicad/code/kicad/-/issues/11043

I got the following comment from the KiCad project lead:

This looks like cmake issue to me. For some reason cmake is creating an incorrect build folder:

-- Build files have been written to: /builddir/build/BUILD/kicad-6.0.2

so the build command:

+ /usr/bin/cmake --build redhat-linux-build -j6 --verbose

cannot find the redhat-linux-build folder that was passed on the cmake command line.

Comment 5 Ian McInerney 2022-03-04 14:24:55 UTC
This definitely looks like either a CMake or packaging bug with the CMake macro or its invocation.

The first thing to try would be removing the trailing "." on the end of every %cmake macro invocation, since that shouldn't be needed since the macro passes the -S and -B options to CMake (and the example usage of the CMake macros on https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/ don't show them included).

Comment 6 Steven A. Falco 2022-03-04 15:17:30 UTC
Removing the "." works.  I have a new scratch build at https://koji.fedoraproject.org/koji/taskinfo?taskID=83642010 and it is progressing normally.

The build log once again shows:

-- Build files have been written to: /builddir/build/BUILD/kicad-6.0.2/redhat-linux-build
+ /usr/bin/cmake --build redhat-linux-build -j6 --verbose

as expected.

Comment 7 Steven A. Falco 2022-03-04 16:11:37 UTC
Spoke too soon - looks like there are still problems building the documentation.  I'm working on that.

Comment 8 Steven A. Falco 2022-03-04 21:23:33 UTC
kicad-6.0.2-3 builds successfully in rawhide:

https://koji.fedoraproject.org/koji/taskinfo?taskID=83644560