gpsd-users
[Top][All Lists]
Advanced

[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 09:35:11 +0100

"Illegal instruction" sounds like the compiled machine code contains
instructions that are not appropriate for the CPU.

For example, if you had compiled a program on a PC with Pentium
processor and tried to run it on an old 386, that might happen, too,
even though both are 32 bit. The reason is because the Pentium knows
some newer CPU instructions that a 386 didn't know.

I think the same could happen on a Raspi if you compiled a program on a
newer 32 bit Raspi and and tried to run it on another one with an older CPU.

Have you also *built* gpsd on the Raspi 1B, or have you just copied the
executable program from the Raspi 4B to the Raspi 1B?

You could run the 'file' command that was mentioned before on the old
Raspi. Compare the output of

 file gpsd

to the output of

 file /usr/bin/zip

or any other file in /usr/bin/ that has come with the distro. Maybe just
post the output here.

We still don't
know /why/ there was problem with 3.20 from the backports not working,
but I'd wondered about the ARM level.  I tried a number of ARM versions
but still got the illegal instruction.

Inexperienced as I am, I don't know how to proceed, or what the issue is
likely to be.  cgps and ubxtool both work exactly as expected.

I thing the processor type has to match *exactly*, and the best way to
achieve this is to build a program on the target system.

Martin
===========================================

Martin,

Thanks for your thoughts. Yes, I'd thought it might be an ARM level difference because the processors differ between the 1B and the 4B (and the memory etc. etc.). I wrote a stripped down executable which also fails, and here's the file output for both:

pi@raspi-3:~/gpsd $ file gpsdCheckVersion
gpsdCheckVersion: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=35c367a77e515389520a1610efc16c58f0fa4e26, not stripped

pi@raspi-3:~/gpsd $ file gpsd
gpsd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=a288b84eb959046a227a985bcc67e2a663855889, not stripped

pi@raspi-3:~/gpsd $ file /bin/tar
/bin/tar: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=53533d506171c559ad7c50eecf27e585e511040f, stripped

They look identical to me - RasPi-3 is the node name, not the hardware version, BTW.

gpsd was built on the Raspberry Pi 1B, as was the gpsdCheckVersion program.

Cheers,
David
--
SatSignal Software - Quality software for you
Web: https://www.satsignal.eu
Email: address@hidden
Twitter: @gm8arv


reply via email to

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