unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* make bootstrap croaks
@ 2006-02-23  6:35 djh
  2006-02-25 11:47 ` Eli Zaretskii
  2006-02-28  4:03 ` Mark Aufflick
  0 siblings, 2 replies; 7+ messages in thread
From: djh @ 2006-02-23  6:35 UTC (permalink / raw)


I just need some pointers so that I can look into some kind of building 
problem.

Platform: CYGWIN_NT-5.1 1.5.19(0.150/4/2)
Underlying OS: Japanese XP

configured:
./configure --prefix=$INSTALL_BASE_DIR --mandir=/usr/share/man 
--infodir=/usr/share/info --exec-prefix= --with-jpeg --with-png 
--with-gtk  --with-gif  --without-toolkit-scroll-bars --with-xpm 
--with-tiff  --x-includes=/usr/X11R6/include/X11 
--x-libraries=/usr/X11R6/lib

$ make boostrap
..While....
Loading language/vietnamese (source)...
Loading language/misc-lang (source)...
Loading language/utf-8-lang (source)...
Loading language/georgian (source)...
Loading international/ucs-tables (source)...
make[2]: *** [bootstrap-emacs.exe] Segmentation fault (core dumped)
make[2]: Leaving directory `/cygdrive/c/emacs/cvs/emacs/src'
make[1]: *** [bootstrap-build] Error 2

How do I attach a gdb to this?  
Once into the debugger I can trace to see the cause.
Or is there an even more elequent way?

Thanks,
  Darel Henman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: make bootstrap croaks
  2006-02-23  6:35 make bootstrap croaks djh
@ 2006-02-25 11:47 ` Eli Zaretskii
  2006-02-27  8:40   ` cygwin 5.19 " djh
  2006-02-28  4:03 ` Mark Aufflick
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2006-02-25 11:47 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Thu, 23 Feb 2006 15:35:35 +0900
> From: djh <henman@it.to-be.co.jp>
> 
> Platform: CYGWIN_NT-5.1 1.5.19(0.150/4/2)
> Underlying OS: Japanese XP
> 
> configured:
> ./configure --prefix=$INSTALL_BASE_DIR --mandir=/usr/share/man 
> --infodir=/usr/share/info --exec-prefix= --with-jpeg --with-png 
> --with-gtk  --with-gif  --without-toolkit-scroll-bars --with-xpm 
> --with-tiff  --x-includes=/usr/X11R6/include/X11 
> --x-libraries=/usr/X11R6/lib
> 
> $ make boostrap

Is this the CVS code?  If so, when did you resync with the CVS?

> ..While....
> Loading language/vietnamese (source)...
> Loading language/misc-lang (source)...
> Loading language/utf-8-lang (source)...
> Loading language/georgian (source)...
> Loading international/ucs-tables (source)...
> make[2]: *** [bootstrap-emacs.exe] Segmentation fault (core dumped)
> make[2]: Leaving directory `/cygdrive/c/emacs/cvs/emacs/src'
> make[1]: *** [bootstrap-build] Error 2
> 
> How do I attach a gdb to this?  

First, you don't necessarily need to attach GDB.  AFAIK, Cygwin has a
way of writing a core file that GDB can read and allow post-mortem
debugging.  If you don't find the core file, you may wish to ask on
the Cygwin mailing list how to produce it (I don't know the details,
sorry).

If this doesn't work somehow, you can simply run the failed command
from GDB.  The command that failed should be shown by Make; you didn't
show that part of the transcript, but my crystal ball says that the
command was:

	./temacs -batch -l loadup bootstrap

If so, go to the src directory and type

        gdb ./temacs.exe

and then, inside GDB, type this:

    	(gdb) run -batch -l loadup bootstrap

Now, when temace.exe crashes, GDB will gain control, and you can poke
around to see what went wrong.  (The file etc/DEBUG gives some
valuable advice on debugging Emacs.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 5.19 make bootstrap croaks
  2006-02-25 11:47 ` Eli Zaretskii
@ 2006-02-27  8:40   ` djh
  2006-02-28  5:59     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: djh @ 2006-02-27  8:40 UTC (permalink / raw)
  Cc: emacs-devel

Yes Eli, your crystal ball was right on.

	gdb ./temacs.exea
	run -batch -l loadup bootstrap


but, I'm getting a

    ".gdbinit:793: Error in sourced command file: "
    "Cannot access memory at address 0x20000004   "

----------.gdbinit line 793 is the last end of the below 'if' ----
# People get bothered when they see messages about non-existent functions...
xgetptr Vsystem_type
# $ptr is NULL in temacs
if ($ptr != 0)
   set $tem = (struct Lisp_Symbol *) $ptr
   xgetptr $tem->xname
   set $tem = (struct Lisp_String *) $ptr
   set $tem = (char *) $tem->data

   # Don't let abort actually run, as it will make stdio stop working and
   # therefore the `pr' command above as well.
   if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
     # The windows-nt build replaces abort with its own function.
     break w32_abort
   else
     break abort
   end
end  # 793  (This is line 793

# x_error_quitter is defined only on X.  But window-system is set up
# only at run time, during Emacs startup, so we need to defer setting
# the breakpoint.  init_sys_modes is the first function called on
# every platform after init_display, where window-system is set.
tbreak init_sys_modes
commands
........
-----------------------------------------------

When I ignorantly ingore this and try to run it anyway I get:

Program received signal SIGSEGV, Segmentation fault.
#0  0x610ad945 in pthread_mutexattr_init () from /usr/bin/cygwin1.dll
#1  0x6108dd7f in _sigfe () from /usr/bin/cygwin1.dll
#2  0x00000003 in ?? ()
#3  0x0022ee48 in ?? ()
#4  0x0000006a in ?? ()
#5  0x0022ee48 in ?? ()
#6  0x0022ee68 in ?? ()
#7  0x200a2fa0 in main (argc=539897824, argv=0x4) at emacs.c:1062



When re-ran again than then issuing a 'l'ist cmd I got:
Program received signal SIGSEGV, Segmentation fault.
0x610ad945 in pthread_mutexattr_init () from /usr/bin/cygwin1.dll
(gdb) l
1072         newlines, we do that manually.  */
1073      _fmode = O_BINARY;
1074    #endif /* MSDOS || WINDOWSNT */
1075
1076    #ifdef MSDOS
1077    #if __DJGPP__ >= 2
1078      if (!isatty (fileno (stdin)))
1079        setmode (fileno (stdin), O_BINARY);
1080      if (!isatty (fileno (stdout)))
1081        {


--------------------------------
This is a cygwin 5.19.

In the meanwhile I am reading the /etc/DEBUG documentation and more 
about gdb.

Regards,
  Darel Henman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: make bootstrap croaks
  2006-02-23  6:35 make bootstrap croaks djh
  2006-02-25 11:47 ` Eli Zaretskii
@ 2006-02-28  4:03 ` Mark Aufflick
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Aufflick @ 2006-02-28  4:03 UTC (permalink / raw)
  Cc: emacs-devel

Hi there,

I don't remember exactly what I did, but I figured out emacs debugging
under cygwin and hacked around a problem that was causing intermittent
crashing for me. You can read what I did on my blog:

http://mark.aufflick.com/dev-blog/archive/2005/12/

Cheers,

Mark.

On 2/23/06, djh <henman@it.to-be.co.jp> wrote:
> I just need some pointers so that I can look into some kind of building
> problem.
>
> Platform: CYGWIN_NT-5.1 1.5.19(0.150/4/2)
> Underlying OS: Japanese XP
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 5.19 make bootstrap croaks
  2006-02-27  8:40   ` cygwin 5.19 " djh
@ 2006-02-28  5:59     ` Eli Zaretskii
  2006-02-28  9:24       ` djh
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2006-02-28  5:59 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 27 Feb 2006 17:40:07 +0900
> From: djh <henman@it.to-be.co.jp>
> CC: emacs-devel@gnu.org
> 
> but, I'm getting a
> 
>     ".gdbinit:793: Error in sourced command file: "
>     "Cannot access memory at address 0x20000004   "
> 
> ----------.gdbinit line 793 is the last end of the below 'if' ----
> # People get bothered when they see messages about non-existent functions...
> xgetptr Vsystem_type
> # $ptr is NULL in temacs
> if ($ptr != 0)
>    set $tem = (struct Lisp_Symbol *) $ptr
>    xgetptr $tem->xname
>    set $tem = (struct Lisp_String *) $ptr
>    set $tem = (char *) $tem->data
> 
>    # Don't let abort actually run, as it will make stdio stop working and
>    # therefore the `pr' command above as well.
>    if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
>      # The windows-nt build replaces abort with its own function.
>      break w32_abort
>    else
>      break abort
>    end
> end  # 793  (This is line 793

???  Can you see where is the 0x20000004 thing coming from?  That is,
what address is it complaining about? is it the value of $ptr after
"xgetptr Vsystem_type"?

Anyway, what version of GDB is that?

> #7  0x200a2fa0 in main (argc=539897824, argv=0x4) at emacs.c:1062
> 
> 
> 
> When re-ran again than then issuing a 'l'ist cmd I got:
> Program received signal SIGSEGV, Segmentation fault.
> 0x610ad945 in pthread_mutexattr_init () from /usr/bin/cygwin1.dll
> (gdb) l
> 1072         newlines, we do that manually.  */
> 1073      _fmode = O_BINARY;
> 1074    #endif /* MSDOS || WINDOWSNT */
> 1075
> 1076    #ifdef MSDOS
> 1077    #if __DJGPP__ >= 2
> 1078      if (!isatty (fileno (stdin)))
> 1079        setmode (fileno (stdin), O_BINARY);
> 1080      if (!isatty (fileno (stdout)))
> 1081        {

This doesn't show the most interesting line: line 1062, where it says
that it crashed.  Is that this line?

  uninterrupt_malloc ();

If so, I'd suggest running under GDB, put a breakpoint on this line,
and when it breaks, step with GDB inside uninterrupt_malloc and see
where exactly inside that function it crashes.

> This is a cygwin 5.19.

Is that the latest?  If so, perhaps it's a Cygwin problem.  Can you
downgrade to the previous version?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 5.19 make bootstrap croaks
  2006-02-28  5:59     ` Eli Zaretskii
@ 2006-02-28  9:24       ` djh
  2006-02-28 19:57         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: djh @ 2006-02-28  9:24 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:
 > .....
>>This is a cygwin 5.19.
> 
> Is that the latest?  If so, perhaps it's a Cygwin problem.  Can you
> downgrade to the previous version?
> 

Yes, I downgraded to the previous version with its required utilities 
for that version as well and emacs built fine.

So there is some incompatiblity between the two.  Thanks for the advice.

I will keep looking for the culprit and let you know.

Regards,
  Darel Henman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 5.19 make bootstrap croaks
  2006-02-28  9:24       ` djh
@ 2006-02-28 19:57         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2006-02-28 19:57 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Tue, 28 Feb 2006 18:24:53 +0900
> From: djh <henman@it.to-be.co.jp>
> CC: emacs-devel@gnu.org
> 
> Yes, I downgraded to the previous version with its required utilities 
> for that version as well and emacs built fine.
> 
> So there is some incompatiblity between the two.  Thanks for the advice.
> 
> I will keep looking for the culprit and let you know.

Thanks.  I suggest to post the information to the Cygwin mailing list,
perhaps one of the Cygwin gurus will be able to unlock this mystery.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-02-28 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23  6:35 make bootstrap croaks djh
2006-02-25 11:47 ` Eli Zaretskii
2006-02-27  8:40   ` cygwin 5.19 " djh
2006-02-28  5:59     ` Eli Zaretskii
2006-02-28  9:24       ` djh
2006-02-28 19:57         ` Eli Zaretskii
2006-02-28  4:03 ` Mark Aufflick

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).