*** This bug is a duplicate of bug 1831573 *** https://bugs.launchpad.net/bugs/1831573
** This bug has been marked a duplicate of bug 1831573 Host arch executables are installed in /lib/modules/$(uname -r)/build when cross compiling kernel -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1916782 Title: fixdep, etc. gets built for wrong arch when cross-compiling Ubuntu kernel Status in linux package in Ubuntu: Confirmed Bug description: Cross-compiling the Ubuntu kernel using the standard debian/rules methods produces a linux-headers-{version}-{flavour} package which contains executables (e.g. fixdep, several others) built for the build host architecture, not the target host architecture. Those executables are unusable when that linux-headers package gets installed on the target. Example from an ARM64 cross-compiled linux-headers package (note the x86-64 executable): usr/src/linux-headers-5.10.0-14-generic/scripts/basic/fixdep: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=77b1c89ff5560389ea272ec0e81a4770246481a1, for GNU/Linux 3.2.0, not stripped The kernel itself, of course, gets properly cross-compiled and the generated packages (including linux-headers) will install fine on the target. But the bogus executables prevent full functionality on that installation, i.e. it cannot be used for kernel driver development. The fundamental reason why this occurs is that the build host needs to run some of those compiled executables itself during the build, but those executables should NOT get packaged. Instead, the build should be reorganized so that it compiles a set of temporary host-arch-execs for use during the build, but then separately (cross)-compiles them as target-arch-execs for inclusion in the linux-headers package. This bug is Importance:Wishlist because: - cross-compiled Ubuntu kernel package builds aren't technically "supported". - this glitch only happens with engineer-built cross-compiled test kernels. - building natively instead (i.e. in a Launchpad PPA) avoids the problem. - this is not a new misbehavior; our cross-compile build rules have always been this way. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1916782/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp