Subject: Building emacs on Solaris
To: None <>
From: Peter Schuller <>
List: tech-pkg
Date: 12/25/2006 17:16:34

install emacs with GCC 3.4.5 on Solaris Express nvb54 fails with:

gmake[1]: Entering directory 
../src/emacs -batch -l /usr/pkgsrc/editors/emacs/work/emacs-21.4/lib-src/../lisp/mail/blessmail.el
Wrote /usr/pkgsrc/editors/emacs/work/emacs-21.4/lib-src/blessmail
Fatal error (11).gmake[1]: *** [blessmail] Segmentation Fault (core dumped)
gmake[1]: *** Deleting file `blessmail'
gmake[1]: Leaving directory 
gmake: *** [blessmail] Error 2
*** Error code 2

The problem is caused by the resulting emacs binary coredumping on exit. The 
above symptome, aswell as the core dump generated by emacs (crashing in #6  
0x0808c2c5 in __do_global_dtors_aux ()), all seem to indicate that this is 
the problem discussed here:

And in some other places.

However, emacs *IS* being compiled with -fno-initialized-in-bss, as per 

.include "../../mk/"
.if !empty(CC_VERSION:Mgcc-3.*)
CFLAGS+=        -fno-zero-initialized-in-bss

I have also verified through "bmake show-var" and through inspecting the build 
log with PKG_DEBUG_LEVEL=2 that -fno-zero-initialized-in-bss is indeed being 
used during the build.

Compiling a sample file:

int test = 0;

   return 0;

with and without -fno-zero-initialized-in-bss does yield the expected 4 byte 
difference in the size of the resulting binary, which I take as an indication 
that the option has not somehow been disabled in GCC.

Can anyone shed some light on this?

/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0xE9758B7D or 'Peter Schuller <>'
Key retrieval: Send an E-Mail to
E-Mail: Web: