Subject: Problems building "emacs" under NetBSD 2.0
To: None <port-sparc@NetBSD.org, tech-pkg@NetBSD.org>
From: Matthias Scheler <tron@zhadum.de>
List: port-sparc
Date: 12/31/2004 10:26:22
	Hello,

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:

cd ../lwlib/; /usr/pkg/bin/gmake -w CC='cc' CFLAGS='-O2 -fno-zero-initialized-in-bss -I/usr/pkg/include -I/usr/X11R6/include -I/usr/include' MAKE='/usr/pkg/bin/gmake' "C_SWITCH_X_SITE=-I/usr/X11R6/include" "C_SWITCH_X_MACHINE=" "C_SWITCH_X_SYSTEM=" "C_SWITCH_SITE=" "C_SWITCH_MACHINE=" "C_SWITCH_SYSTEM=-I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib"
gmake[2]: Entering directory `/src/NetBSD-current/pkgsrc/editors/emacs/work/emacs-21.3/lwlib'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/src/NetBSD-current/pkgsrc/editors/emacs/work/emacs-21.3/lwlib'
LC_ALL=C ./temacs -batch -l loadup dump
[1]   Bus error               LC_ALL=C ./temac...
gmake[1]: *** [emacs] Error 138

I've already tried to add "UNLIMIT_RESOURCES+= datasize stacksize"
to the makefile but it didn't help. Here is output from "ktruss":

 23049 temacs   NAMI  "/usr/lib/libstdc++.so.5"
 23049 temacs   RET   open 3
 23049 temacs   CALL  __fstat13(3,0xefffe3f0)
 23049 temacs   RET   __fstat13 0, -268442640/0xefffe3f0
 23049 temacs   CALL  mmap(0,0x1000,1,1,3,0,0,0)
 23049 temacs   RET   mmap 270004224/0x1017f000, 197/0xc5
 23049 temacs   CALL  munmap(0x1017f000,0x1000)
 23049 temacs   RET   munmap 0, 4096/0x1000
 23049 temacs   CALL  mmap(0,0x82000,5,0x10000002,3,0,0,0)
 23049 temacs   RET   mmap 275644416/0x106e0000, 197/0xc5
 23049 temacs   CALL  mmap(0x10750000,0xd000,7,0x12,3,0,0,0x60000)
 23049 temacs   RET   mmap 276103168/0x10750000, 197/0xc5
 23049 temacs   CALL  mmap(0x1075d000,0x5000,7,0x1012,0xffffffff,0,0,0)
 23049 temacs   RET   mmap 276156416/0x1075d000, 197/0xc5
 23049 temacs   CALL  mprotect(0x10741000,0xf000,0)
 23049 temacs   RET   mprotect 0, 61440/0xf000
 23049 temacs   CALL  close(3)
 23049 temacs   RET   close 0, 458752/0x70000
 23049 temacs   CALL  __sysctl(0x101a0008,2,0xefffe798,0xefffe794,0,0)
 23049 temacs   RET   __sysctl 0, 2
 23049 temacs   PSIG  SIGBUS SIG_DFL

It looks like it dies loading "libstdc++.so.5". But I have no idea why.
The build worked fine on both of my NetBSD-i386 systems.

	Kind regards

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