Breaking error building libffi

Anyone else getting this build error?

% make package/libffi/compile package/index V=s
...
CFLAGS="-mcpu=cortex-a76 -O2 -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6=libffi-3.4.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/usr/include -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/include -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/include/fortify " CXXFLAGS="-mcpu=cortex-a76 -O2 -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6=libffi-3.4.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/usr/include -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/include -I/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/include/fortify " LDFLAGS="-L/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/usr/lib -L/scratch/openwrt/staging_dir/toolchain-aarch64_cortex-a76_gcc-14.2.0_musl/lib -fuse-ld=bfd -znow -zrelro " make --jobserver-auth=fifo:/tmp/GMfifo3545584  -C /scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/. AR="aarch64-openwrt-linux-musl-gcc-ar" AS="aarch64-openwrt-linux-musl-gcc -c -mcpu=cortex-a76 -O2 -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6=libffi-3.4.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD="aarch64-openwrt-linux-musl-ld.bfd" NM="aarch64-openwrt-linux-musl-gcc-nm" CC="aarch64-openwrt-linux-musl-gcc" GCC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" STRIP=aarch64-openwrt-linux-musl-strip OBJCOPY=aarch64-openwrt-linux-musl-objcopy OBJDUMP=aarch64-openwrt-linux-musl-objdump SIZE=aarch64-openwrt-linux-musl-size CROSS="aarch64-openwrt-linux-musl-" ARCH="aarch64" ;
make[3]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6'
MAKE x86_64-pc-linux-musl : 0 * all-all
make[4]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make  all-recursive
make[5]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
Making all in include
make[6]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/include'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/include'
Making all in testsuite
make[6]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/testsuite'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/testsuite'
Making all in man
make[6]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/man'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu/man'
make[6]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make[6]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make[5]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make[4]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
MAKE x86_64-pc-linux-musl : 0 * all-configured
make[4]: Entering directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make[4]: *** No rule to make target 'all-configured'.  Stop.
make[4]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/aarch64-openwrt-linux-gnu'
make[3]: *** [Makefile:3826: all-configured] Error 2
make[3]: Leaving directory '/scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6'
make[2]: *** [Makefile:92: /scratch/openwrt/build_dir/target-aarch64_cortex-a76_musl/libffi-3.4.6/.built] Error 2
make[2]: Leaving directory '/scratch/openwrt/feeds/packages/libs/libffi'
time: package/feeds/packages/libffi/compile#0.13#0.04#0.16
    ERROR: package/feeds/packages/libffi failed to build.
make[1]: *** [package/Makefile:189: package/feeds/packages/libffi/compile] Error 1
make[1]: Leaving directory '/scratch/openwrt'
make: *** [/scratch/openwrt/include/toplevel.mk:233: package/libffi/compile] Error 2
2 Likes

Yes, I just got the error a few minutes ago when building mediatek/filogic/MT6000 after a make dirclean.

Yesterday I built ok for DL-WRX36 using the same toolchain. (buyt naturally that was for qualcommax, not mediatek, but that should have no impact here)

OK, I am not sure what is driving it. libffi has not been touched in nearly 1 year

There has been lots of changes today in toolchain...
...autoconf, automake, bc, mtools.

Well, there seems to be also (a likely unrelated) problem with uboot-mediatek:


make[2]: Entering directory '/OpenWrt/aarch64/package/boot/uboot-mediatek'
rm -f /OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01/.configured_*
rm -f /OpenWrt/aarch64/staging_dir/target-aarch64_cortex-a53_musl/stamp/.uboot-mediatek.mt7986_glinet_gl-mt6000_installed
make  -C /OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01 CROSS_COMPILE=aarch64-openwrt-linux-musl-  mt7986a_glinet_gl-mt6000_config
make[3]: Entering directory '/OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01'
#
# configuration written to .config
#
make[3]: Leaving directory '/OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01'
/OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01/scripts/config --file /OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01/.config --disable TOOLS_KWBIMAGE --disable TOOLS_LIBCRYPTO --disable TOOLS_MKEFICAPSULE --enable SERIAL_RX_BUFFER
make  -C /OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01 CROSS_COMPILE=aarch64-openwrt-linux-musl-  oldconfig
make[3]: Entering directory '/OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/u-boot-mt7986_glinet_gl-mt6000/u-boot-2025.01'
scripts/kconfig/conf  --oldconfig Kconfig
*
* Restart config...
*
*
* Serial
*
Serial (SERIAL) [Y/n/?] y
  Default baudrate (BAUDRATE) [115200] 115200
  Make default environment as writable (DEFAULT_ENV_IS_RW) [N/y/?] n
  Require a serial port for console (REQUIRE_SERIAL_CONSOLE) [Y/n/?] y
  Specify the port number used for console (SPECIFY_CONSOLE_INDEX) [N/y/?] n
  Provide a serial driver (SERIAL_PRESENT) [Y/n/?] y
  Enable Driver Model for serial drivers (DM_SERIAL) [Y/n/?] y
    Enable RX buffer for serial input (SERIAL_RX_BUFFER) [Y/n/?] y
      RX buffer size (SERIAL_RX_BUFFER_SIZE) [256] (NEW)

Ah, for me I got the error above building both x86/64 and bcm27xx/bcm2712.

EDIT: should I open an issue?

please open an issue.

1 Like

In the meantime I kinda randomly checked out 2aba2b32 and the build does not error out so I can at least accomplish what I wanted.

1 Like