From: Matt Rhoten (mrhoten@cs.stanford.edu)
Date: 09/08/92


From: mrhoten@cs.stanford.edu (Matt Rhoten)
Subject: Re: Compiling TCSH
Date:  8 Sep 1992 19:57:38 GMT

jonathan@nova.next.nd.edu (Jonathan Bradshaw) writes:

>I downloaed tcsh.tar.Z which contains a tcsh.a and Makefile. I am using the
>MCC interim release of Linux that is currently on the archive site (tsx-11).
>The problem is I get:

>tcsh.a(sh.o): Undefined symbol _setjmp referenced from text segment

I ran into this too. The problem is that the libraries define __setjmp,
not _setjmp. According to ANSI, apparently. Read <setjmp.h> for more.
Run nm on tcsh.a and libc.a for even more info.

Apparently tcsh.a was compiled with a different library?

My initial thought for a solution was to write a stub setjmp and have
it do the right thing. First I tried writing a stub _setjmp, at which
point I found out that the version of gcc I have (2.2.2d) doesn't grok
-mno-underscore (or whatever the option is). So I switched to try a
stub setjmp, figuring the underscore would get added, which it did.
If you try to do this, be sure to #undef setjmp before declaring your
routine, if you include <setjmp.h>, as it is a macro in that header.

So I linked 'em together, and tcsh ran, sort of. My hacked version did
things like hang, use up all my memory, run out of swap, and cause
kernel panics. Oh, and hose my filesystem a bit. So I deleted my
hacked version, figuring to download source later.

 -matt

-- 
Matthew Rhoten | mrhoten@cs.stanford.edu | m_rhoten@leland.stanford.edu
"When Adam and Eve first saw each other, that's when the blues started."
 -John Lee Hooker