Hi,
in general, for any cross-building issues, please feel free to write to
[email protected]
Quoting Iustin Pop (2024-09-27 16:23:16)
I just added a barebone config for one of my packages, and while the pipeline worked, I got an error for the arm64 cross-compile that seems to be due to tooling issues:
make[1]: Entering directory '/builds/debian/mt-st/debian/output/source_dir' echo '#define VERSION "1.7"' > version.h
aarch64-linux-gnu-gcc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/builds/debian/mt-st/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -
mbranch-protection=standard -Wl,-z,relro -Wl,-z,now -DDEFTAPE='"/dev/tape"' -o mt mt.c
aarch64-linux-gnu-gcc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/builds/debian/mt-st/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -
mbranch-protection=standard -Wl,-z,relro -Wl,-z,now -DDEFTAPE='"/dev/tape"' -o stinit stinit.c
ccache: error: execute_noreturn of /usr/bin/aarch64-linux-gnu-gcc failed: Exec format error
make[1]: *** [Makefile:44: stinit] Error 1
make[1]: *** Waiting for unfinished jobs....
ccache: error: execute_noreturn of /usr/bin/aarch64-linux-gnu-gcc failed: Exec format error
You can see why this happens further up in the log:
The following NEW packages will be installed:
binutils-aarch64-linux-gnu:arm64 binutils-common:arm64
cpp-14-aarch64-linux-gnu:arm64 cpp-aarch64-linux-gnu cross-config
crossbuild-essential-arm64 dpkg-cross file g++-14-aarch64-linux-gnu:arm64
g++-aarch64-linux-gnu gcc-14-aarch64-linux-gnu:arm64 gcc-14-base:arm64
gcc-aarch64-linux-gnu libasan8:arm64 libatomic1:arm64 libbinutils:arm64
libc6:arm64 libc6-dev:arm64 libcc1-0:arm64 libconfig-auto-perl
libconfig-inifiles-perl libcrypt-dev:arm64 libcrypt1:arm64
libctf-nobfd0:arm64 libctf0:arm64 libdebian-dpkgcross-perl
libfile-homedir-perl libfile-which-perl libgcc-14-dev:arm64 libgcc-s1:arm64
A bunch of arm64 packages are installed and specifically gcc-14-aarch64-linux-gnu is installed as the arm64 package which obviously, the amd64 salsa ci runner is unable to execute.
One of the reasons for why you see the problem that late is because salsa-ci is not using sbuild to cross-build packages. Sbuild comes with some safeguards against this sort of situation and if you were to try and cross-build mt-st with sbuild in unstable you would instead see a conflict when it tries to install the cross-build dependencies.
The log is at https://salsa.debian.org/debian/mt-st/-/jobs/6343717.
While this is not marked as blocking, just warning, it's still
annoying. Is this a known issue? I would like to keep the cross-build,
and I see nothing about this being problematic in the docs.
yes, this is a known issue but it is not related to salsa-ci pipeline at all but is a general cross-building issue that existed over half a year by now and is recorded in #1065416. Luckily, that bug found a resolution and packages fixing it are already in experimental.
I you pass the correct options to sbuild such that you convince it to pull some packages from experimental instead of using unstable, you can already see how mt-st cross-builds just fine:
sbuild -d unstable --no-run-lintian --build arm64 --host amd64 \
--extra-repository "deb-src
http://deb.debian.org/debian unstable main" \
--extra-repository='deb
http://deb.debian.org/debian experimental main' \
--build-dep-resolver=aptitude \
--add-depends='libc6-dev-amd64-cross (= 2.40-2cross1)' \
--add-depends='linux-libc-dev (= 6.11-1~exp1)' \
mt-tsc
The above assumes that your system is arm64 and you want to build for amd64. If you are using an intel box and want to build for arm64 instead, just swap the --build and --host arguments.
Thanks!
cheers, josch
--==============r17902229571123589=MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Description: signature
Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmb214sACgkQ8sulx4+9 g+HE8hAAj1uxnj9aE4i+VJ1pJ1yfjWitxKOK55Goi2DzQX3gZ2XNrA5GG/2o9Hyo D781V0IdYvqMMq+rPsGV4pEAA9r0htn+f+CiGAJkEjqrYug+/Jcr0o2zz7w70Q+q osV4lWLIMFiidWgRrccImSvcg1pAiA6EsuUICYQ/E85an0UpG/HiF98QUnv8Kj4u KDJwvETJFcnck3fJZ0pIq0DLEoCisltWmO5zPjMDUSA6H2/HtFb/MYfu1H8xgD4c rZ/xeDcSjZSYjXTWYHkU0GhHMm5ab1SZe4jkGBwIYfae7U23AYosMJYXO3DdYJ88 hIz/IB//E3lTLpB8rUxkOjSPGlNLF/VVImaxKaUbhf9T1braEnRM+kxaHeJbfh8t fMQ9fI1Aae1uySt3CPZC8zUNbnuQ2WfZDC/MzXiMtc7nAzDlAk2tfTDEVO1MZig1 KCLsg9+62S8qqQQGAH3wu+ysYT28vmpF5VebvDww8DF0Cv/wz4PaacwZT9nM2Tqm lRhPJ4u2+rvdn6ZyLIMvTrma5K2o+sKseHnqt8iIVPs9FVJbl6FCJ7+DKXZSXib0 QwTU15FnL77WS7Qf9skJ9p3mm3HJG6xOzepiJV6fbsLT3mlTzG9L/HCLma6sy/tW Wo9mWZ/8jQP9UN0QpMabI4T3OgDMjcSktu3543KJ8Z+KNNGELW0=
=HHyN
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)