[comp.emacs] 18.55 on Sparcstation 1+ and SunOS 4.10

esj@ufnet.ufl.edu (Eric Johnson) (07/06/90)

>I have been attempting to make emacs on a Sparcstation 1+ running SunOS
>4.10 and seem to be having little success. Compilation seems to be going
>fine, but whenever I run the final executable I get 
>
>fatal error (6). Aborted.

I had the same problem. The malloc in emacs seems to disagreee
with SunOS 4.1. I built it with SYSTEM_MALLOC defined 
in src/config.h. It works fine now.

A related question: Has anyone successfuly built emacs
18.55 on SS1 SunOS 4.1 with gcc 1.37.1? When I did
my temacs dumped core mighty quick.

Ej

bashford@scripps.edu (Don Bashford) (07/11/90)

>
>A related question: Has anyone successfuly built emacs
>18.55 on SS1 SunOS 4.1 with gcc 1.37.1? When I did
>my temacs dumped core mighty quick.
>
>Ej

Same thing happened to me with gcc on SS1 SunOS 4.0.
In gdb it looks like:

Program received signal 10, Bus error
0x41188 in staticpro (varaddress=(int *) 0xbce00) (alloc.c line 679)
(gdb) where
#0  0x41188 in staticpro (varaddress=(int *) 0xbce00) (alloc.c line 679)
#1  0x5a308 in init_obarray () (lread.c line 1094)
#2  0x1e004 in main (...) (...)

But I was unable to figure out the problem.

Donald Bashford
bashford@scripps.edu

djm@eng.umd.edu (David J. MacKenzie) (07/16/90)

>>A related question: Has anyone successfuly built emacs
>>18.55 on SS1 SunOS 4.1 with gcc 1.37.1? When I did
>>my temacs dumped core mighty quick.

The problem is due to emacs using a char array as ints, and sparc
alignment doesn't allow that, but Sun cc aligns the array on an int
boundary anyway so it's ok unless you use gcc.

The fix is:

Article 2206 of gnu.gcc.bug:
Path: mojo!mimsy!haven!purdue!tut.cis.ohio-state.edu!AI.MIT.EDU!rms
From: rms@AI.MIT.EDU
Newsgroups: gnu.gcc.bug
Subject: gcc 1.36 fails to make emacs
Message-ID: <8911082240.AA04259@sugar-bombs.ai.mit.edu>
Date: 8 Nov 89 22:40:51 GMT
References: <8911081740.AA09001@orchestra.ecn.purdue.edu>
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 13

The bug is in Emacs.  Please try the following change in alloc.c in
Emacs:

int staticidx = 0;

#ifdef __GNUC__
Lisp_Object *staticvec[NSTATICS] = {0};
#else
char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0};
#define staticvec ((Lisp_Object **) staticvec1)
#endif

/* Put an entry in staticvec, pointing at the variable whose address is given */


--
David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>