вторник

[Bug 2085030] Re: Linux kernel fails to cross-compile with sbuild amd64 chroot

** Changed in: linux (Ubuntu)
Assignee: (unassigned) => Timo Aaltonen (tjaalton)

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2085030

Title:
Linux kernel fails to cross-compile with sbuild amd64 chroot

Status in linux package in Ubuntu:
Confirmed

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.nokernel>,
libssl-dev <!pkg.linux.notools>,

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!

[1]: https://salsa.debian.org/kernel-
team/linux/-/blob/8941549ed01ecdd8b9d2f84f2fb1d46507b76861/debian/templates/source.control.in#L19-21

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-5.15.0-122-generic 5.15.0-122.132
ProcVersionSignature: Ubuntu 5.15.0-122.132-generic 5.15.163
Uname: Linux 5.15.0-122-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: pengxu 215415 F.... pulseaudio
CRDA: N/A
CasperMD5CheckResult: unknown
Date: Sun Oct 20 09:13:56 2024
MachineType: ASUS System Product Name
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=C.UTF-8
SHELL=/bin/zsh
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-122-generic root=ZFS=tank/UBUNTU/rootfs ro
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
linux-restricted-modules-5.15.0-122-generic N/A
linux-backports-modules-5.15.0-122-generic N/A
linux-firmware 20220329.git681281e4-0ubuntu3.34
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.asset.tag: Default string
dmi.board.name: PRIME Z690M-PLUS D4
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2003:bd08/25/2022:br20.3:svnASUS:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnPRIMEZ690M-PLUSD4:rvrRev1.xx:cvnDefaultstring:ct3:cvrDefaultstring:skuSKU:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: ASUS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2085030/+subscriptions

Комментариев нет:

Отправить комментарий