Failing to compile an Openwrt image

Newbie here...

I have tried unsuccessfully for days to build an up to date custom image for the 52pi (Geeekpi) Raspberry Pi CM4 Router. To create the image I am using a Raspberry Pi 4b 8Gb model running Debian Bullseye OS Lite and after downloading the Github repository for Openwrt, installing all the dependencies and running the update and install scripts with no errors...I proceeded to the 'Make Menuconfig' and selected the target System (Broadcom BCM27xx), Subtarget (BCM2711 boards (64 bit)), and target profile (Raspberry Pi 4b/400/4CM (64bit)). I then added the 'Kernel Modules', 'I2C support' 'Core Utils', 'Libi2c Libraries', 'LUCI Collections for ssl-openssl' and the 'Applications - luci-app-oled' as recommended by 52Pi. When I run the command 'make V=s -j1' or 'make V=s -j5' (to make better use of the 4 core processor) I get the following error....

/usr/bin/mkdir -p '/home/pi/openwrt/openwrt/staging_dir/hostpkg/lib/pkgconfig'
/home/pi/openwrt/openwrt/staging_dir/host/bin/install -c -m 644 libffi.pc '/home/pi/openwrt/openwrt/staging_dir/hostpkg/lib/pkgconfig'
make[7]: Leaving directory '/home/pi/openwrt/openwrt/build_dir/hostpkg/libffi-3.4.2/aarch64-unknown-linux-gnu'
make[6]: Leaving directory '/home/pi/openwrt/openwrt/build_dir/hostpkg/libffi-3.4.2/aarch64-unknown-linux-gnu'
make[5]: Leaving directory '/home/pi/openwrt/openwrt/build_dir/hostpkg/libffi-3.4.2/aarch64-unknown-linux-gnu'
make[4]: Leaving directory '/home/pi/openwrt/openwrt/build_dir/hostpkg/libffi-3.4.2'
mkdir -p /home/pi/openwrt/openwrt/staging_dir/hostpkg/stamp
touch /home/pi/openwrt/openwrt/build_dir/hostpkg/libffi-3.4.2/.built
touch /home/pi/openwrt/openwrt/staging_dir/hostpkg/stamp/.libffi_installed
make[3]: Leaving directory '/home/pi/openwrt/openwrt/feeds/packages/libs/libffi'
time: package/feeds/packages/libffi/host-compile#91.70#8.28#100.22
make[2]: Leaving directory '/home/pi/openwrt/openwrt'
make[1]: *** [package/Makefile:122: /home/pi/openwrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/pi/openwrt/openwrt'
make: *** [/home/pi/openwrt/openwrt/include/toplevel.mk:232: world] Error 2

Please can someone help me make sense of what is happening?

Your expertise and assistance is gratefully appreciated

It would probably be best to compile on x86. Do you have one available to use?

1 Like

The original error message should be (eventually quite a bit) further up in the log. Building on ARMv8 'should' work, but it gets (much) less testing than on x86_64.

1 Like

Hi there,

I created a virtual box x86 Debian VM (20gb RAM, 6 CPU's, 200Gb Storage) on my Windows 11 PC and went through the steps again to compile a customized image. I have included a screenshot of the error....

Does this help to narrow it down?

I looked up what dependency this was supposedly attributed to and it pointed me to 'binutils'...I ran 'sudo apt-get install binutils' and it said that I had the latest version already so I recompiled and same error came up....

Appreciate your assistance