gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Trying to cross-compile for arm


From: Lukas Jünger
Subject: Re: [gpsd-users] Trying to cross-compile for arm
Date: Mon, 22 Aug 2016 15:22:52 +0200

Hi guys,

I got it now. So this is how I did it.

I used the linaro compiler and sysroot and crosscompiled ncurses following this: https://how-to-build-for-arm.wikispaces.com/ncurses
However I added "--with-termlib" to the configure statement so that libtinfo is build separately. I copied the .so files to the sysroot's /lib and setup my .scons-option-cache like this:

libgpsmm = False
python = False
prefix = '/home/lukas/sysroot-linux-gnueabi/usr/'
target = 'arm-linux-gnueabihf'
sysroot = '/home/lukas/sysroot-linux-gnueabi'

Best regards
Lukas


2016-07-28 3:40 GMT+02:00 Markus Juenemann <address@hidden>:
Hi Lukas,

I have successfully cross-compiled gpsd-3.10 for XScale/ARM but, of
course, every system is different and cross-compiling can be a very
painful experience.

There's some information the gpsd's build.txt file:

"Depending on how your distribution packages ncurses you may also
require libtinfo5, a separate terminfo library."

You said that you cross-compiled ncurses. Did the instructions mention
libtinfo5?

I suspect that the way you symlink libtinfo to libncurses is wrong.
libtinfo should be a separate library.

As you are certainly aware the error message 'cannot find -ltinfo' means
that the linker cannot find the library. Do you set CFLAGS and LDFLAGS
when running scons?

Depending on your needs you could put 'ncurses = False' into
.scons-option-cache but that way many of the useful command line tools
won't be build.

Happy to provide more help

Markus

> Hello,
>
>
> I'm trying to cross-compile gpsd for my Altera SoC-FPGA board. I setup
> the linaro compiler and the linaro sysroot, also I cross-compiled ncurses
> and added it to the sysroot and I created a
>
> .scons-option-cache containing this:
>
>
> libgpsmm = False
> python = False
> prefix = '/home/lukas/sysroot-linux-gnueabi/usr/'
> target = 'arm-linux-gnueabihf'
> sysroot = '/home/lukas/sysroot-linux-gnueabi'
>
>
> Running scons I get the following error:
>
>
> [...]
>
> arm-linux-gnueabihf-gcc -o cgps
> --sysroot=/home/lukas/sysroot-linux-gnueabi -pthread cgps.o -L.
> -lgps_static -lm -lrt -lncurses -ltinfo
> /home/lukas/gcc-linaro-5.1-2015.08-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.1.1/../../../../arm-linux-gnueabihf/bin/ld:
> cannot find -ltinfo
> [...]
>
>
> Somehow ld doesn't find libtinfo I think. I created symbolic links in
> /lib of my sysroot like this:
>
> libtinfo.so -> libtinfo.so.5
>
> libtinfo.so.5 -> libncurses5.9
>
>
> Did any of you cross-compile gpsd before or does anyone have an idea what
> I am doing wrong?
>
>
> Thank you for your help.
>
> Best regards,
>
> Lukas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]