help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build failure caused by a .tit file


From: Göktuğ Kayaalp
Subject: Re: Build failure caused by a .tit file
Date: Tue, 18 Apr 2017 15:41:45 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

On 2017-04-18 05:43 +0300, Eli Zaretskii <address@hidden> wrote:
>> From: Göktuğ Kayaalp <address@hidden>
>> Cc: address@hidden
>> Date: Tue, 18 Apr 2017 02:08:34 +0300
>> 
>> src/bootstrap-emacs -file leim/CXTERM-DIC/CCDOSPY.tit -eval
>> '(titdic-convert)'
>
> What happens if you add -Q to the bootstrap-emacs command line?  The
> above loads your init files, which could be the reason for the abort.

I actually ran it with -Q too, just pasted in the wrong command line.
Sorry.  The same results anyways.  The program aborts whathever the
arguments are (even when there are none), but I got it to run adding
‘-batch’ argument.  Here is what I got from some example sessions:

,----
| address@hidden:~/co/GNUEmacs$ src/bootstrap-emacs -Q -batch -eval 
"(call-interactively #'titdic-convert)"
| TIT dictionary file: leim/CXTERM-DIC/CCDOSPY.tit
| Loading macroexp.elc...
| TIT dictionary doesn’t have body part
`----

Here it prompted me for the file name.

,----
| address@hidden:~/co/GNUEmacs$ src/bootstrap-emacs -Q -batch -eval "(progn 
(find-file \"leim/CXTERM-DIC/CCDOSPY.tit\") (message \"%d\" (search-forward 
\"\\nBEGIN\")))"
| 1850
`----

Here it does indeed find the ‘\nBEGIN’ string.  The following patch
fixes this error, but IDK if sanely:

diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 130bc74..6a593e2 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -474,7 +474,6 @@ titdic-convert
     (with-temp-file  (tit-make-quail-package-file-name filename dirname)
       (let ((standard-output (current-buffer)))
        (with-temp-buffer
-         (set-buffer-multibyte nil)
          ;; Here we must use `raw-text' instead of `no-conversion' to
          ;; enable auto-decoding of eol format (CRLF->LF).
          (let ((coding-system-for-read 'raw-text))

And here is what happens now:

,----
| address@hidden:~/co/GNUEmacs$ src/bootstrap-emacs -Q -batch -eval 
'(titdic-convert "leim/CXTERM-DIC/CCDOSPY.tit")'
| Decoding with coding system euc-china...
| Processing header part...
| Formatting translation rules...
`----

Exits 0, file created.  The build also *continues* with this patch
applied.  That ‘set-buffer-multibyte’ line was there since 2002 though
(see commit c7211fed), so maybe some semantics changed recently about
regexps?

>> Find below the backtrace I get from bootstrap-emacs:
>> 
>> ,----
>> | Fatal error 6: Aborted
>> | Backtrace:
>> | src/bootstrap-emacs[0x50d4c9]
>
> This cannot be interpreted except on your system (see the Emacs manual
> for how to do that).  If using -Q doesn't stop the aborts, it is best
> to run these commands under GDB and show the backtrace from there.

Find below a copy of a gdb session.  I do not know much about debugging
C programs, but I'll try and do further debugging in my spare time if
need be.  I guess without -batch it tried to load the GUI which wasn't
properly lined at that time or maybe isn't included in bootstrap-emacs
at all?

,----
| address@hidden:~/co/GNUEmacs$ gdb --args src/bootstrap-emacs -Q -file 
leim/CXTERM-DIC/CCDOSPY.tit -eval '(titdic-convert)'
| GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
| Copyright (C) 2016 Free Software Foundation, Inc.
| License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
| and "show warranty" for details.
| This GDB was configured as "x86_64-linux-gnu".
| Type "show configuration" for configuration details.
| For bug reporting instructions, please see:
| <http://www.gnu.org/software/gdb/bugs/>.
| Find the GDB manual and other documentation resources online at:
| <http://www.gnu.org/software/gdb/documentation/>.
| For help, type "help".
| Type "apropos word" to search for commands related to "word"...
| Reading symbols from src/bootstrap-emacs...done.
| (gdb) run
| Starting program: /igk/checkouts/GNUEmacs/src/bootstrap-emacs -Q -file 
leim/CXTERM-DIC/CCDOSPY.tit -eval \(titdic-convert\)
| [Thread debugging using libthread_db enabled]
| Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
| [New Thread 0x7fffe57b2700 (LWP 13095)]
| [New Thread 0x7fffe4869700 (LWP 13096)]
| [New Thread 0x7fffdfdb4700 (LWP 13097)]
| Fatal error 6: Aborted
| Backtrace:
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x50d4c9]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x4f3f37]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x50d573]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x4aa614]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x4ae45f]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x441985]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x452de6]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x426b07]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5680ac]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56842d]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56b9a6]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56b7ed]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568475]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568885]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567b50]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567ef2]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56842d]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56b9a6]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56b53d]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568885]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567b50]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567ef2]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56842d]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568885]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568acb]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56a72c]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x568b56]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5a20f3]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567b50]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x567ef2]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56b7ed]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x5681a0]
| /igk/checkouts/GNUEmacs/src/bootstrap-emacs[0x56aff6]
| ...
| 
| Thread 1 "bootstrap-emacs" received signal SIGABRT, Aborted.
| 0x00007ffff0d59269 in raise (address@hidden)
|     at ../sysdeps/unix/sysv/linux/pt-raise.c:35
| 35    ../sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
| (gdb) bt
| #0  0x00007ffff0d59269 in raise (address@hidden)
|     at ../sysdeps/unix/sysv/linux/pt-raise.c:35
| #1  0x00000000004f3f04 in terminate_due_to_signal (address@hidden, 
|     address@hidden) at emacs.c:393
| #2  0x000000000050d573 in emacs_abort () at sysdep.c:2371
| #3  0x00000000004aa614 in bidi_initialize () at bidi.c:1097
| #4  0x00000000004ae45f in bidi_init_it (address@hidden, 
|     bytepos=1, frame_window_p=<optimized out>, 
|     address@hidden) at bidi.c:1139
| #5  0x0000000000441985 in init_iterator (it=0x7fffffffa5c0, w=0xc80688, 
|     charpos=1, bytepos=<optimized out>, row=<optimized out>, 
|     base_face_id=DEFAULT_FACE_ID) at xdisp.c:2982
| #6  0x0000000000452de6 in resize_mini_window (w=0xc80688, 
|     address@hidden) at xdisp.c:11066
| #7  0x0000000000426b07 in do_switch_frame (frame=31925957, 
|     track=<optimized out>, for_deletion=<optimized out>, 
|     norecord=<optimized out>) at frame.c:1229
| #8  0x00000000005680ac in eval_sub (form=<optimized out>) at eval.c:2221
| #9  0x000000000056842d in Fprogn (body=27113891) at eval.c:449
| #10 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #11 0x000000000056b9a6 in Funwind_protect (args=27113635) at eval.c:1185
| #12 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #13 0x000000000056b7ed in Fprogn (body=27495923) at eval.c:449
| #14 Flet (args=27547491) at eval.c:963
| #15 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #16 0x0000000000568475 in Fprogn (body=27597507) at eval.c:449
| #17 Fif (args=<optimized out>) at eval.c:407
| #18 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #19 0x0000000000568885 in Fprogn (body=27792595) at eval.c:449
| #20 funcall_lambda (address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #21 0x0000000000567b50 in apply_lambda (fun=27792947, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #22 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #23 0x000000000056842d in Fprogn (body=17257859) at eval.c:449
| #24 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #25 0x000000000056b9a6 in Funwind_protect (args=17222675) at eval.c:1185
| #26 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #27 0x000000000056b53d in Fprogn (body=17221587) at eval.c:449
| #28 FletX (args=17299395) at eval.c:898
| #29 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #30 0x0000000000568885 in Fprogn (body=17299203) at eval.c:449
| #31 funcall_lambda (fun=17298915, address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #32 0x0000000000567b50 in apply_lambda (fun=17298899, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #33 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #34 0x000000000056842d in Fprogn (body=27892675) at eval.c:449
| #35 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #36 0x0000000000568885 in Fprogn (body=28054339) at eval.c:449
| #37 funcall_lambda (fun=28110403, address@hidden, 
|     address@hidden) at eval.c:3013
| #38 0x0000000000568acb in Ffuncall (address@hidden, 
|     address@hidden) at eval.c:2756
| #39 0x000000000056a72c in Fapply (nargs=2, args=0x7fffffffc670)
|     at eval.c:2330
| #40 0x0000000000568b56 in Ffuncall (nargs=<optimized out>, 
|     address@hidden) at eval.c:2742
| #41 0x00000000005a20f3 in exec_byte_code (bytestr=<optimized out>, 
|     vector=22990725, maxdepth=<optimized out>, 
|     args_template=<optimized out>, address@hidden, 
|     args=<optimized out>, address@hidden) at bytecode.c:641
| #42 0x000000000056884f in funcall_lambda (fun=140737488340733, 
|     address@hidden, nargs=281474976710657, address@hidden, 
|     arg_vector=0x7fffffffc668, address@hidden)
|     at eval.c:2942
| #43 0x0000000000567b50 in apply_lambda (fun=19308213, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #44 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #45 0x000000000056b7ed in Fprogn (body=22217139) at eval.c:449
| #46 Flet (args=22217267) at eval.c:963
| #47 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #48 0x000000000056aff6 in Fsetq (args=<optimized out>) at eval.c:511
| #49 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #50 0x000000000056b53d in Fprogn (body=25416915) at eval.c:449
| #51 FletX (args=25347251) at eval.c:898
| #52 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #53 0x0000000000568885 in Fprogn (body=25341763) at eval.c:449
| #54 funcall_lambda (fun=25364227, address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #55 0x0000000000567b50 in apply_lambda (fun=25364211, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #56 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #57 0x000000000056aff6 in Fsetq (args=<optimized out>) at eval.c:511
| #58 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #59 0x000000000056aff6 in Fsetq (args=<optimized out>) at eval.c:511
| #60 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #61 0x000000000056842d in Fprogn (body=25321651) at eval.c:449
| #62 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #63 0x00000000005683bb in For (args=25321475) at eval.c:364
| #64 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #65 0x000000000056842d in Fprogn (body=25353171) at eval.c:449
| #66 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #67 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #68 0x0000000000568885 in Fprogn (body=25352195) at eval.c:449
| #69 funcall_lambda (fun=25464211, address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #70 0x0000000000567b50 in apply_lambda (fun=25464131, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #71 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #72 0x0000000000568475 in Fprogn (body=26393955) at eval.c:449
| #73 Fif (args=<optimized out>) at eval.c:407
| #74 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #75 0x0000000000568885 in Fprogn (body=26789411) at eval.c:449
| #76 funcall_lambda (fun=25272643, address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #77 0x0000000000567b50 in apply_lambda (fun=25272627, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #78 0x0000000000567ef2 in eval_sub (form=<optimized out>) at eval.c:2293
| #79 0x000000000056b9a6 in Funwind_protect (args=26399843) at eval.c:1185
| #80 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #81 0x000000000056b7ed in Fprogn (body=26347235) at eval.c:449
| #82 Flet (args=26347123) at eval.c:963
| #83 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #84 0x0000000000568475 in Fprogn (body=26346979) at eval.c:449
| #85 Fif (args=<optimized out>) at eval.c:407
| #86 0x00000000005681a0 in eval_sub (form=<optimized out>) at eval.c:2171
| #87 0x0000000000568885 in Fprogn (body=26009539) at eval.c:449
| #88 funcall_lambda (fun=26324227, address@hidden, address@hidden, 
|     address@hidden) at eval.c:3013
| #89 0x0000000000567b50 in apply_lambda (fun=26324243, 
|     args=<optimized out>, address@hidden) at eval.c:2879
| #90 0x0000000000567ef2 in eval_sub (address@hidden)
|     at eval.c:2293
| #91 0x000000000056bd20 in Feval (form=20487219, lexical=<optimized out>)
|     at eval.c:2040
| #92 0x000000000056708e in internal_condition_case (
|     address@hidden <top_level_2>, address@hidden, 
|     address@hidden <cmd_error>) at eval.c:1324
| #93 0x00000000004f6a4c in top_level_1 (address@hidden)
|     at keyboard.c:1129
| #94 0x000000000056702c in internal_catch (address@hidden, 
|     address@hidden <top_level_1>, address@hidden) at eval.c:1091
| #95 0x00000000004f4298 in command_loop () at keyboard.c:1090
| #96 0x00000000004f9486 in recursive_edit_1 () at keyboard.c:697
| #97 0x00000000004f97cb in Frecursive_edit () at keyboard.c:768
| #98 0x0000000000419a5e in main (argc=6, argv=0x7fffffffdee8)
|     at emacs.c:1687
`----

--gk.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]