Linux kernel fails to cross-compile with sbuild amd64 chroot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Timo Aaltonen |
Bug Description
I've been trying to cross-compile the Ubuntu kernel for arm64 with sbuild using an amd64 chroot. The main issue is that the Ubuntu kernel rules does not differentiate between *host* and *build* dependency items. For example, `libssl-dev` is depended upon during the build by:
1) `sign-file` utility that should run on the build machine (amd64)
2) building `linux-tools`, as link-time deps for the host machine (arm64)
Same issue exists for other tools like `pahole`. IMO the correct way to handle this is how the Debian kernel team does it, i.e. mark build-arch deps as :native like in [1]:
# used by upstream to build signing tools and to process certificates
libssl-dev:native <!pkg.linux.
libssl-dev <!pkg.linux.
In the current Ubuntu debian rules there's no :native dependencies at all, resulting in only the host (arm64) version being installed, thus the build tool `sign-file` failing to compile.
I discussed with Timo (tjaalton) on #kernel:ubuntu.com about this and it seems like we could adopt the same method for declaring dependencies as Debian, to allow cross-compiling the kernel package.
Thanks a lot!
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.15.0-122-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
CRDA: N/A
CasperMD5CheckR
Date: Sun Oct 20 09:13:56 2024
MachineType: ASUS System Product Name
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/zsh
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageV
linux-
linux-
linux-firmware 20220329.
RfKill:
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
WifiSyslog:
dmi.bios.date: 08/25/2022
dmi.bios.release: 20.3
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2003
dmi.board.
dmi.board.name: PRIME Z690M-PLUS D4
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.
dmi.sys.vendor: ASUS
Changed in linux (Ubuntu): | |
assignee: | nobody → Timo Aaltonen (tjaalton) |
tags: | added: kernel-daily-bug |
Status changed to 'Confirmed' because the bug affects multiple users.