[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Illegal instruction....
From: |
David J Taylor |
Subject: |
Re: Illegal instruction.... |
Date: |
Tue, 26 May 2020 10:30:03 +0100 |
From: Martin Burnicki
This doesn't sound like the version of the include file is the problem,
and "illegal instruction" is not related to the API version but to the
machine code compiled from that source code.
If my assumption is correct you should also get the "illegal
instruction" if you remove the line
#include <gps.h>
and add one of the following instead:
#define GPSD_API_MAJOR_VERSION 6
#define GPSD_API_MAJOR_VERSION 8
I thought
compiling in the /home/pi/gpsd directory might do that, but I recall
there being something about different include file locations - system
and local? I wonder how the build of gpsd got it right! Changing
<gps.h> to "gps.h" while compiling in the gpsd directory still produced
the illegal instruction.
how do you compile the program? Using a single command line, or is there
a Makefile?
Martin
=============================
Martin,
I made the changes you suggested, and I had to remove the gpsdata struct
definition as well, of course. 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:~ $
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!
Cheers,
David
--
SatSignal Software - Quality software for you
Web: https://www.satsignal.eu
Email: address@hidden
Twitter: @gm8arv
- Illegal instruction...., David J Taylor, 2020/05/25
- Re: Illegal instruction...., Martin Burnicki, 2020/05/25
- Re: Illegal instruction...., David J Taylor, 2020/05/25
- Re: Illegal instruction...., Gary E. Miller, 2020/05/25
- Re: Illegal instruction...., Paul Theodoropoulos, 2020/05/25
- Re: Illegal instruction...., David J Taylor, 2020/05/26
- Re: Illegal instruction...., Martin Burnicki, 2020/05/26
- Re: Illegal instruction....,
David J Taylor <=
- Re: Illegal instruction...., Martin Burnicki, 2020/05/26
- Re: Illegal instruction...., David J Taylor, 2020/05/26
- Re: Illegal instruction...., Gary E. Miller, 2020/05/26
- Re: Illegal instruction...., David J Taylor, 2020/05/26
- Re: Illegal instruction...., Gary E. Miller, 2020/05/26
- Re: Illegal instruction...., David J Taylor, 2020/05/27
- Re: Illegal instruction...., Bryan Christianson, 2020/05/27
- Re: Illegal instruction...., David J Taylor, 2020/05/27
- Re: Illegal instruction...., Charles Curley, 2020/05/27
- Re: Illegal instruction...., David J Taylor, 2020/05/27