xilinx petalinux

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xilinx petalinux

J贸zsef B茅rces (LA/ETH)

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?

 

Thanks,

Jozsef


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: xilinx petalinux

Mikael Pettersson-5
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.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions