External library swiftnav when cross-compiling dune

65 views
Skip to first unread message

Kristian Klausen

unread,
Oct 25, 2014, 7:25:47 AM10/25/14
to lsts-to...@googlegroups.com
Hi,

I am working on incorporating swiftnav with Dune, but I have som problems when I use the toolchain to compile for lctr-b2xx:

Library: swiftnav. The library is built with glued, and installed to toolcain/sysroot/usr: https://github.com/LSTS/glued/blob/master/rules/libswiftnav/default.bash#L49
The cmake-configuration can be seen here: https://github.com/LSTS/dune/blob/master/cmake/Libraries/Swiftnav.cmake

This configuration works fine when I compile locally for host.
But, when using the crosscompiler, I get the following:

cmake -DCROSS=/home/krisklau/uavlab/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi- ../dune

---- Relevant output ----
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /home/krisklau/uavlab/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi-gcc
-- Check for working C compiler: /home/krisklau/uavlab/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /home/krisklau/uavlab/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi-g++
-- Check for working CXX compiler: /home/krisklau/uavlab/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done

--snipsnip--

-- ******************************************
-- ***          Probing Libraries         ***
-- ******************************************
-- Looking for jpeg_set_defaults in jpeg
-- Looking for jpeg_set_defaults in jpeg - not found
-- Performing Test DUNE_SYS_HAS_JPEGLIB_H
-- Performing Test DUNE_SYS_HAS_JPEGLIB_H - Failed
-- Performing Test HAVE_LIB_JPEG_80
-- Performing Test HAVE_LIB_JPEG_80 - Failed
-- Looking for sbp_state_init in swiftnav
-- Looking for sbp_state_init in swiftnav - not found
-- Looking for C++ include libswiftnav/sbp.h
-- Looking for C++ include libswiftnav/sbp.h - found


-----

So, the header files are found, but the library-check fails. I even tried to manually copy the library file to several other locations, still no luck:


find . -name "libswiftnav.so" | xargs file
./lctr-b2xx/rootfs/usr/lib/libswiftnav.so:                                     ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
./lctr-b2xx/builds/libswiftnav/build/src/libswiftnav.so:                       ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
./lctr-b2xx/toolchain/lib/libswiftnav.so:                                      ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
./lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/lib/libswiftnav.so:     ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
./lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/lib/libswiftnav.so: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
./lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/lib/libswiftnav.so:             ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped

Any thoughts on what could be wrong, or anything else I should check?

Regards,
Kristian

Kristian Klausen

unread,
Oct 25, 2014, 10:42:09 AM10/25/14
to lsts-to...@googlegroups.com
Hi again,

I tried linking with the library regardless of the check, and it seems to be the library that has some dependency-errors. So the library is found, but I guess the check fails because a test-program fails to link. In other words, not a glued-issue :) I'll post the error to the library developers in stead.

Kristian

Ricardo Martins

unread,
Oct 25, 2014, 10:47:03 AM10/25/14
to Kristian Klausen, lsts-to...@googlegroups.com
If I have time I'll check that today.

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsts-toolchain/d5670972-32b4-490b-98f3-bebe5ca66218%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ricardo Martins

unread,
Oct 26, 2014, 12:57:43 PM10/26/14
to Kristian Klausen, lsts-to...@googlegroups.com
Hi Kristian,

When you build Swiftnav you get one shared library (libswiftnav.so) and a static library (libswiftnav-static.a). If you probe and link against the static library you don't get unresolved symbols. Maybe you should use that one in the meantime.
Reply all
Reply to author
Forward
0 new messages