On Wed, Feb 02, 2000 at 09:04:53PM -0800, Martin Buchholz wrote:
Because I'm insane, I compile XEmacs with C++ compilers. I get
a
crash when building with egcs-20000131 c++.
I cannot reproduce this crash with gcc-20000129 c++ on ix86-linux. I
will try again with top of trunk, but you may be interested in the
details.
I configured with CC=gcc-2000129, then edited config.status to make
CC, XEMACS_CC, etc. equal to g++-2000129, reran config.status, and
built. (Due to bugs in Autoconf, configure bombs out if you make CC
a C++ compiler.)
A lot of the code in the lib-src directory needed to be worked over
before it would compile. I can send the patch if anyone cares.
The makefile attempts to link temacs by hand and gets it horribly
wrong, causing the built temacs to crash inside libc startup code.
You're doing something like gcc -nostdlib pre-crt0.o /usr/lib/crt1.o
/usr/lib/crti.o <objects> <X libraries> -ldl -lgcc /usr/lib/crtn.o
First off, -nostdlib doesn't turn off automatic linking with crt1 in
all versions of gcc. You need -nostartfiles too. Second, you
forgot /usr/lib/gcc-lib/TARGET/VERSION/crtbegin.o and .../crtend.o,
which means global constructors won't be run. (I think this is why
it crashes; libc has global constructors.) Third, you forgot libc!
It gets dragged in by dependencies of the other libraries, but not
properly.
None of this nonsense is actually necessary; the only point that I
can see is to define 'data_start', and crt1.o does that for you on
this platform.
Once I fixed that, the build then completed successfully. I
dumped xemacs from within gdb, as you did, with no errors.
Script started on Fri Feb 4 15:24:46 2000
/work/build/xemacs/src $ gdb ./temacs
GNU gdb 19990928
Copyright 1998 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 "i686-pc-linux-gnu"...
(gdb) dump-temacs
Loading ../lisp/loadup.el...
Using load-path (../lisp/ ..)
Using module-load-path (../modules/ ..)
Loading very-early-lisp...
Loading /work/build/xemacs/lisp/dumped-lisp.el...
Loading /work/build/xemacs/lisp/backquote.elc...
Loading /work/build/xemacs/lisp/bytecomp-runtime.elc...
Loading /work/build/xemacs/lisp/find-paths.elc...
Loading /work/build/xemacs/lisp/packages.elc...
Loading /work/build/xemacs/lisp/setup-paths.elc...
Loading /work/build/xemacs/lisp/dump-paths.elc...
Loading /work/build/xemacs/lisp/subr.elc...
Loading /work/build/xemacs/lisp/replace.elc...
Loading /work/build/xemacs/lisp/version.el...
Loading /work/build/xemacs/lisp/cl.elc...
Loading /work/build/xemacs/lisp/cl-extra.elc...
Loading /work/build/xemacs/lisp/cl-seq.elc...
Loading /work/build/xemacs/lisp/widget.elc...
Loading /work/build/xemacs/lisp/custom.elc...
Loading /work/build/xemacs/lisp/cus-start.elc...
Loading /work/build/xemacs/lisp/cmdloop.elc...
Loading /work/build/xemacs/lisp/keymap.elc...
Loading /work/build/xemacs/lisp/syntax.elc...
Loading /work/build/xemacs/lisp/device.elc...
Loading /work/build/xemacs/lisp/console.elc...
Loading /work/build/xemacs/lisp/obsolete.elc...
Loading /work/build/xemacs/lisp/specifier.elc...
Loading /work/build/xemacs/lisp/faces.elc...
Loading /work/build/xemacs/lisp/glyphs.elc...
Loading /work/build/xemacs/lisp/objects.elc...
Loading /work/build/xemacs/lisp/extents.elc...
Loading /work/build/xemacs/lisp/events.elc...
Loading /work/build/xemacs/lisp/text-props.elc...
Loading /work/build/xemacs/lisp/process.elc...
Loading /work/build/xemacs/lisp/multicast.elc...
Loading /work/build/xemacs/lisp/frame.elc...
Loading /work/build/xemacs/lisp/map-ynp.elc...
Loading /work/build/xemacs/lisp/simple.elc...
Loading /work/build/xemacs/lisp/keydefs.elc...
Loading /work/build/xemacs/lisp/abbrev.elc...
Loading /work/build/xemacs/lisp/derived.elc...
Loading /work/build/xemacs/lisp/minibuf.elc...
Loading /work/build/xemacs/lisp/list-mode.elc...
Loading /work/build/xemacs/lisp/modeline.elc...
Loading /work/build/xemacs/lisp/startup.elc...
Loading /work/build/xemacs/lisp/misc.elc...
Loading /work/build/xemacs/lisp/help-nomule.elc...
Loading /work/build/xemacs/lisp/help.elc...
Loading /work/build/xemacs/lisp/files-nomule.elc...
Loading /work/build/xemacs/lisp/files.elc...
Loading /work/build/xemacs/lisp/lib-complete.elc...
Loading /work/build/xemacs/lisp/format.elc...
Loading /work/build/xemacs/lisp/indent.elc...
Loading /work/build/xemacs/lisp/isearch-mode.elc...
Loading /work/build/xemacs/lisp/buffer.elc...
Loading /work/build/xemacs/lisp/buff-menu.elc...
Loading /work/build/xemacs/lisp/undo-stack.elc...
Loading /work/build/xemacs/lisp/window.elc...
Loading /work/build/xemacs/lisp/window-xemacs.elc...
Loading /work/build/xemacs/lisp/paths.el...
Loading /work/build/xemacs/lisp/lisp.elc...
Loading /work/build/xemacs/lisp/page.elc...
Loading /work/build/xemacs/lisp/register.elc...
Loading /work/build/xemacs/lisp/iso8859-1.elc...
Loading /work/build/xemacs/lisp/paragraphs.elc...
Loading /work/build/xemacs/lisp/easymenu.elc...
Loading /work/build/xemacs/lisp/lisp-mode.elc...
Loading /work/build/xemacs/lisp/text-mode.elc...
Loading /work/build/xemacs/lisp/fill.elc...
Loading /work/build/xemacs/lisp/auto-save.elc...
Loading /work/build/xemacs/lisp/movemail.elc...
Loading /work/build/xemacs/lisp/float-sup.elc...
Loading /work/build/xemacs/lisp/itimer.elc...
Loading /work/build/xemacs/lisp/itimer-autosave.elc...
Loading /work/build/xemacs/lisp/toolbar.elc...
Loading /work/build/xemacs/lisp/scrollbar.elc...
Loading /work/build/xemacs/lisp/menubar.elc...
Loading /work/build/xemacs/lisp/dialog.elc...
Loading /work/build/xemacs/lisp/gui.elc...
Loading /work/build/xemacs/lisp/mode-motion.elc...
Loading /work/build/xemacs/lisp/mouse.elc...
Loading /work/build/xemacs/lisp/select.elc...
Loading /work/build/xemacs/lisp/menubar-items.elc...
Loading /work/build/xemacs/lisp/gutter-items.elc...
Loading /work/build/xemacs/lisp/x-faces.elc...
Loading /work/build/xemacs/lisp/x-iso8859-1.elc...
Loading /work/build/xemacs/lisp/x-mouse.elc...
Loading /work/build/xemacs/lisp/x-select.elc...
Loading /work/build/xemacs/lisp/x-scrollbar.elc...
Loading /work/build/xemacs/lisp/x-misc.elc...
Loading /work/build/xemacs/lisp/x-init.elc...
Loading /work/build/xemacs/lisp/toolbar-items.elc...
Loading /work/build/xemacs/lisp/x-win-xfree86.elc...
Loading /work/build/xemacs/lisp/x-win-sun.elc...
Loading /work/build/xemacs/lisp/tty-init.elc...
Loading /work/build/xemacs/lisp/fontl-hooks.elc...
Loading /work/build/xemacs/lisp/auto-show.elc...
Loading /work/build/xemacs/lisp/loadhist.elc...
Loading /work/build/xemacs/lisp/loaddefs.elc...
Loading site-load...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name xemacs
Program exited normally.
(gdb) quit
make check gets some errors, but these appear to be unrelated.
$ make check
cd ./src && make check
make[1]: Entering directory `/work/build/xemacs/src'
./xemacs -batch -l \
/work/src/xemacs-21.2/src/../tests/automated/test-harness.el -f \
batch-test-emacs /work/src/xemacs-21.2/src/../tests/automated
Testing /work/src/xemacs-21.2/tests/automated/base64-tests.el...
base64-tests.el: 1232 of 1232 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/byte-compiler-tests.el...
Unexpected error (void-function defadvice) while executing interpreted code.
Test suite execution aborted.
Unexpected error (void-variable message) while executing byte-compiled code.
Test suite execution aborted.
byte-compiler-tests.el: No tests run
Test suite execution failed unexpectedly.
Testing /work/src/xemacs-21.2/tests/automated/database-tests.el...
database-tests.el: No tests run
Testing /work/src/xemacs-21.2/tests/automated/hash-table-tests.el...
hash-table-tests.el: 8570 of 8570 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/lisp-tests.el...
lisp-tests.el: 3262 of 3262 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/md5-tests.el...
md5-tests.el: 56 of 56 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/mule-tests.el...
mule-tests.el: 2 of 2 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/symbol-tests.el...
symbol-tests.el: 226 of 226 (100%) tests successful.
Testing /work/src/xemacs-21.2/tests/automated/syntax-tests.el...
syntax-tests.el: 56 of 56 (100%) tests successful.
Done
I conclude: either the problem you hit was introduced after the
20000129 snapshot, or it was caused by old object files or C/C++
incompatibilities.
zw