Re: [PATCH 2/3] kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build profile

From: Masahiro Yamada
Date: Sat Nov 09 2024 - 16:54:42 EST


On Thu, Nov 7, 2024 at 4:18 AM Matt Fleming <matt@xxxxxxxxxxxxxxxx> wrote:
>
>
> Hey there,
>
> Can you explain how this change works a bit more? This reads like it's now
> impossible to build the debian linux-headers package with clang? At Cloudflare,
> we're using a custom build of gcc, not the gcc-x86-64-linux-gnu package, and
> with this change we can no longer build linux-headers.

You need to install the gcc-x86-64-linux-gnu package.
This is available on both Debian and Ubuntu.

Adding the prefix is required to reliably produce the correct
linux-headers package.

For example, when building a linux-headers package for i386 on amd64,
userspace tools must be recompiled with 'i686-linux-gnu-gcc'.


> What's the solution for those of us that want to build the linux-headers deb
> package but can't install gcc-*-linux-gnu?

DPKG_FLAGS=-d

will skip the build dependency check, but 'x86_64-linux-gnu-gcc'
is still required.

If only clang is available on your system, you need a workaround,
e.g.

ln -s clang ~/bin/x86_64-linux-gnu-gcc

Anyway, you need to find a solution.

--
Best Regards
Masahiro Yamada