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.
but on yocto, when I compile myprog, I find the error:
undefined reference to `ntp_read'. The compilation is linking libgpsd.so, but I see that libgpsd does not have the function ntp_read().
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:
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.
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?
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
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.
Thank you.
--
Guido