[Top][All Lists]

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

Re: [gpsd-dev] [PATCH] Various fixes to build for android

From: Samuel CUELLA
Subject: Re: [gpsd-dev] [PATCH] Various fixes to build for android
Date: Sat, 30 Aug 2014 09:30:57 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 08/29/14 20:31, Eric S. Raymond wrote:
> Matt <address@hidden>:
>> There still remains issue 3 below: there are many symbols in libgps
>> which are needed by libgpsd, but libgpsd isn't linked against
>> libgps.
>> One consequence: if you want to dlopen() libgpsd for some reason,
>> you need to dlopen() libgps first; whereas if libgpsd were linked
>> against libgps, the runtime linker would load libgps automatically
>> for you when you dlopen()'ed libgpsd.
>> Attached is a program that does this, to show the hoops such a
>> program has to jump through. I'm not claiming the program is
>> inherently useful in any way at all, nor even a good idea :-)
>> Why is it drastic and/or incorrect to simply link libgpsd against libgps?
> I'm twitchy about this because I dimly remember trying it at one point
> and having things break spectacularly on one or more of our target
> platforms. But I don't remember where or why.  Groveling through the
> change comments has not proved enlightening.
> Now that I think about it, though, this problem might have been an artifact
> of reverse linkage.  I guess it  might be time to try this again, carefully.
> Alternatively, if we can identify the subset of library modules in libgps
> that libgpsd uses, perhaps we can simply add them to the list libgpsd
> is built from. 
The latest HEAD now builds flawlessly for Android. The only remaining
problem is the reverse linking of some symbols, such as unix_to_iso8601,
gps_clear_fix, etc.

These symbols are defined in libgps, used in libgpsd, but libgpsd is not
linked to libgps. The gpsd binary is built against both libs, and it
works on Linux because the linker seems to search all binaries for all
symbols. It rely heavily on the linker to be able to do that reverse or
"full search" linking.

Linking the library which needs the symbols (libgpsd) to the library
which define those (libgps) solves the problem, like in the patch I

reply via email to

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