unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Installation problem of Emacs 21.3 with GCC 3.3 /Sparc Solaris 8.
@ 2003-06-30 22:29 ishikawa
  0 siblings, 0 replies; only message in thread
From: ishikawa @ 2003-06-30 22:29 UTC (permalink / raw)
  Cc: ishikawa


I have an installation problem of Emacs 21.3
using GCC 3.3 under UltraSparc Solaris 8.

I suspect a bug of GCC 3.3 (and opened a bug report at bugzilla of
gcc.gnu.org, bug 11386), 
but wonder if others have experienced similar problems using
the recent GCC versions.

However, GCC 3.2.3 works fine and I could install
Emacs using 3.2.3.
But I have other reasons to prefer using GCC 3.3 on the said machine, and
so would like to resolve the issue one way or the other if possible.

Below is a quote from somewhat edited bug report that
I posted to bugzilla at gcc.gnu.org.

Since emacs is a huge program, even if it is GCC 3.3 that 
miscompiles the code, it is hard to isolate the problem
into a small section of C source code in Emacs.

I would appreciate to hear similar experiences under various
platforms (this would help GCC folks to dig deeper into the problem or
narrow the search area)
and workaround. 
And if someone knows the exact cause (a bug in GCC 3.3 maybe?),
that would be great. 
(Is it possible that unexec.c or its friend need modification for GCC
3.3, or configure is not picking up the proper unexec*.c for 
GCC 3.3 and solaris 8 combination? Wild guess at best.)

Happay Hacking

Ishikawa, Chiaki

--- begin quote ---

This is still insufficient information, but I am posting
the gdb log to solicit more input from Emacs user community who
may have experienced similar problems using the latest GCC 3.3 under
sparc solaris and other platforms.

Basically, after a binary compile of the emacs program,
the emacs installer tries to compile
so called emacs lisp programs into its own internal byte code.
During the byte compiling, emacs aborts.

The final gdb output is as follows:  (details below.)

|Program received signal SIGSEGV, Segmentation fault.
|0x41e90 in __do_global_dtors_aux ()
|(gdb) #0  0x41e90 in __do_global_dtors_aux ()
|#1  0x18931c in _fini ()
|#2  0xfee9bca4 in _exithandle () from /usr/lib/libc.so.1
|#3  0xfef1f87c in exit () from /usr/lib/libc.so.1
|#4  0xd2b20 in Fkill_emacs (arg=0) at emacs.c:1830
|#5  0x137d20 in Ffuncall (nargs=1, args=0xffbee31c) at eval.c:2659

This suggests that a part of emacs gets miscompiled by
by GCC 3.3 under ultra sparc solaris 8.
Emacs seems to have detected something funny and tries to quit calling
Fkill_emacs function, but
by that time, something (memory[code/stack] area?)
 was either broken from the beginning
or corrupted during the run, and during the exit processing
the program seems to have encountered a fatal segmentation error.

Using GCC 3.2.3 under the same OS, the byte compilation
succeeds and the installation succeeds.
The resulting Emacs is usable as far as I can tell.

Atttached is the problematic run, under gdb, of the Emacs binary that
gets compiled using gcc 3.3.

I run a particular byte compilation that triggered the abort by using
a shell script break.sh.  It runs the EMACS binary under gdb.

$ cat break.sh
LC_ALL=C
LANG=C

gcc -v
   
cd leim
 
EMACSLOADPATH=/home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp 
export EMACSLOADPATH
# ../src/emacs -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv \
  --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC; 

***** The above backslash was followed by CR (invisible) and
***** this caused the --eval not found error below, but
***** this has nothing to do with the compilation problem.

gdb ../src/emacs <<!EOF
run -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC
where


quit
EOF

$ sh -vx break.sh
LC_ALL=C
LC_ALL=C
LANG=C
LANG=C

gcc -v
+ gcc -v 
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3/specs
Configured with: ../configure --disable-nls --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 3.3
   
cd leim
+ cd leim 
 
EMACSLOADPATH=/home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp 
EMACSLOADPATH=/home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp
export EMACSLOADPATH
+ export EMACSLOADPATH 
# ../src/emacs -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv \
  --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC; 
+ --eval (batch-titdic-convert t) -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC 
break.sh: --eval: not found

**** The comment line that ends with "\" was actually
**** followed by CR (invisible) as I mentioned above and
**** so shell complained that --eval is an unknown command.
**** Now we invoke gdb.


gdb ../src/emacs <<!EOF
run -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC
where


quit
EOF

+ gdb ../src/emacs 
run -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC
where


quit
EOF

GNU gdb 4.18
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 "sparc-sun-solaris2.8"...
(gdb) Starting program: /home/ishikawa/PACKAGES/emacs-21.3/leim/../src/emacs -batch --no-init-file --no-site-file --multibyte -l /home/ishikawa/PACKAGES/emacs-21.3/leim/../lisp/international/titdic-cnv --eval '(batch-titdic-convert t)' -dir quail /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC
Converting all tit files in the directory /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/4Corner.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/ARRAY30.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/CCDOSPY.tit to quail-package...
Decoding with coding system euc-china...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/ECDICT.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/ETZY.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/PY-b5.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/Punct-b5.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/Punct.tit to quail-package...
Decoding with coding system euc-china...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/QJ-b5.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/QJ.tit to quail-package...
Decoding with coding system euc-china...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/SW.tit to quail-package...
Decoding with coding system euc-china...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/TONEPY.tit to quail-package...
Decoding with coding system euc-china...
Processing header part...
Formatting translation rules...
Converting /home/ishikawa/PACKAGES/emacs-21.3/leim/CXTERM-DIC/ZOZY.tit to quail-package...
Decoding with coding system cn-big5...
Processing header part...
Formatting translation rules...
Byte-compile the created files by:
  % emacs -batch -f batch-byte-compile XXX.el

Program received signal SIGSEGV, Segmentation fault.
0x41e90 in __do_global_dtors_aux ()
(gdb) #0  0x41e90 in __do_global_dtors_aux ()
#1  0x18931c in _fini ()
#2  0xfee9bca4 in _exithandle () from /usr/lib/libc.so.1
#3  0xfef1f87c in exit () from /usr/lib/libc.so.1
#4  0xd2b20 in Fkill_emacs (arg=0) at emacs.c:1830
#5  0x137d20 in Ffuncall (nargs=1, args=0xffbee31c) at eval.c:2659
#6  0x166714 in Fbyte_code (bytestr=-4267240, vector=4899592, maxdepth=6)
    at bytecode.c:716
#7  0x138170 in funcall_lambda (fun=1078908320, nargs=1, arg_vector=0xffbee438)
---Type <return> to continue, or q <return> to quit---    at eval.c:2851
#8  0x138020 in apply_lambda (fun=1078908320, args=1, eval_flag=1)
    at eval.c:2770
#9  0x136c58 in Feval (form=1346736020) at eval.c:2071
#10 0x137d20 in Ffuncall (nargs=1, args=0xffbee66c) at eval.c:2659
#11 0x166714 in Fbyte_code (bytestr=-4266392, vector=2613852, maxdepth=11)
    at bytecode.c:716
#12 0x138170 in funcall_lambda (fun=1076354016, nargs=1, arg_vector=0xffbee834)
    at eval.c:2851
#13 0x137c0c in Ffuncall (nargs=1, args=0xffbee830) at eval.c:2716
#14 0x166714 in Fbyte_code (bytestr=-4265936, vector=2604088, maxdepth=5)
    at bytecode.c:716
#15 0x138170 in funcall_lambda (fun=1076344624, nargs=0, arg_vector=0xffbee9e4)
    at eval.c:2851
#16 0x137c0c in Ffuncall (nargs=0, args=0xffbee9e0) at eval.c:2716
#17 0x166714 in Fbyte_code (bytestr=-4265504, vector=2599040, maxdepth=5)
    at bytecode.c:716
#18 0x138170 in funcall_lambda (fun=1076340688, nargs=0, arg_vector=0xffbeeb00)
    at eval.c:2851
#19 0x138020 in apply_lambda (fun=1076340688, args=0, eval_flag=1)
    at eval.c:2770
#20 0x136c58 in Feval (form=1345428916) at eval.c:2071
#21 0x135a3c in internal_condition_case (bfun=0xd3da0 <top_level_2>, 
---Type <return> to continue, or q <return> to quit---    handlers=271329500, hfun=0xd3a5c <cmd_error>) at eval.c:1267
#22 0xd3df0 in top_level_1 () at keyboard.c:1262
#23 0x135598 in internal_catch (tag=271281828, func=0xd3db8 <top_level_1>, 
    arg=271207428) at eval.c:1030
#24 0xd3d04 in command_loop () at keyboard.c:1223
#25 0xd37a8 in recursive_edit_1 () at keyboard.c:950
#26 0xd390c in Frecursive_edit () at keyboard.c:1006
#27 0xd2690 in main (argc=0, argv=0xffbef104, envp=0xffbef138) at emacs.c:1547
(gdb) (gdb) (gdb) $ 
$ exit

--- end  quote ---

[end of memo]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-30 22:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-30 22:29 Installation problem of Emacs 21.3 with GCC 3.3 /Sparc Solaris 8 ishikawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).