[comp.sys.sgi] Re GNU emacs 18.55

art@DINORAH.WUSTL.EDU (08/29/90)

 Peter Jaspers-Fayer <SOFPJF@vm.uoguelph.ca> writes...
> Subject:      GNU emacs 18.55
> To: Iris mailing list <info-iris@BRL.MIL>
> 
> >We tried to install GNU emacs v 18.55 on our 380.  I don't know what
> >went wrong, but the make went wild and just about took all available
> >memory, and an unhealthy number of processes, only to result in an
> >error:
> 
> 
> >#make all &
> >[1] 18578
> >#       cd etc; make  all
> >        cd src; make  all
> >        make    -f  xmakefile  all
> >        ./temacs -batch -l inc-vers
> >*** Termination code 139
> 
> 
> >Stop.

Well, yes, we have seen this before, and after much digging we found
the problem.  Let me see if I can recall it in sufficient detail.  The
symptom is that temacs eats up memory at a fantastic rate.  It does
this because of a POSIXification that came along with IRIX 3.3 -- it's
all coming back to me now (Ok, I'll admit it, I peeked!)

It used to be (pre 3.3 days) that the current working directory was
obtained by the system call getcwd.  Now, to be POSIX conformant, the
system call is getwd, and getcwd is a subroutine which is implemented
by calling getwd.

GNU portable-izes this by having a flag HAVE_GETWD, which if it is not
defined causes getwd to be implemented as a function which calls
getcwd and also allocates some memory.

Unfortunately, the default setup for the Silicon Graphics 4D series
does not set HAVE_GETWD, so when temacs calls getwd it allocates 
some memory and calls getcwd which calls getwd which allocates some
memory and calls getcwd which.... well, you get the picture.

To fix this subtle but pernicious problem, just add

#define HAVE_GETWD

to your config.h file (or you could stick it in s-iris3-6.h if you
prefer), and things should go much better.

    	    	Luck!
    	    	 -art smith  (art@dinorah.wustl.edu  or  
    	    	    	      ...!uunet!wugate.wustl.edu!dinorah!art)