[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help needed with crosscompiling the kernel



Hi,

I tried to crosscompile the kernel with sbuild  and unshare (amd64 build arch, arm64 host arch). I have sbuild setup the recommended way with unshare; then cloned the kernel repo and ran:

$ debian/rules orig

$ debian/rules debian/control

$ sbuild --host=arm64 --profiles=cross,nopython,nodoc,pkg.linux.notools


However, this fails to resolve the build dependencies (see attached log). What am I missing here ? Unfortunately, neither the crosscompiling/sbuild wiki page nor the kernel handbook  were able to help me.

--
Freundliche Grüsse / Best regards

Matthias Geiger
__________________________________________________________________
Matthias Geiger
Werkstudent
Forschung & Entwicklung/Research & Development

Phone : +49-6441-609-3004
Email : m_geiger@wiwa.de
URL   : www.wiwa.de

WIWA Wilhelm Wagner GmbH & Co. KG
Gewerbestrasse 1-3, 35633 Lahnau, Germany
Besucheranschrift/visitor address:
Georg-Ohm-Strasse 12, 35633 Lahnau, Germany

AG WETZLAR HRA 3223, Komplementär : Wagner GmbH (AG Wetzlar HRB 363)
UST-ID Nr: / VAT-No: DE113745802
Geschäftsführer: Dipl.-Ing. (FH) Peter Turczak, Dipl.-Wirt.-Ing. Malte Weber
sbuild (Debian sbuild) 0.85.10ubuntu0.2 (02 May 2025) on ltmgeiger

+==============================================================================+
| linux 6.16-1~exp1 (arm64)                    Thu, 07 Aug 2025 06:39:00 +0000 |
+==============================================================================+

Package: linux
Version: 6.16-1~exp1
Source Version: 6.16-1~exp1
Distribution: unstable
Machine Architecture: amd64
Host Architecture: arm64
Build Architecture: amd64
Build Profiles: cross nopython nodoc pkg.linux.notools
Build Type: any

Unpacking /home/mgeiger/.cache/sbuild/unstable-amd64.tar.zst to /tmp/tmp.sbuild.VcNsfIdG...
I: NOTICE: Log filtering will replace 'sbuild-unshare-dummy-location' with '<<CHROOT>>'
I: NOTICE: Log filtering will replace 'build/linux-P0ZtFY/resolver-ZDoAHd' with '<<RESOLVERDIR>>'

+------------------------------------------------------------------------------+
| Update chroot                                Thu, 07 Aug 2025 06:39:03 +0000 |
+------------------------------------------------------------------------------+

Get:1 https://deb.debian.org/debian unstable InRelease [216 kB]
Get:2 https://deb.debian.org/debian unstable/main amd64 Packages [10.1 MB]
Get:3 https://deb.debian.org/debian unstable/main arm64 Packages [10.0 MB]
Fetched 20.4 MB in 2s (8382 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

+------------------------------------------------------------------------------+
| Fetch source files                           Thu, 07 Aug 2025 06:39:07 +0000 |
+------------------------------------------------------------------------------+


Local sources
-------------

/home/mgeiger/Dokumente/Projekte/linux_6.16-1~exp1.dsc exists in /home/mgeiger/Dokumente/Projekte; copying to chroot
I: NOTICE: Log filtering will replace 'build/linux-P0ZtFY/linux-6.16' with '<<PKGBUILDDIR>>'
I: NOTICE: Log filtering will replace 'build/linux-P0ZtFY' with '<<BUILDDIR>>'

+------------------------------------------------------------------------------+
| Install package build dependencies           Thu, 07 Aug 2025 06:39:07 +0000 |
+------------------------------------------------------------------------------+


Setup apt archive
-----------------

Merged Build-Depends: debhelper-compat (= 13), python3:arm64, python3-debian, python3-dacite:arm64, python3-jinja2:arm64, quilt, build-essential:amd64, fakeroot:amd64, dumb-init, crossbuild-essential-arm64:amd64, libc-dev:arm64, libstdc++-dev:arm64, bc, libssl-dev:arm64, openssl, libelf-dev:arm64, lz4, pahole | dwarves:arm64 (>= 1.16~), cpio, xz-utils, zstd, bison, flex, gcc-14-for-host, gcc-arm-linux-gnueabihf, kernel-wedge (>= 2.105~), kmod
Filtered Build-Depends: debhelper-compat (= 13), python3:arm64, python3-debian, python3-dacite:arm64, python3-jinja2:arm64, quilt, build-essential:amd64, fakeroot:amd64, dumb-init, crossbuild-essential-arm64:amd64, libc-dev:arm64, libstdc++-dev:arm64, bc, libssl-dev:arm64, openssl, libelf-dev:arm64, lz4, pahole, cpio, xz-utils, zstd, bison, flex, gcc-14-for-host, gcc-arm-linux-gnueabihf, kernel-wedge (>= 2.105~), kmod
dpkg-deb: warning: root directory /<<RESOLVERDIR>>/sbuild-build-depends-main-dummy has unusual owner or group 998:999
dpkg-deb: hint: you might need to pass --root-owner-group, see <https://wiki.debian.org/Teams/Dpkg/RootlessBuilds> for further details
dpkg-deb: warning: ignoring 1 warning about the control file(s)
dpkg-deb: building package 'sbuild-build-depends-main-dummy' in '/<<RESOLVERDIR>>/apt_archive/sbuild-build-depends-main-dummy.deb'.
Ign:1 copy:/<<RESOLVERDIR>>/apt_archive ./ InRelease
Get:2 copy:/<<RESOLVERDIR>>/apt_archive ./ Release [612 B]
Ign:3 copy:/<<RESOLVERDIR>>/apt_archive ./ Release.gpg
Get:4 copy:/<<RESOLVERDIR>>/apt_archive ./ Sources [7407 B]
Get:5 copy:/<<RESOLVERDIR>>/apt_archive ./ Packages [997 B]
Fetched 9016 B in 0s (0 B/s)
Reading package lists...
Reading package lists...

Install main build dependencies (apt-based resolver)
----------------------------------------------------

Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
/usr/lib/apt/solvers/apt: error while loading shared libraries: libapt-pkg.so.6.0: cannot open shared object file: No such file or directory
Execute external solver...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 sbuild-build-depends-main-dummy:arm64 : Depends: debhelper-compat:arm64 (= 13)
                                         Depends: python3:arm64
                                         Depends: python3-debian:arm64 but it is not installable
                                         Depends: python3-dacite:arm64 but it is not installable
                                         Depends: python3-jinja2:arm64 but it is not installable
                                         Depends: quilt:arm64
                                         Depends: fakeroot:amd64
                                         Depends: dumb-init:arm64 but it is not going to be installed
                                         Depends: crossbuild-essential-arm64:amd64
                                         Depends: libc-dev:arm64
                                         Depends: libstdc++-dev:arm64
                                         Depends: bc:arm64
                                         Depends: libssl-dev:arm64
                                         Depends: libelf-dev:arm64
                                         Depends: lz4:arm64
                                         Depends: pahole:arm64
                                         Depends: cpio:arm64
                                         Depends: zstd:arm64
                                         Depends: bison:arm64
                                         Depends: flex:arm64
                                         Depends: gcc-14-for-host:arm64 but it is not going to be installed
                                         Depends: gcc-arm-linux-gnueabihf:arm64
                                         Depends: kernel-wedge:arm64 (>= 2.105~)
                                         Depends: kmod:arm64
E: Write error - write (32: Broken pipe)
E: Write error - write (32: Broken pipe)
E: Sub-process sbuild-cross-resolver received signal 13.
apt-get failed.
E: Package installation failed
Not removing build depends: cloned chroot in use

Setup apt archive
-----------------

Merged Build-Depends: dose-distcheck:amd64
Filtered Build-Depends: dose-distcheck:amd64
dpkg-deb: warning: root directory /<<RESOLVERDIR>>/sbuild-build-depends-dose3-dummy has unusual owner or group 998:999
dpkg-deb: hint: you might need to pass --root-owner-group, see <https://wiki.debian.org/Teams/Dpkg/RootlessBuilds> for further details
dpkg-deb: warning: ignoring 1 warning about the control file(s)
dpkg-deb: building package 'sbuild-build-depends-dose3-dummy' in '/<<RESOLVERDIR>>/apt_archive/sbuild-build-depends-dose3-dummy.deb'.
Ign:1 copy:/<<RESOLVERDIR>>/apt_archive ./ InRelease
Get:2 copy:/<<RESOLVERDIR>>/apt_archive ./ Release [615 B]
Ign:3 copy:/<<RESOLVERDIR>>/apt_archive ./ Release.gpg
Get:4 copy:/<<RESOLVERDIR>>/apt_archive ./ Sources [7986 B]
Get:5 copy:/<<RESOLVERDIR>>/apt_archive ./ Packages [1618 B]
Fetched 10.2 kB in 0s (0 B/s)
Reading package lists...
Reading package lists...

Install dose3 build dependencies (apt-based resolver)
-----------------------------------------------------

Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
/usr/lib/apt/solvers/apt: error while loading shared libraries: libapt-pkg.so.6.0: cannot open shared object file: No such file or directory
Execute external solver...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 sbuild-build-depends-dose3-dummy:arm64 : Depends: dose-distcheck:amd64
E: Write error - write (32: Broken pipe)
E: Write error - write (32: Broken pipe)
E: Sub-process sbuild-cross-resolver received signal 13.
apt-get failed.
E: Package installation failed
Not removing build depends: cloned chroot in use
E: Failed to explain bd-uninstallable

+------------------------------------------------------------------------------+
| Summary                                      Thu, 07 Aug 2025 06:39:13 +0000 |
+------------------------------------------------------------------------------+

Build Architecture: amd64
Build Profiles: cross nopython nodoc pkg.linux.notools
Build Type: any
Build-Space: n/a
Build-Time: 0
Distribution: unstable
Fail-Stage: explain-bd-uninstallable
Foreign Architectures: arm64
Host Architecture: arm64
Install-Time: 0
Job: /home/mgeiger/Dokumente/Projekte/linux_6.16-1~exp1.dsc
Machine Architecture: amd64
Package: linux
Package-Time: 0
Source-Version: 6.16-1~exp1
Space: n/a
Status: given-back
Version: 6.16-1~exp1
--------------------------------------------------------------------------------
Finished at 2025-08-07T06:39:00Z
Build needed 00:00:00, no disk space

Reply to: