[techtalk] gcc versions and bus error

Robert Kiesling kiesling at mainmatter.com
Tue Feb 29 16:03:54 EST 2000


> My question is: What exactly is a bus error (I thought it was like a seg
> fault - trying to reference a NULL location...) AND why would I be getting
> it on one machine and not another?

No, a bus error is not a segfault, which is a program trying
to access memory it is not authorized to.  Bus errors, I think
are mainly due to timing and/or byte alignment errors...
I'm not sure, though.

> Does it have anything to do with the version of gcc?
> At home, gcc is:
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

More likely, it has to do with the run-time libraries.  You should
make sure you're linking in the SunOS libs, not the GNU libs.
Probably the easiest way to do that is to make sure you're using the
Sun ld, in /usr/ccs/bin and not the GNU ld, which should be in
/usr/local/bin.  At least, that seemed to cure the problems I was
having on my Sparc.


-- 

<a href="coffee://localhost/cream/">stop</a>   http://www.mainmatter.com/

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list