From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: Building Emacs-cvs on Cygwin Date: Mon, 25 Sep 2006 14:56:59 +0200 (MET DST) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1159189063 17986 80.91.229.2 (25 Sep 2006 12:57:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2006 12:57:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 14:57:37 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GRq1Z-0007En-DV for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 14:57:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRq1Y-0003WH-PH for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 08:57:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GRq1J-0003TL-37 for emacs-devel@gnu.org; Mon, 25 Sep 2006 08:57:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GRq1G-0003Ox-AR for emacs-devel@gnu.org; Mon, 25 Sep 2006 08:57:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRq1F-0003Og-Q8 for emacs-devel@gnu.org; Mon, 25 Sep 2006 08:57:09 -0400 Original-Received: from [141.108.26.25] (helo=postino2.roma1.infn.it) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GRq5b-0001hm-R0; Mon, 25 Sep 2006 09:01:40 -0400 Original-Received: from ax0rm1.roma1.infn.it (ax0rm1.roma1.infn.it [141.108.26.19]) by postino2.roma1.infn.it (8.12.11/8.12.11) with ESMTP id k8PCuxNH023721; Mon, 25 Sep 2006 14:56:59 +0200 Original-Received: from localhost (graziosi@localhost) by ax0rm1.roma1.infn.it (8.9.3/8.9.3) with ESMTP id OAA01139; Mon, 25 Sep 2006 14:56:59 +0200 (MET DST) Original-To: Eli Zaretskii In-Reply-To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.0.3.2, Antispam-Data: 2006.9.25.53442 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__C230066_P5 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60199 Archived-At: On Mon, 25 Sep 2006, Eli Zaretskii wrote: > > Date: Mon, 25 Sep 2006 00:46:08 +0200 (MET DST) > > From: Angelo Graziosi > > > > Following this thread http://cygwin.com/ml/cygwin/2006-06/msg00855.html, I > > have added -ggdb with the following result: > > Good! Although -gdwarf-2 _should_ have produced the same effect. > > > $ gcc -v -ggdb -gdwarf-2 -g3 hello.c -o hello > > Do you get the same effect with the following command? > > gcc -v -ggdb -g3 hello.c -o hello NO ! It says "Compiled with stabs debugging format." > > In any case, please reconfigure Emacs to use the switches that produce > DWARF 2 debug info, and rebuild Emacs. The file INSTALL tells how to > do that (search for "CFLAGS"). Note that you will need to use these > switches both in CFLAGS and in LDFLAGS. > DONE! with the following result. I have adapted the build script: ------------------------------------------------ ... base_dir="${PWD_DIR}" source_dir="${base_dir}/emacs" build_dir="${source_dir}/.build" dest_dir="${source_dir}/.inst" prefix_dir_name="usr/local/emacs-${rel}" prefix_dir="/${prefix_dir_name}" cd ${base_dir} # echo "" # echo "Unpacking the source..." # tar -xjf ${PKG_DIR}/emacs-${rel}-cvs-src.tar.bz2 mkdir -p ${dest_dir} ${build_dir} cd ${build_dir} echo "" echo "Configuring..." LDFLAGS='-ggdb -gdwarf-2 -g3 -O2' \ CFLAGS='-ggdb -gdwarf-2 -g3 -O2' \ ../configure --prefix=${prefix_dir} echo "" echo "Making the bootstrap..." make bootstrap make install prefix=${dest_dir}/${prefix_dir_name} echo "" echo "Making the binary package..." cd ${dest_dir} find ${prefix_dir_name} \! -type d | \ tar cjfT ${base_dir}/emacs-${rel}-cvs.tar.bz2 - ------------------------------------------------ The first thing to say is that there is an 'Abort' when 'make install...': --------------------------------------------------------------------------- Compressing *.el ... chmod -R a+r /tmp/emacs/.inst/usr/local/emacs-22.0.50/share/emacs/22.0.50/leim make[1]: Leaving directory `/tmp/emacs/.build/leim' cd lib-src; make maybe-blessmail \ MAKE='make' archlibdir='/tmp/emacs/.inst/usr/local/emacs-22.0.50/libexec/emacs/22.0.50/i686-pc-cygwin' make[1]: Entering directory `/tmp/emacs/.build/lib-src' ../src/emacs -batch -l /tmp/emacs/lib-src/../lisp/mail/blessmail.el Fatal error (6)make[1]: *** [blessmail] Aborted (core dumped) make[1]: Leaving directory `/tmp/emacs/.build/lib-src' make: *** [blessmail] Error 2 Making the binary package... --------------------------------------------------------------------------- I have never got this until now, usually I have got: ------------------------------------------------------- Compressing *.el ... chmod -R a+r /tmp/emacs/.inst/usr/local/emacs-22.0.50/share/emacs/22.0.50/leim make[1]: Leaving directory `/tmp/emacs/.build/leim' cd lib-src; make maybe-blessmail \ MAKE='make' archlibdir='/tmp/emacs/.inst/usr/local/emacs-22.0.50/libexec/emacs/22.0.50/i686-pc-cygwin' make[1]: Entering directory `/tmp/emacs/.build/lib-src' ../src/emacs -batch -l /tmp/emacs/lib-src/../lisp/mail/blessmail.el Wrote /tmp/emacs/.build/lib-src/blessmail chmod +x blessmail Assuming /usr/spool/mail is really the mail spool directory, you should run lib-src/blessmail /tmp/emacs/.inst/usr/local/emacs-22.0.50/libexec/emacs/22.0.50/i686-pc-cygwin/movemail.exe as root, to give movemail.exe appropriate permissions. Do that after running make install. make[1]: Leaving directory `/tmp/emacs/.build/lib-src' Making the binary package... ------------------------------------------------------- I have verifyed that now Emacs is 'Compiled with DWARF 2 debugging format.' After the build was completed and the binary package result installed: ---------------------------------------------------------------------- cd /usr/local/emacs-22.0.50/bin $ ./emacs Fatal error (6)Aborted (core dumped) $ cat emacs.exe.stackdump Stack trace: Frame Function Args 0022A8F8 7C802532 (00000594, 0000EA60, 000000A4, 0022A940) 0022AA18 61096A1C (00000000, 00000000, 00000000, 00000000) 0022AB08 6109459B (00000000, 0022AC30, 0022ABF8, 0022AAD0) 0022AB68 61094A7B (0022AB80, 00000000, 00000094, 200D3DA9) 0022AC28 61094C32 (00000D28, 00000006, 202D9801, 0022CE64) 0022AC48 61092068 (00000006, 60030000, 0022AD78, 61096ADC) 0022AD38 61017B80 (00000594, 0000EA60, 000000A4, 0022AD80) 0022AE58 61096ADC (00000000, 7C923E62, 00000208, 0022B23C) 0022AF48 6109459B (00000000, 0000021A, 00000000, 719DA6AF) 0022AFA8 61094A7B (0022AFC0, 00000000, 00000094, 0022B008) 0022B068 61094C32 (00000D28, 00000006, 0022B098, 2014D9D2) 0022B078 61092068 (00000000, 20690000, 218D0878, 202D0F20) 0022B098 2014D9D2 (206A0858, 218D0878, 00000E80, 0022B09C) 0022B0D8 2014E5C1 (FFFDD000, 00000000, 00000000, 00000000) 0022B148 2014CF2F (00003018, 0022B3A0, 0022B178, 2014D63D) 0022B158 200EFF1C (00003018, 00000000, 00000000, 71A116A3) End of stack trace (more stack frames may be present) ---------------------------------------------------------------------- Then I tried this: ---------------------------------------------------------------------- $ gdb ./emacs GNU gdb 6.5.50.20060706-cvs (cygwin-special) Copyright (C) 2006 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-cygwin"... (gdb) r Starting program: /usr/local/emacs-22.0.50/bin/emacs.exe Loaded symbols for /c/WINDOWS/system32/ntdll.dll Loaded symbols for /c/WINDOWS/system32/kernel32.dll Loaded symbols for /usr/X11R6/bin/cygICE-6.dll Loaded symbols for /usr/bin/cygwin1.dll Loaded symbols for /c/WINDOWS/system32/advapi32.dll Loaded symbols for /c/WINDOWS/system32/rpcrt4.dll Loaded symbols for /usr/X11R6/bin/cygSM-6.dll Loaded symbols for /usr/X11R6/bin/cygX11-6.dll Loaded symbols for /usr/X11R6/bin/cygXaw3d-7.dll Loaded symbols for /usr/X11R6/bin/cygXext-6.dll Loaded symbols for /usr/X11R6/bin/cygXmu-6.dll Loaded symbols for /usr/X11R6/bin/cygXt-6.dll Loaded symbols for /usr/X11R6/bin/cygXpm-4.dll Loaded symbols for /usr/bin/cygncurses-8.dll Loaded symbols for /usr/bin/cygjpeg-62.dll Loaded symbols for /usr/bin/cygpng12.dll Loaded symbols for /usr/bin/cygz.dll Loaded symbols for /usr/bin/cygtiff-5.dll Loaded symbols for /usr/bin/cygungif-4.dll warning: NOD32 protected [MSAFD Tcpip [TCP/IP]] warning: NOD32 protected [MSAFD Tcpip [UDP/IP]] warning: NOD32 protected [MSAFD Tcpip [RAW/IP]] warning: NOD32 protected [RSVP UDP Service Provider] warning: NOD32 protected [RSVP TCP Service Provider] [1]+ Stopped gdb ./emacs $ fg gdb ./emacs ---Type to continue, or q to quit--- --------------------------------------------------------- after a few seconds: ---------------------------------------------------------- Program received signal SIGSEGV, Segmentation fault. 0x200f213c in mark_object (arg=1569454217) at /tmp/emacs/src/alloc.c:5509 5509 MARK_INTERVAL_TREE (ptr->intervals); (gdb) bt #0 0x200f213c in mark_object (arg=1569454217) at /tmp/emacs/src/alloc.c:5509 #1 0x200f2a0f in Fgarbage_collect () at /tmp/emacs/src/alloc.c:5174 #2 0x201064f3 in Feval (form=570000829) at /tmp/emacs/src/eval.c:2216 #3 0x20105315 in internal_condition_case_1 (bfun=0x20106450 , arg=570000829, handlers=539914913, hfun=0x200a4710 ) at /tmp/emacs/src/eval.c:1525 #4 0x200a47a2 in menu_item_eval_property (sexpr=1569454217) at /tmp/emacs/src/keyboard.c:7270 #5 0x200b0d4e in get_keyelt (object=540146505, autoload=1) at /tmp/emacs/src/keymap.c:829 #6 0x200b13a3 in access_keymap (map=539846877, idx=539880097, t_ok=2, noinherit=0, autoload=1) at /tmp/emacs/src/keymap.c:655 #7 0x200a5496 in tool_bar_items (reuse=536990456, nitems=0x22b658) at /tmp/emacs/src/keyboard.c:7732 #8 0x2001d51f in update_tool_bar (f=0x20699600, save_match_data=0) at /tmp/emacs/src/xdisp.c:9414 #9 0x2002bc8f in prepare_menu_bars () at /tmp/emacs/src/xdisp.c:9098 #10 0x2002c8ec in redisplay_internal (preserve_echo_area=1569454217) at /tmp/emacs/src/xdisp.c:10935 #11 0x2002d057 in redisplay_preserve_echo_area (from_where=8) at /tmp/emacs/src/xdisp.c:11541 #12 0x200a7aec in detect_input_pending_run_timers (do_display=1) at /tmp/emacs/src/keyboard.c:10061 ---Type to continue, or q to quit--- #13 0x2013a265 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=539858945, wait_proc=0x0, just_wait_proc=0) at /tmp/emacs/src/process.c:4665 #14 0x20009802 in sit_for (timeout=30, reading=1, do_display=1) at /tmp/emacs/src/dispnew.c:6548 #15 0x200a9590 in read_char (commandflag=1, nmaps=2, maps=0x22c710, prev_event=539858945, used_mouse_menu=0x22c758, end_time=0x0) at /tmp/emacs/src/keyboard.c:2865 #16 0x200ab88d in read_key_sequence (keybuf=0x22c8b0, bufsize=30, prompt=539858945, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at /tmp/emacs/src/keyboard.c:8956 #17 0x200ad3d1 in command_loop_1 () at /tmp/emacs/src/keyboard.c:1601 #18 0x2010554f in internal_condition_case (bfun=0x200ad220 , handlers=539914913, hfun=0x200a6c80 ) at /tmp/emacs/src/eval.c:1477 #19 0x200a0a8e in command_loop_2 () at /tmp/emacs/src/keyboard.c:1326 #20 0x2010520f in internal_catch (tag=1569454217, func=0x200a0a60 , arg=539858945) at /tmp/emacs/src/eval.c:1218 #21 0x200a08a3 in command_loop () at /tmp/emacs/src/keyboard.c:1305 #22 0x200a0944 in recursive_edit_1 () at /tmp/emacs/src/keyboard.c:1003 #23 0x200a0a20 in Frecursive_edit () at /tmp/emacs/src/keyboard.c:1064 #24 0x2009fd9d in main (argc=1, argv=0x202ce8c0) at /tmp/emacs/src/emacs.c:1794 (gdb) ---------------------------------------------------------------------- Then I have retried using 'r -Q': --------------------------------------------------------------------- $ gdb ./emacs GNU gdb 6.5.50.20060706-cvs (cygwin-special) Copyright (C) 2006 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-cygwin"... (gdb) r -Q Starting program: /usr/local/emacs-22.0.50/bin/emacs.exe -Q Loaded symbols for /c/WINDOWS/system32/ntdll.dll Loaded symbols for /c/WINDOWS/system32/kernel32.dll Loaded symbols for /usr/X11R6/bin/cygICE-6.dll Loaded symbols for /usr/bin/cygwin1.dll Loaded symbols for /c/WINDOWS/system32/advapi32.dll Loaded symbols for /c/WINDOWS/system32/rpcrt4.dll Loaded symbols for /usr/X11R6/bin/cygSM-6.dll Loaded symbols for /usr/X11R6/bin/cygX11-6.dll Loaded symbols for /usr/X11R6/bin/cygXaw3d-7.dll Loaded symbols for /usr/X11R6/bin/cygXext-6.dll Loaded symbols for /usr/X11R6/bin/cygXmu-6.dll Loaded symbols for /usr/X11R6/bin/cygXt-6.dll Loaded symbols for /usr/X11R6/bin/cygXpm-4.dll Loaded symbols for /usr/bin/cygncurses-8.dll Loaded symbols for /usr/bin/cygjpeg-62.dll Loaded symbols for /usr/bin/cygpng12.dll Loaded symbols for /usr/bin/cygz.dll Loaded symbols for /usr/bin/cygtiff-5.dll Loaded symbols for /usr/bin/cygungif-4.dll warning: NOD32 protected [MSAFD Tcpip [TCP/IP]] warning: NOD32 protected [MSAFD Tcpip [UDP/IP]] warning: NOD32 protected [MSAFD Tcpip [RAW/IP]] warning: NOD32 protected [RSVP UDP Service Provider] warning: NOD32 protected [RSVP TCP Service Provider] [1]+ Stopped gdb ./emacs $ fg gdb ./emacs ---Type to continue, or q to quit--- ------------------------------------------------------------- At this point, after 'return', I have waited more than 20 minutes!!! then I have loaded some files and used 'M-x compile', and in a few secs: ---------------------------------------------------------------------- Program received signal SIGSEGV, Segmentation fault. 0x200f213c in mark_object (arg=1569454217) at /tmp/emacs/src/alloc.c:5509 5509 MARK_INTERVAL_TREE (ptr->intervals); (gdb) bt #0 0x200f213c in mark_object (arg=1569454217) at /tmp/emacs/src/alloc.c:5509 #1 0x200f2a0f in Fgarbage_collect () at /tmp/emacs/src/alloc.c:5174 #2 0x201064f3 in Feval (form=569215053) at /tmp/emacs/src/eval.c:2216 #3 0x20105315 in internal_condition_case_1 (bfun=0x20106450 , arg=569215053, handlers=539914913, hfun=0x200a4710 ) at /tmp/emacs/src/eval.c:1525 #4 0x200a47a2 in menu_item_eval_property (sexpr=1569454217) at /tmp/emacs/src/keyboard.c:7270 #5 0x200b0d4e in get_keyelt (object=540146505, autoload=1) at /tmp/emacs/src/keymap.c:829 #6 0x200b13a3 in access_keymap (map=539846877, idx=539880097, t_ok=2, noinherit=0, autoload=1) at /tmp/emacs/src/keymap.c:655 #7 0x200a5496 in tool_bar_items (reuse=536990456, nitems=0x22b648) at /tmp/emacs/src/keyboard.c:7732 #8 0x2001d51f in update_tool_bar (f=0x20699600, save_match_data=0) at /tmp/emacs/src/xdisp.c:9414 #9 0x2002bc8f in prepare_menu_bars () at /tmp/emacs/src/xdisp.c:9098 #10 0x2002c8ec in redisplay_internal (preserve_echo_area=1569454217) at /tmp/emacs/src/xdisp.c:10935 #11 0x2002d057 in redisplay_preserve_echo_area (from_where=8) at /tmp/emacs/src/xdisp.c:11541 #12 0x200a7aec in detect_input_pending_run_timers (do_display=1) at /tmp/emacs/src/keyboard.c:10061 ---Type to continue, or q to quit--- #13 0x2013a265 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=539858945, wait_proc=0x0, just_wait_proc=0) at /tmp/emacs/src/process.c:4665 #14 0x20009802 in sit_for (timeout=30, reading=1, do_display=1) at /tmp/emacs/src/dispnew.c:6548 #15 0x200a9590 in read_char (commandflag=1, nmaps=2, maps=0x22c700, prev_event=539858945, used_mouse_menu=0x22c748, end_time=0x0) at /tmp/emacs/src/keyboard.c:2865 #16 0x200ab88d in read_key_sequence (keybuf=0x22c8a0, bufsize=30, prompt=539858945, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at /tmp/emacs/src/keyboard.c:8956 #17 0x200ad3d1 in command_loop_1 () at /tmp/emacs/src/keyboard.c:1601 #18 0x2010554f in internal_condition_case (bfun=0x200ad220 , handlers=539914913, hfun=0x200a6c80 ) at /tmp/emacs/src/eval.c:1477 #19 0x200a0a8e in command_loop_2 () at /tmp/emacs/src/keyboard.c:1326 #20 0x2010520f in internal_catch (tag=1569454217, func=0x200a0a60 , arg=539858945) at /tmp/emacs/src/eval.c:1218 #21 0x200a08a3 in command_loop () at /tmp/emacs/src/keyboard.c:1305 #22 0x200a0944 in recursive_edit_1 () at /tmp/emacs/src/keyboard.c:1003 #23 0x200a0a20 in Frecursive_edit () at /tmp/emacs/src/keyboard.c:1064 #24 0x2009fd9d in main (argc=2, argv=0x202ce8c0) at /tmp/emacs/src/emacs.c:1794 (gdb) --------------------------------------------------------------------- Angelo.