Bugzilla – Bug 989
[Cross-compiling] code generators are being built for target
Last modified: 2021-09-13 10:25:55 MDT
Created attachment 558 [details] Configure summary While compiling sudo 1.9.7p2 for aarch64 (Raspberry Pi 4), I encountered the following problem: ./mksigname > signame.c /bin/sh: line 1: ./mksigname: cannot execute binary file: Exec format error This seems to be caused by the Makefile using the CC variable for the actual target libraries & programs as well as for the generators, which need to run on the build host. I managed to get around this issue by registering qemu-aarch64 via the kernel's binfmt_misc functionality to run the executables anyway, but this is a lot of work and requires a ton of additional setup. Perhaps this can be alleviated via a HOSTCC variable in autoconf or similar which points to the build host's system compiler and using that to build the generators. Configure command: ./configure --build=x86_64-pc-linux-gnu --host=aarch64-linux-musleabi --prefix=/usr --with-gnu-ld --disable-shadow \ --with-passwd --with-env-editor --without-pam --enable-openssl \ --with-insults --with-passprompt='[sudo] Password:'
I have a patch to address this in https://github.com/sudo-project/sudo/pull/109 Would you be able to give that a try? I can create a tarball for you if that is easier.
Seems to work perfectly, thank you so much! Will that be included in the next release of sudo?
Now that I have confirmation that it works in a real environment, yes :-)
Fixed in sudo 1.9.8