Subject: Re: Problems building "emacs" under NetBSD 2.0
To: None <port-sparc@netbsd.org>
From: Matthias Scheler <tron@zhadum.de>
List: port-sparc
Date: 01/01/2005 02:44:43
On Fri, Dec 31, 2004 at 09:21:05PM +1030, Brett Lymn wrote:
> > I cannot build "emacs" from "pkgsrc" (2004-12-29 HEAD sources) under
> > NetBSD 2.0 on my SPARCStation LX any more. It dies while trying to dump:
> This may be totally unrelated but I had a similar sort of problem with gcc3
> on a sparc system using Solaris, dump would bus error.  It turned out to be
> a problem with the gcc crt0, somehow the destructor list had a NULL on it
> which caused the bus error just when temacs was exiting.

That doesn't sound too unlikely.

> Can you run gdb on temacs with the dump command line and see if it
> faults in the dtor? if it does I have a hack that will stop the bus
> error.

I've rebuild the "emacs" package with "-g" and used "gdb" but the
stack trace is still not very useful:

tron@ivanova:/src/NetBSD-current/pkgsrc/editors/emacs/work/emacs-21.3/src>LC_ALL=C gdb ./temacs
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc--netbsdelf"...
DISPLAY = localhost:11.0
TERM = xterm
Breakpoint 1 at 0xa5f90: file emacs.c, line 387.
run Breakpoint 2 at 0x87fac: file xterm.c, line 11997.
(gdb) run -batch -l loadup dump
Starting program: /src/NetBSD-current/pkgsrc/editors/emacs/work/emacs-21.3/src/temacs -batch -l loadup dump

Program received signal SIGBUS, Bus error.
0x10182fac in ?? ()
(gdb) where
#0  0x10182fac in ?? ()
#1  0x101844f0 in ?? ()
#2  0x10183400 in ?? ()

This makes the shared library theory more likely because debugging
symbols are not available for the part of the code where it crashed.

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/