Debian Cross Compile

Discussion about development of the Debian OS itself
Post Reply
Message
Author
gosha
Posts: 1
Joined: 2021-06-01 04:47

Debian Cross Compile

#1 Post by gosha »

Where could I find more detailed instructions for cross-building packages?
Or tell me what I'm doing wrong.
I am trying to build a simple package by cross-compiling.
Installed a cross compiler, sbuild, schroot.
Installed by Debian_9 using debbootstrap to /home/mips/rootfs
And I get an error while building the package

I modify schroot.conf

Code: Select all

[stretch]
description=stretch
directory=/mips/rootfs
groups=mips
aliases=stable

then try: sbuild --host=mips -d stretch

Code: Select all

root@debian:/home/mips/Patch/patch-2.7.5# sbuild --host=mips -d stretch
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying path_max
dpkg-source: info: applying 558485-backupmode
dpkg-source: info: applying m-merge
dpkg-source: info: applying patch-bug-1306412.diff
dpkg-source: info: applying Fix_arbitrary_command_execution_in_ed-style_patches.patch
dpkg-source: info: applying Fix_ed-style_test_failure.patch
dpkg-source: info: applying 0001-CVE-2019-13636.patch
dpkg-source: info: applying 0002-CVE-2019-13638.patch
dpkg-source: info: applying 0003-Do_not_leak_temporary_file.patch
dpkg-source: info: applying 0004-Do_not_leak_temporary_file_on_failed_multi-file.patch
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building patch using existing ./patch_2.7.5.orig.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: warning: ignoring deletion of file .version, use --include-removal to override
dpkg-source: info: building patch in patch_2.7.5-1+deb9u2.debian.tar.xz
dpkg-source: info: building patch in patch_2.7.5-1+deb9u2.dsc
dpkg-source: info: unapplying 0004-Do_not_leak_temporary_file_on_failed_multi-file.patch
dpkg-source: info: unapplying 0003-Do_not_leak_temporary_file.patch
dpkg-source: info: unapplying 0002-CVE-2019-13638.patch
dpkg-source: info: unapplying 0001-CVE-2019-13636.patch
dpkg-source: info: unapplying Fix_ed-style_test_failure.patch
dpkg-source: info: unapplying Fix_arbitrary_command_execution_in_ed-style_patches.patch
dpkg-source: info: unapplying patch-bug-1306412.diff
dpkg-source: info: unapplying m-merge
dpkg-source: info: unapplying 558485-backupmode
dpkg-source: info: unapplying path_max
sbuild (Debian sbuild) 0.78.1 (09 February 2019) on debian

+==============================================================================+
| patch 2.7.5-1+deb9u2 (mips)                  Tue, 01 Jun 2021 05:49:33 +0000 |
+==============================================================================+

Package: patch
Version: 2.7.5-1+deb9u2
Source Version: 2.7.5-1+deb9u2
Distribution: stretch
Machine Architecture: amd64
Host Architecture: mips
Build Architecture: amd64
Build Profiles: cross nocheck
Build Type: any

[b]E: Failed to execute “/usr/bin/getent”: Exec format error
E: Failed to execute “/usr/sbin/groupadd”: Exec format error
E: Failed to create group sbuild
Failed to set up chroot
E: Error creating chroot session: skipping patch[/b]

+------------------------------------------------------------------------------+
| Summary                                                                      |
+------------------------------------------------------------------------------+

Build Architecture: amd64
Build Profiles: cross nocheck
Build Type: any
Build-Space: 0
Build-Time: 0
Distribution: stretch
Fail-Stage: create-session
Host Architecture: mips
Install-Time: 0
Job: /home/mips/Patch/patch_2.7.5-1+deb9u2.dsc
Machine Architecture: amd64
Package: patch
Package-Time: 0
Source-Version: 2.7.5-1+deb9u2
Space: 0
Status: failed
Version: 2.7.5-1+deb9u2
--------------------------------------------------------------------------------
Finished at 2021-06-01T05:49:33Z
Build needed 00:00:00, 0k disk space
E: Error creating chroot session: skipping patch
root@debian:/home/mips/Patch/patch-2.7.5# 
Please tell me what I'm doing wrong.

Post Reply