gpsd-users
[Top][All Lists]
Advanced

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

Re: cross-compiling gpsd with yocto and toolchain


From: Gary E. Miller
Subject: Re: cross-compiling gpsd with yocto and toolchain
Date: Fri, 3 Apr 2020 18:10:27 -0700

Yo Guido!

On Fri, 3 Apr 2020 19:10:45 +0200
Guido Gavilanes <address@hidden> wrote:

> I am trying to compile a program (lets call it "myprog") for an
> embedded platform (arm) using yocto (thud).
> myprog uses the function ntp_read present in the library libgpsd.so.
> I have tested the code in a (quick and dirty) ubuntu on arm (with
> gpsd and library installed) and it works fine.

I know people that compile gpsd fine with yocto.

Kinda hard for us to say much about your un-named program, building
with some un-named process, on some un-named arch, with un-named
toolchain, and no build logs.

Since, as you say, it works on ubuntu, it would seem like a problem with
your un-specified bulid chain.

> but on yocto, when I compile myprog, I find the error:
> undefined reference to `ntp_read'. The compilation is linking
> libgpsd.so,

Uh, there is no libgpsd.so.  That might be part of your problem.

Ntp_read() is part of ntpshmmon, not gpsd or any other gpsd clients.
ntp_read() is in ntpshmread.c which is in libgpsd.a

> but I see that libgpsd does not have the function
> ntp_read().

And yet you say it worked on Ubuntu, so libgpsd.a would appear to
have that function.  Back to some issue with your build chain.

> I have compared the libraries of ubuntu-arm and the one
> generated by yocto and they differ in that the function is not
> present into yocto library and it is present in the one from ubuntu
> on arm. The recipe I am using for gpsd (yocto default) is this:
> https://git.congatec.com/yocto/meta-openembedded/tree/sumo/meta-oe/recipes-navigation/gpsd/gpsd-3.17

3.17 is old, and no longer supported here.  Yocto does use pretty much
the years old gpsd scons, so no idea why it would behave differently
from the Ubuntu build.

> With this libgpsd.so is also generated into the rootfs.

I can't parse that.

> I used the SCONS parameters to set the ntpshm, ntp and pps to
> guarantee it is compiled with no errors, but I checked and ntp_read
> function is not present.

We can't debug bulid logs that we can't see.

> What should I do to make the libgpsd.so compilation to have the
> ntp_read? is there something I am probably missing to set up?

Since you are trying to build a file (libgpsd.so) that no longer
exists, no ideas here.

> I have tried also to cross-compile gpsd from source using the yocto
> generated toolchain, but I found the error:
> fatal error: gnu/stubs-soft.h: No such file or directory

never heard of such a thing.  Some issue with your un-named build
chain on your unspecified arch.

> and none of the solutions I have found on the Internet has changed
> I am stalled on this, in the case someone who knows gpsd code in deep
> might give me an idea of how to solve this, please let me know.


Since you can compile on Ubuntu, this has little to do with gpsd, but
instead your un-named build environment.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpYkhUnnFOuQ.pgp
Description: OpenPGP digital signature


reply via email to

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