TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: DAVID TAYLOR
from: CHRIS GREEN
date: 2020-05-26 14:01:00
subject: Re: ARM7 program for Rasp

David Taylor  wrote:
> On 26/05/2020 09:20, Chris Green wrote:
> []
> > If you are doing a straight compile (using gcc or g++) on your Pi to
> > create an executable program for the Pi then I'd expect it to 'just
> > work', no special compiler options or anything required.
> >
> > An "illegal instruction" error doesn't necessarily mean the compiler
> > has generated an illegal instruction, it may just mean you have a bug
> > in your program so that you are trying to execute something that isn't
> > code.
> >
> > I'd certainly be looking for a bug in my proram before looking for
> > esoteric compiler issues.  :-)
>
> Thanks, Chris.  It's not the program, but the link option.  If I make a
> "Hello World" program it fails when using the same link option (-lgps)
> and not when that option is removed.  I've checked the library and it
> appears to be OK - it's the one generated at the same time as I built
> gpsd from gitlab.
>
> The support programs like cgps and ubxtool were built at the same time
> /presumably/ using the same library, but I'm now trying to find the link
> options used to build those programs.
>
Yes, suggests that for some reason it's *linking* to a bad library.
I'm surprised that "Hello World" fails though as it surely is using
hardly any libraries.

Though, wait a minute, isn't it just telling you there's a bug in the
library (same way as I was saying in my original message).  The
"illegal instruction" is just the bug in the library code trying to
execute something it shouldn't.

--
Chris Green
ยท

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.