The petalinux-config
menu crashes with segmentation fault on CentOS
7.x as shown below. This is a known issue in 2020.x version of PetaLinux tools.
Figure 1. Segementation Fault on CentOS 7.x
$ petalinux-config INFO: Sourcing build tools awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) [INFO] Generating Kconfig for project awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk) [INFO] Menuconfig project
This issue is seen when you run petalinux-config
with
non-interactive mode.
$ petalinux-config --silentconfig
INFO: sourcing build tools
awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk)
awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk)
awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk)
awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk)
[INFO] silentconfig project
awk: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by awk)
ERROR: Failed to silentconfig project component
ERROR: Failed to config project.
$
Root Cause
In CentOS-7.x if you set LD_LIBRARY_PATH variable (example export
LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64) causes the
petalinux-config
menu to crash with segmentation fault. In
Yocto, if you want to use any build host binaries or libraries you need to unset
LD_LIBRARY_PATH. Once it goes to segmentation fault terminal, follow these steps to
kill the seg fault terminal.
- Type
reset
and enter key. Now terminal will be blank. - Press Ctrl+J same time.
Now you should have a working terminal.
Solution
To work around this issue, follow these steps.
- Unset the LD_LIBRARY_PATH by running below
command.
$ unset LD_LIBRARY_PATH
- Source the PetaLinux
tools.
$ source /opt/xilinx/petalinux/petalinux-v2020.1/settings.sh
- Run menu config.
$ petalinux-config