[Top][All Lists]

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

Re: Change from 3.23 to 3.24 - program doesn't work?

From: Mike Tubby
Subject: Re: Change from 3.23 to 3.24 - program doesn't work?
Date: Wed, 22 Jun 2022 22:48:28 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 22/06/2022 21:45, Gary E. Miller wrote:
Yo Mike!

On Wed, 22 Jun 2022 20:52:26 +0100
Mike Tubby <> wrote:

Its a work project, so I would have to remove some code to protect
the innocent.  
You get paid, we work for free?  Does not seem fair.  Try to give
back in some way on the future.  
I'll sanitise and post later ...
Sadly, people tend to sanitize out their broken pars...

the code that generates this error is in my reader:  
That is NOT an error, read what it says.  You have an API mismatch,
and you either need to change your code for the new API, or stick
with the old gpsd.  

I think we're at slightly crossed purposes.

I am using a matching gpsd version 3.22 and libgps from Debian
(actually Devuan 4.0) and it works as long as I don't attempt to
1) 3.22 is old, 3.24 is current
2) The Debian binary is not from us.
3) If you gpsd and libgps version match, then you will not fail the version

If I try to check then the things I have to play with appear to be:

     1) the version_t structure; and
     2) the pair of #defines for API major and minor versions
Don't touch those.  That is like fixing a house fire by changing the
street address.

So, what what a program has available at run-time I don't see how I
can ever do a valid check since

     proto_major (value 3) != API major (value 11)  && proto_minor 
(value 14) != API minor (value 0)
That can only happen if you have multiple versions of gpsd installed.
Don't do that.

I fully understand that if I install matching versions of gpsd/libgps 
everything will work,
So, have you?  Or have you not?

I do not have mis-matched versions at this time.  The gpds version 3.22 and libgps match, **BUT** I am trying to code to detect mis-matched versions in the future.

but what comparisons do I perform to check if 
things are out of step,
None,  fix the root cause: mismatched versions.

I don't actually have mis-matched versions I want to check for possible mis-matched versions in the future.

The problem is that if I test the only things that I can test it tells me that it is mis-matched when it is not, hence my questions to understand if I am testing the correct things?

And right back to the issue with version_t in the GPSD/libgps code, i.e. /usr/include/gps.h where version_t is defined:

struct version_t {
    char release[64];                   // external version
    char rev[64];                       // internal revision ID
    int proto_major, proto_minor;       // API major and minor versions
    char remote[GPS_PATH_MAX];          // could be from a remote device

highlighted in red - the variable names are 'proto_major' and 'proto_minor' but the comment says API major and API minor.

When I compare the #define for API_MAJOR_VERSION (which is 11) to proto_major (which is 3) they do not match.

What I need to know is should they match?

I have created a test/demo program based on my code that includes the whole of my low-level GPSD client module gpsd.[c,h], my cross platform timer routines (which are needed) and test.c - a README file exists to aid the reader.



for example if gpsd has been upgraded but
libgps has not ... ?

That you are screwed.  Don't do that.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  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: gpsd-test.tar.gz
Description: GNU Zip compressed data

reply via email to

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