Open pbatard opened 3 months ago
I'm not a big cross compiler.. but I tried and ran into a different issue.
$ make ARCH=mips64 CROSS_COMPILE=mips64-linux-gnu-
mkdir -p /home/ncroxon/kwf/gnu-efi/mips64el/lib
make -C /home/ncroxon/kwf/gnu-efi/mips64el/lib -f /home/ncroxon/kwf/gnu-efi//lib/Makefile SRCDIR=/home/ncroxon/kwf/gnu-efi//lib ARCH=mips64el
make[1]: Entering directory '/home/ncroxon/kwf/gnu-efi/mips64el/lib'
CC boxdraw.o
CC smbios.o
CC console.o
CC crc.o
CC data.o
CC debug.o
CC dpath.o
CC entry.o
CC error.o
CC event.o
CC exit.o
CC guid.o
CC hand.o
CC hw.o
CC init.o
CC lock.o
CC misc.o
CC pause.o
CC print.o
CC sread.o
CC str.o
CC cmdline.o
CC rtlock.o
CC efirtlib.o
CC rtstr.o
CC vm.o
CC rtdata.o
CC initplat.o
CC math.o
CC setjmp.o
CC ctors.o
AR libefi.a
mips64-linux-gnu-ar: creating libefi.a
make[1]: Leaving directory '/home/ncroxon/kwf/gnu-efi/mips64el/lib'
mkdir -p /home/ncroxon/kwf/gnu-efi/mips64el/inc
make -C /home/ncroxon/kwf/gnu-efi/mips64el/inc -f /home/ncroxon/kwf/gnu-efi//inc/Makefile SRCDIR=/home/ncroxon/kwf/gnu-efi//inc ARCH=mips64el
make[1]: Entering directory '/home/ncroxon/kwf/gnu-efi/mips64el/inc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/ncroxon/kwf/gnu-efi/mips64el/inc'
mkdir -p /home/ncroxon/kwf/gnu-efi/mips64el/gnuefi
make -C /home/ncroxon/kwf/gnu-efi/mips64el/gnuefi -f /home/ncroxon/kwf/gnu-efi//gnuefi/Makefile SRCDIR=/home/ncroxon/kwf/gnu-efi//gnuefi ARCH=mips64el
make[1]: Entering directory '/home/ncroxon/kwf/gnu-efi/mips64el/gnuefi'
CC crt0-efi-mips64el.o
CC reloc_mips64el.o
In file included from /home/ncroxon/kwf/gnu-efi//gnuefi/reloc_mips64el.c:42:
/home/ncroxon/kwf/gnu-efi//gnuefi/../inc/subst/elf.h:15:10: fatal error: elf.h: No such file or directory
15 | #include ~~
compilation terminated.
make[1]: [/home/ncroxon/kwf/gnu-efi//gnuefi/../Make.rules:71: reloc_mips64el.o] Error 1
make[1]: Leaving directory '/home/ncroxon/kwf/gnu-efi/mips64el/gnuefi'
make: [Makefile:89: gnuefi] Error 2
include
Looks like missing glibc-headers
I'm not seeing this on my platform.
It does look like you invoked the build with a different tuple than what I tested with though: make ARCH=mips64 CROSS_COMPILE=mips64el-linux-gnuabi64-
vs make ARCH=mips64 CROSS_COMPILE=mips64-linux-gnu-
.
You may want to reinstall the MIP64 toolchain with apt install gcc-mips64-linux-gnuabi64
and then try with the same tuple.
Yes, testing with a different distro - running on RHEL-9.1. I have glibc-headers.. for x86_64.. but not for mips64...
Yes, testing with a different distro - running on RHEL-9.1. I have glibc-headers.. for x86_64.. but not for mips64...
Should be the same (it's arch independent), looks like it's missing /usr/include from system header path, we could force include it using (-isystem)
When compiling gnu-efi for mips64 on Ubuntu 24.04 (
make ARCH=mips64 CROSS_COMPILE=mips64el-linux-gnuabi64-
), the following error is produced when building the apps:This is likely to impact us with automated builds when GitHub Actions switches their
ubuntu-latest
builder from 22.04 to 24.04 (and this issue was actually discovered when I tested some builds with GitHub Actions on theirubuntu-24.04
builder).