gpsd-users
[Top][All Lists]
Advanced

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

Re: Illegal instruction....


From: Martin Burnicki
Subject: Re: Illegal instruction....
Date: Tue, 26 May 2020 11:41:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

David J Taylor wrote:
> Martin,
> 
> I made the changes you suggested, and I had to remove the gpsdata struct
> definition as well, of course. 

Yes, sorry I forgot that.

> The program is compiled with just a gcc
> command:
> 
> pi@raspi-3:~ $ gcc gpsdVersionCheck.c -o gpsdCheckVersion -lgps
> pi@raspi-3:~ $ ./gpsdCheckVersion
> Illegal instruction
> 
> pi@raspi-3:~ $ gcc gpsdVersionCheck.c -o gpsdCheckVersion
> pi@raspi-3:~ $ ./gpsdCheckVersion
> GPSD API < 7
> pi@raspi-3:~ $

This really sounds like the problem occurs when some initialization code
of the GPS library is called, but the library has been compiled for a
different ARM CPU version.

> So it's something to do the the gps linked library.  I wonder which one
> of these it might be:
> 
> pi@raspi-3:~ $ sudo find / -name gps
> /usr/lib/python3/dist-packages/gps
> /usr/local/lib/python2.7/dist-packages/gps
> /home/pi/gpsd/contrib/gps
> /home/pi/gpsd/tests/gps
> /home/pi/gpsd/gps
> /home/pi/gpsd/devtools/gps
> 
> I feel like I'm getting somewhere now!

the compiler option -lgps assumes that the base name of the library file
is prepended by "lib", so you have to search for a file libgps*, and you
have to put the search name in quotation marks, i.e.:

sudo find / -name "libgps*"

The search may return real binary files, and some symbolic links.

Run the 'file' command against the binary file(s) and compare the output
to the output of the 'file' command run against your test program or
other standard programs in /usr/bin/.

I'd expect the result for the library file should be somewhat different.

Martin



reply via email to

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