Hi, in general, for any cross-building issues, please feel free to write to debian-cr...@lists.debian.org
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
signature.asc
Description: signature