Trying to build our build system packages on Fedora 36 results in:
> gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
The reason for this is:
tl;dr: The now implicitly set CFLAGS and friends at the start of %build, and their flags are incompatible with our builds.
I figured it was best to try to mimic what Fedora does for us as well. There are two complications, however:
* They do a lot of other magical stuff that we don't want
* We build our packages using the system's rpm, which means we don't know which version, or which distribution, or even if the distro macros are installed
So, I did a general clean up where we try to avoid the distro magic a bit more, and rely more on the base functionality of rpm itself. I then added the new stuff Fedora has added directly in to our macros.
The new basic principle is that our macros correspond to the macros Fedora add on top of the basic rpm macros.
Packages built using the new macros seem to work fine. I can see CFLAGS and friends being set correctly in the build log.
I also rebuilt the entire build system on a RHEL 8 VM, so no obvious side effects.
Good enough for me.
Tried to reproduce the issue by building everything on a fresh Fedora 36 VM. It failed, but I got another error. When building cendio-build-gmp-bootstrap-i386 I get:
> checking size of mp_limb_t... 4
> configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
> in this configuration expects 64 bits.
> You appear to have set $CFLAGS, perhaps you also need to tell GMP the
> intended ABI, see "ABI and ISA" in the manual.
I don't know if it's the same issue. I have not tried to build after the fixes on this bug.
NOTE: I had to install some dependencies in order to get this far:
> dnf install -y make gcc rpmdevtools rpm-sign zlib-devel flex glibc-devel.i686 perl
Hmm... Builds just fine on my Fedora 36 VM. Must be something subtle going on here.
To clarify, the error in comment #9 was found when trying to reproduce the error in the description. When building the current version of cenbuild, with Pierres fixes, I don't get that error. So this seems to be another symptom of the same issue.
Tested on Fedora 36, and it builds without any errors. Also did a complete rebuild on RHEL 8.
Tested that the resulting build systems worked by building ThinLinc client and server and tested those. Everything seems to work just fine.
Checked the code changes and they look good.