awk: symbol lookup error: awk: undefined symbol: mpfr_z_sub
I have encountered this strange error message while trying to compile the linux kernel for the ARM host of the ZYNQ under ubuntu 14.04 64Bits.
awk works always fine and as soon as you source the xilinx setting64.sh it stops working, consequently you will no more be able to compile the kernel since it needs awk working.
Solution, for the console session in which you are compiling the kernel, do not source the setting64.sh file just add the address path for the folder containing arm toolchain to your path environment variable.
e.g.
export PATH=$PATH:/opt/Xilinx/SDK/2014.4/gnu/arm/lin/bin
Hi
I encountered the same issue with Ubuntu 15.04 and Vivado 2015.1, while I never had this problem on the next combinations:
Ubuntu 14.04 and Vivado 2013.3
Ubuntu 14.04 and Vivado 2014.4
Ubuntu 14.04 and Vivado 2015.1
Everything 64bit.
I could not find any other references to this issue on Google and the proposed solution is too impractical for me (automated build system). So I went looking for details:
$ strace awk
…
open(“/opt/Xilinx/Vivado/2015.1/lib/lnx64.o/libgmp.so.7″, O_RDONLY|O_CLOEXEC) = 3
…
So mpfr_z_sub is from the MPFR tool which is used by GMP, and the library is loaded from the Xilinx directory and not compatible with awk from Ubuntu. So I tried to run awk without the Xilinx libraries and it works:
$ LD_LIBRARY_PATH=”” awk
I then used the same trick to run make.
Regards,
Iztok Jeras
Hi Iztok, thanks for nice info.
And, another solution is to update the
/opt/Xilinx/Vivado/2016.1/.settings64-Vivado.sh
Just remove the final lines which are setting LD_LIBRARY_PATH
Xilinx says these are needed only when you are using AXI BFM.