Describe the bug
The kmod build fails for every Debian kernel >= 6.12 (trixie and newer), on both x86_64 and aarch64. The kernel headers of these kernels force a triplet-prefixed toolchain, and our builder images only ship the plain binutils names.
The .kernelvariables file shipped in linux-headers-6.12.107+deb13-amd64 has 👇
override CROSS_COMPILE = x86_64-linux-gnu-
CC = $(if $(DEBIAN_KERNEL_USE_CCACHE),$(CCACHE)) $(CROSS_COMPILE)gcc-14
driverkit overrides CC on the make command line, so the compiler is found. However, LD, OBJCOPY, NM, etc. are still derived from CROSS_COMPILE, and x86_64-linux-gnu-ld does not exist in falcosecurity/driverkit-builder:any-x86_64_gcc14.0.0-* (Fedora based, plain binutils). The configure step fails before compiling anything:
/bin/sh: line 1: x86_64-linux-gnu-ld: command not found
make[3]: *** [.../scripts/Makefile.build:430: /tmp/driver/build/driver/src/configure/0__SANITY/testmod.o] Error 127
[configure-kmod] Build system is broken, please see above errors
FATAL error executing driverkit
└ err: Error response from daemon: Could not find the file /tmp/driver/build/driver/falco.ko in container ...
N.B. This is pre-existing and not related to a specific driver version: the same failure happens with 10.2.0+driver and 11.0.0+driver, and with driverkit v0.23.0 (the version pinned in the DBG jobs) as well as v0.23.2 (latest, identical to master). As a consequence, the Drivers Build Grid has never published a prebuilt kmod for Debian 13.
How to reproduce it
# debian-6.12.yaml
kernelversion: "1"
kernelrelease: 6.12.107-1-amd64
target: debian
architecture: amd64
output:
module: output/falco_debian_6.12.107-1-amd64_1.ko
kernelurls:
- http://security.debian.org/debian-security/pool/updates/main/l/linux/linux-headers-6.12.107+deb13-amd64_6.12.107-1_amd64.deb
- http://security.debian.org/debian-security/pool/updates/main/l/linux/linux-headers-6.12.107+deb13-common_6.12.107-1_all.deb
- http://security.debian.org/debian-security/pool/updates/main/l/linux/linux-kbuild-6.12.107+deb13_6.12.107-1_amd64.deb
driverkit docker -c debian-6.12.yaml --driverversion 11.0.0+driver --loglevel debug
Expected behaviour
The kmod builds, as it does for the other distros on the same kernel series.
Possible fixes
- add triplet-prefixed symlinks (
x86_64-linux-gnu-ld, -objcopy, -nm, -strip, -ar, ... and the aarch64-linux-gnu- equivalents) to the builder-any-* images. IMO this is the least invasive option and fixes both arches
- alternatively, pass
LD=ld OBJCOPY=objcopy NM=nm ... on the kmod make line, since those are plain assignments in the kernel Makefile (only CROSS_COMPILE is protected by override)
Either way, the fix needs a driverkit release, then the dbg-go pin and the DBG job image bumps.
Environment
- driverkit
v0.23.2 (master) and v0.23.0
- builder image
falcosecurity/driverkit-builder:any-x86_64_gcc14.0.0-2b04def
- Debian kernels
6.12.x, 6.16.x up to 7.1.x, both amd64 and arm64
Additional context
Since this is pre-existing, we agreed to postpone the fix after the Falco 0.45.0 release. Keeping this on hold for now 🙏
/kind bug
/area build
Describe the bug
The kmod build fails for every Debian kernel
>= 6.12(trixie and newer), on bothx86_64andaarch64. The kernel headers of these kernels force a triplet-prefixed toolchain, and our builder images only ship the plainbinutilsnames.The
.kernelvariablesfile shipped inlinux-headers-6.12.107+deb13-amd64has 👇driverkit overrides
CCon themakecommand line, so the compiler is found. However,LD,OBJCOPY,NM, etc. are still derived fromCROSS_COMPILE, andx86_64-linux-gnu-lddoes not exist infalcosecurity/driverkit-builder:any-x86_64_gcc14.0.0-*(Fedora based, plainbinutils). The configure step fails before compiling anything:N.B. This is pre-existing and not related to a specific driver version: the same failure happens with
10.2.0+driverand11.0.0+driver, and with driverkitv0.23.0(the version pinned in the DBG jobs) as well asv0.23.2(latest, identical tomaster). As a consequence, the Drivers Build Grid has never published a prebuilt kmod for Debian 13.How to reproduce it
Expected behaviour
The kmod builds, as it does for the other distros on the same kernel series.
Possible fixes
x86_64-linux-gnu-ld,-objcopy,-nm,-strip,-ar, ... and theaarch64-linux-gnu-equivalents) to thebuilder-any-*images. IMO this is the least invasive option and fixes both archesLD=ld OBJCOPY=objcopy NM=nm ...on the kmodmakeline, since those are plain assignments in the kernelMakefile(onlyCROSS_COMPILEis protected byoverride)Either way, the fix needs a driverkit release, then the
dbg-gopin and the DBG job image bumps.Environment
v0.23.2(master) andv0.23.0falcosecurity/driverkit-builder:any-x86_64_gcc14.0.0-2b04def6.12.x,6.16.xup to7.1.x, bothamd64andarm64Additional context
Since this is pre-existing, we agreed to postpone the fix after the Falco 0.45.0 release. Keeping this on hold for now 🙏
/kind bug
/area build