Subject: emacs fails to build
To: None <pkgsrc-users@NetBSD.org>
From: John R. Towler <jtowler@pconline.com>
List: pkgsrc-users
Date: 05/18/2006 13:57:00
Emacs 21.4b fails to build correctly on NetBSD 3.0.  Hardware base is
i386.  On 1.6.2 it built with no problem, and fortunately is still
running across the system change. src/emacs -nw runs in place with no
problems.  Older emacsen will not build at all, with 19.34b, 20.7,
21.[23] tried and failing.  

Initially I had some trouble with temacs .. -l loadup dump.  This
seems to have now fixed itself.  The patches in pkgsrc were no help,
and for building a preventative factor. Someone who knows should be
aware of these problems.


                           John Towler



bash-3.00$ gmake
if [ ! -f /usr/local/src2/emacs-21.4/lisp/abbrev.elc ]; then \
  gmake  bootstrap; \
fi
cd lib-src; gmake all  \
  CC='gcc' CFLAGS='-g -O2' CPPFLAGS='-I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib  ' \
  LDFLAGS='-L/usr/X11R6/lib' MAKE='gmake'
gmake[1]: Entering directory `/local/src2/emacs-21.4/lib-src'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/local/src2/emacs-21.4/lib-src'
cd src; gmake all  \
  CC='gcc' CFLAGS='-g -O2' CPPFLAGS='-I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib  ' \
  LDFLAGS='-L/usr/X11R6/lib' MAKE='gmake'
gmake[1]: Entering directory `/local/src2/emacs-21.4/src'
cd ../lwlib/; gmake -w CC='gcc' CFLAGS='-g -O2' MAKE='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 `/local/src2/emacs-21.4/lwlib'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/local/src2/emacs-21.4/lwlib'
gmake[1]: Leaving directory `/local/src2/emacs-21.4/src'
(export PARALLEL; PARALLEL=0; cd leim; gmake all  \
  CC='gcc' CFLAGS='-g -O2' CPPFLAGS='-I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib  ' \
  LDFLAGS='-L/usr/X11R6/lib' MAKE='gmake')
gmake[1]: Entering directory `/local/src2/emacs-21.4/leim'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/local/src2/emacs-21.4/leim'
bash-3.00$ src/emacs &
[1] 165
bash-3.00$ 
[1]+  Segmentation fault      (core dumped) src/emacs
bash-3.00$ emacs &
[1] 163
bash-3.00$ gdb src/emacs emacs.core 
...

#0  0xbd9490bb in kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0xbd9490bb in kill () from /usr/lib/libc.so.12
#1  0x080ccc54 in fatal_error_signal (sig=11) at emacs.c:354
#2  <signal handler called>
(gdb) 

(gdb) run
Starting program: /local/src2/emacs-21.4/src/emacs 

Program received signal SIGSEGV, Segmentation fault.
0xbdb6d10e in XtInitializeWidgetClass () from /usr/X11R6/lib/libXt.so.6
(gdb) bt
#0  0xbdb6d10e in XtInitializeWidgetClass () from /usr/X11R6/lib/libXt.so.6
#1  0xbdb6dd59 in _XtCreateWidget () from /usr/X11R6/lib/libXt.so.6
#2  0xbdb6de27 in XtCreateWidget () from /usr/X11R6/lib/libXt.so.6
#3  0x080bbea6 in x_window (f=0x8556a00, window_prompting=0, minibuffer_only=0)
    at xfns.c:3644
#4  0x080bd067 in Fx_create_frame (parms=1481148844) at xfns.c:4431
#5  0x08123e1e in Ffuncall (nargs=2, args=0xbfbfde98) at eval.c:2659
#6  0x0814b170 in Fbyte_code (bytestr=941908156, vector=1210343692, maxdepth=5)
    at bytecode.c:716
#7  0x0812413d in funcall_lambda (fun=1210343568, nargs=1, 
    arg_vector=0xbfbfdfb4) at eval.c:2851
#8  0x08123d3e in Ffuncall (nargs=2, args=0xbfbfdfb0) at eval.c:2716
#9  0x0814b170 in Fbyte_code (bytestr=941862664, vector=1210298156, maxdepth=3)
    at bytecode.c:716
#10 0x0812413d in funcall_lambda (fun=1210298072, nargs=1, 
    arg_vector=0xbfbfe0c4) at eval.c:2851
#11 0x08123d3e in Ffuncall (nargs=2, args=0xbfbfe0c0) at eval.c:2716
#12 0x0814b170 in Fbyte_code (bytestr=941859000, vector=1210294560, maxdepth=4)
    at bytecode.c:716
#13 0x0812413d in funcall_lambda (fun=1210294428, nargs=0, 
    arg_vector=0xbfbfe1d4) at eval.c:2851
#14 0x08123d3e in Ffuncall (nargs=1, args=0xbfbfe1d0) at eval.c:2716
#15 0x0814b170 in Fbyte_code (bytestr=942013676, vector=1210450388, maxdepth=5)
    at bytecode.c:716
#16 0x0812413d in funcall_lambda (fun=1210449108, nargs=0, 
    arg_vector=0xbfbfe2f4) at eval.c:2851
#17 0x08123d3e in Ffuncall (nargs=1, args=0xbfbfe2f0) at eval.c:2716
#18 0x0814b170 in Fbyte_code (bytestr=942009740, vector=1210445340, maxdepth=5)
    at bytecode.c:716
#19 0x0812413d in funcall_lambda (fun=1210445172, nargs=0, 
    arg_vector=0xbfbfe3b0) at eval.c:2851
#20 0x08123fde in apply_lambda (fun=1210445172, args=405507076, eval_flag=1)
    at eval.c:2770
#21 0x081232cc in Feval (form=1480443140) at eval.c:2071
#22 0x080cf0e1 in top_level_2 () at keyboard.c:1250
#23 0x08122318 in internal_condition_case (bfun=0x80cf0d0 <top_level_2>, 
    handlers=405629148, hfun=0x80cee1c <cmd_error>) at eval.c:1267
#24 0x080cf10d in top_level_1 () at keyboard.c:1258
#25 0x08121f0d in internal_catch (tag=405581476, func=0x80cf0e4 <top_level_1>, 
    arg=405507076) at eval.c:1030
#26 0x080cf05f in command_loop () at keyboard.c:1219
#27 0x080cebec in recursive_edit_1 () at keyboard.c:946
#28 0x080ced08 in Frecursive_edit () at keyboard.c:1002
#29 0x080cd758 in main (argc=1, argv=0xbfbfe794, envp=0xbfbfe79c)
    at emacs.c:1544
#30 0x0804eab6 in ___start ()