KICAD Nightles - Build Failure on CentOS 8

I build the KICAD Nightlies on a CentOS 8 system using the Fedora Source RPMS.

Usually this is successful after two minor modifications to the ‘spec’ file (for boost176 and gcc 11).

Today I attempted to build: /kicad-nightly-6.99.0-1.20221221gite8f755c.fc36.src.rpm.

The first hurdle was the recent requirement for cmake-3.21 or greater. The CentOS8 cmake is 3.20. I built cmake-3.25 and installed it in the Virtual Machine I use to build the Nightlies.

The second hurdle is this:

Blockquote
appstream-util validate-relax --nonet /home/stephen/rpmbuild/BUILDROOT/kicad-nightly-6.99.0-1.20221221gite8f755c.sc.x86_64/usr/share/metainfo/org.kicad.kicad_nightly.metainfo.xml
/home/stephen/rpmbuild/BUILDROOT/kicad-nightly-6.99.0-1.20221221gite8f755c.sc.x86_64/usr/share/metainfo/org.kicad.kicad_nightly.metainfo.xml: FAILED:
? attribute-invalid : timestamp is in the future
Validation of files failed
error: Bad exit status from /var/tmp/rpm-tmp.kCF5nt (%check)

Blockquote

If I revert to cmake-3.20 and modify CMakeLists.txt to require cmake 3.20 or newer, then the build and packaging succeeds.

I have rebuilt with cmake-3.25 again, and it failed for a second time.

I understand that building on CentOS 8 may result in such strange failures. I don’t quite get the difference between cmake-3.25 and cmake-3.20.

Obviously, this isn’t a problem with the Fedora builds at https://copr.fedorainfracloud.org/coprs/g/kicad/kicad/package/kicad-nightly/.

Could it be some weird form of timezone problem? The ‘xml’ file cited in the diagnostic contains:

Blockquote


Blockquote

Since the local time zone is Australian Easter Daylight and therefore the UTC day is 22/12/2022.

I will build cmake-3.21 to determine whether the build displays a similar behaviour with that.

Something went wrong with my use of blockquotes, the missing part of the XML file is:

One more time, without the ‘xml’ bits:

    release version="6.99.0-1.20221221gite8f755c.sc" date="2022-12-23"

Interesting, I guess what is happening is we write a timestamp in local time but your appstream-util check assumes the timestamp is UTC. Can you try changing the line in cmake/BuildSteps/WritePlatformMetadata_linux.cmake from

string( TIMESTAMP KICAD_CONFIG_TIMESTAMP "%Y-%m-%d" )

to

string( TIMESTAMP KICAD_CONFIG_TIMESTAMP "%Y-%m-%d" UTC)

and see if that works on the newer CMake version?

It works. Had to wait until this morning before trying the fix. I verified failure to build first.

The version of appstream-util used is the CentOS 8 one, from package: libappstream-glib-0.7.14-3.el8.x86_64.

Another way of producing a viable build is to force the timezone to UTC in the RPM build section immediately before the invocation of cmake.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.