Hardware : MIMX9352CVVXMAB / I.MX93EVK board
WSL : Linux combassou 5.15.167.4-microsoft-standard-WSL2+
Ubuntu version : Ubuntu 22.04
Reference documentation : IMX_YOCTO_PROJECT_USERS_GUIDE.pdf
Hi, I am a new to the Yocto build system. I followed the steps given in the yocto project user guide provided by NXP, but I encountered a number of errors while building my image [imx-image-core], one of which I could not solve : "ERROR: libmpc-1.3.1-r0 do_configure: configure failed".
Executing "bitbake libmpc" returns the same error. cleaning and rebuilding libmpc does not solve it. same for gmp, mpfr, gcc, meta-toolchain. below is the list of commands I tried :
bitbake -c cleansstate libmpc
bitbake -c cleansstate gmp
bitbake -c cleansstate mpfr
bitbake -c cleansstate gcc
bitbake -c cleansstate meta-toolchain
bitbake meta-toolchain
This error seems to originate from the interaction with MPFR library, see the extract of my console below.
.
.
.
| checking for MPFR... no
| configure: error: libmpfr not found or uses a different ABI (including static vs shared).
| NOTE: The following config.log files may provide further information.
| NOTE: /home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/alexandre/imx-yocto-bsp/sources/poky/meta/recipes-support/libmpc/libmpc_1.3.1.bb:do_configure) failed with exit code '1'
When looking at the logs, the libmpfr is indeed not found. See the extract of the log (log.do_configure.XXX) below :
.
.
.
| checking for MPFR... no
| configure: error: libmpfr not found or uses a different ABI (including static vs shared).
| NOTE: The following config.log files may provide further information.
| NOTE: /home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/alexandre/imx-yocto-bsp/sources/poky/meta/recipes-support/libmpc/libmpc_1.3.1.bb:do_configure) failed with exit code '1'
This log (config.log) in particular provides more precision to the error. See below :
.
.
.
configure:14040: checking for MPFR
configure:14055: aarch64-poky-linux-gcc -march=armv8-a+crc+crypto -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot -o conftest -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/mpc-1.3.1=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/mpc-1.3.1=/usr/src/debug/libmpc/1.3.1 -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot= -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot= -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot-native= -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/mpc-1.3.1=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/mpc-1.3.1=/usr/src/debug/libmpc/1.3.1 -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/build=/usr/src/debug/libmpc/1.3.1 -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot= -fmacro-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot= -fdebug-prefix-map=/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot-native= -Wl,-z,relro,-z,now conftest.c -lmpfr -lgmp -lm -lm >&5
/home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/13.3.0/ld: /home/alexandre/imx-yocto-bsp/build/tmp/work/armv8a-poky-linux/libmpc/1.3.1/recipe-sysroot/usr/lib/libmpfr.so: undefined reference to `__bid128_to_binary64'
collect2: error: ld returned 1 exit status
configure:14055: $? = 1
.
.
.
So it seems libmpc do_configure step fails during linking step. Any idea on how to solve it ?
Thank you for your attention.