Problem rebuilding a kernel from sources

I’m trying to rebuild a kernel from an SRPMS (kernel-7.2.3-300.fc44.src.rpm).

But each time the compilation stops with this error:

Allocation of hmac(sha512) cipher failed (ret=-2)

Does anyone have any ideas?

How are you doing the build?
If you are not using mock try with mock.

I’ve been using mock for a long time because I’m on Rawhide and often have to rebuild packages whenever there are API changes.

I tried compiling a different kernel and I’m getting the same error. I think the problem comes from Rawhide.
Thanks.

Sometimes you need to rebuild the mock environment, I’d think this is likely on rawhide.

See man mock and the --scrub= and --scrub-all-chroots types.

Unfortunately, --scrub* didn’t help.
I’m using a kernel from kernel-nodebug, and I think the problem seems to come from that; because when I try to rebuild libkcapi-hmaccalc (which handles the hashing), the compilation fails, reporting a bunch of errors related to my running kernel.
A quick test with a Rawhide kernel doesn’t seem to produce any errors.
I get the impression that to rebuild a Fedora kernel from source, you need to boot using a Fedora kernel. It seems odd, but that’s the impression I have.

I’ll look into that when I have more time.
In any case, thanks for your help.

If you do not get a helpful reply here consider asking the fedora devel mailing list.
Also I think there are fedora docs about building the kernel somewhere.