AnsweredAssumed Answered

LibIIO cross-compiling

Question asked by Dvorkin on Jun 8, 2015
Latest reply on Jun 9, 2015 by Dvorkin

I'd like to cross-compile LibIIO for Xilinx's Zynq Linux.

I've cross-compiled LibXML2 and LibIIO master branch. There were not any errors in LibIIO compilation:

([  8%] Building C object CMakeFiles/iio.dir/channel.c.o

[ 16%] Building C object CMakeFiles/iio.dir/device.c.o

[ 25%] Building C object CMakeFiles/iio.dir/context.c.o

[ 33%] Building C object CMakeFiles/iio.dir/buffer.c.o

[ 41%] Building C object CMakeFiles/iio.dir/utilities.c.o

[ 50%] Building C object CMakeFiles/iio.dir/local.c.o

[ 58%] Building C object CMakeFiles/iio.dir/network.c.o

[ 66%] Building C object CMakeFiles/iio.dir/xml.c.o

Linking C shared library libiio.so

[ 66%] "Built target iio"

).

But LibIIO tests were not compiled, there are errors:

Linking C executable iio_genxml

../libiio.so.0.5: undefined reference to `gzclose'

../libiio.so.0.5: undefined reference to `inflate'

../libiio.so.0.5: undefined reference to `__fpclassify'

../libiio.so.0.5: undefined reference to `crc32'

../libiio.so.0.5: undefined reference to `gzdopen'

../libiio.so.0.5: undefined reference to `fmod'

../libiio.so.0.5: undefined reference to `deflate'

../libiio.so.0.5: undefined reference to `deflateInit2_'

../libiio.so.0.5: undefined reference to `gzopen64'

../libiio.so.0.5: undefined reference to `gzread'

../libiio.so.0.5: undefined reference to `inflateEnd'

../libiio.so.0.5: undefined reference to `deflateEnd'

../libiio.so.0.5: undefined reference to `gzwrite'

../libiio.so.0.5: undefined reference to `trunc'

../libiio.so.0.5: undefined reference to `inflateInit2_'

../libiio.so.0.5: undefined reference to `pow'

../libiio.so.0.5: undefined reference to `log10'

../libiio.so.0.5: undefined reference to `gzdirect'

../libiio.so.0.5: undefined reference to `floor'

 

But when I trying to compile my own application (the application uses LibIIO) there are errors appear:

 

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `inflateEnd'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzopen64'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzdirect'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzclose'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `deflate'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `inflateInit2_'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `inflate'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzwrite'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `crc32'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `deflateEnd'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzdopen'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `deflateInit2_'

H:\Shared\_Proj\AD_AD6676\SDK\ad6676_linux/LibIIO/libiio.so: undefined reference to `gzread'

 

The application has been fine compiled on AD's Linux Ubuntu, and it works fine too. But now I want to run it on Xilinx's Zynq Linux.

It seems that the LibIIO wants to use other libraries (math and z).


What is wrong?

Outcomes