[erlang-questions] xilinx petalinux

Mikael Pettersson <>
Fri Sep 15 19:33:40 CEST 2017

József Bérces writes:
 > Hi,
 > Has anyone tried to compile Erlang/OTP for Xilinx Petalinux? Well, I did and failed, so my last hope is in this community 😊
 > I created an xcomp config file based on the existing erl-xcomp-arm-linux.conf and replaced the compiler varables to point to XSDK. For example:
 > CC="/opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc --sysroot=$ARM_SYSROOT"
 > I also added the following at the beginning of the config file:
 > ARM_SYSROOT=/opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc
 > It went well until linking time when I got these errors:
 > /opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldlpi
 > /opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -linet
 > /opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ltinfo
 > /opt/Xilinx/SDK/2017.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lkstat
 > Any ideas how to fix this?

There are two documented ways to cross-compile Erlang/OTP.  I've never used the pre-cooked "xcomp"
route myself, but a normal configure/make (following HOWTO/INSTALL-CROSS.md) has worked well for me
in the past.

Three of the missing libraries listed above seem unexpected to me for a GNU/Linux system.
./configure _should_ detect their absence so I can only assume that the "xcomp" route makes
too many hard-coded assumptions, or has mis-identified your target system.

The -ltinfo issue can be worked around by passing --without-termcap to ./configure, but you then
get an Erlang shell that's less featureful when it comes to command-line editing and such.
If you want these features, cross-build ncurses and install that in your sysroot first.

More information about the erlang-questions mailing list