unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
@ 2008-02-01 20:32 Angelo Graziosi
  2008-02-02 18:03 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-01 20:32 UTC (permalink / raw)
  To: emacs-devel

After the unicode branch is merged to trunk, bootstrapping Emacs on
Cygwin fails as reported below. The bootstrap was configured as follow:


     LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' \
     ../configure --prefix=${prefix_dir} \
                  --with-x-toolkit=lucid

(I have used the same build scrip with which I bootstrap Emacs since
an year and more).

Emacs-CVS of less than 24 hours ago bootstraps just fine!


extracts from build log
=================================================================
[...]
Configured for `i686-pc-cygwin'.

   Where should the build process find the source code?    /tmp/emacs
   What operating system and machine description files should Emacs use?
         `s/cygwin.h' and `m/intel386.h'
   What compiler should emacs be built with?               gcc -g -O2 
-Wno-pointer-sign
   Should Emacs use the GNU version of malloc?             yes
   Should Emacs use a relocating allocator for buffers?    yes
   Should Emacs use mmap(2) for buffer allocation?         no
   What window system should Emacs use?                    x11
   What toolkit should Emacs use?                          LUCID
   Where do we find X Windows header files? 
/usr/X11R6/include
   Where do we find X Windows libraries?                   /usr/X11R6/lib
   Does Emacs use -lXaw3d?                                 yes
   Does Emacs use -lXpm?                                   yes
   Does Emacs use -ljpeg?                                  yes
   Does Emacs use -ltiff?                                  yes
   Does Emacs use a gif library?                           yes -lungif
   Does Emacs use -lpng?                                   yes
   Does Emacs use -lrsvg-2?                                no
   Does Emacs use -lgpm?                                   no
   Does Emacs use -ldbus?                                  no
   Does Emacs use X toolkit scroll bars?                   yes

configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib-src/Makefile.c
config.status: creating oldXMenu/Makefile
config.status: creating doc/emacs/Makefile
config.status: creating doc/misc/Makefile
config.status: creating doc/lispintro/Makefile
config.status: creating doc/lispref/Makefile
config.status: creating src/Makefile.c
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing default commands
creating src/epaths.h
src/epaths.h is unchanged
creating lib-src/Makefile
creating src/Makefile

[...]

gcc -c  -Demacs -DHAVE_CONFIG_H -DUSE_LUCID  -I. -I/tmp/emacs/src 
-I/usr/X11R6/include    -g -O2 -Wno-pointer-sign  /tmp/emacs/src/syntax.c
/tmp/emacs/src/syntax.c: In function 'char_quoted':
/tmp/emacs/src/syntax.c:310: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'find_defun_start':
/tmp/emacs/src/syntax.c:402: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:406: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'back_comment':
/tmp/emacs/src/syntax.c:527: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:556: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'scan_words':
/tmp/emacs/src/syntax.c:1225: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:1253: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:1277: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:1306: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'forw_comment':
/tmp/emacs/src/syntax.c:2145: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2175: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2194: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'Fforward_comment':
/tmp/emacs/src/syntax.c:2258: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2266: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2324: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2341: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2355: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'scan_lists':
/tmp/emacs/src/syntax.c:2469: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2480: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2490: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2516: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2559: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2586: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2591: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2634: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2652: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2685: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2697: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2712: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2757: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2765: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:2773: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'Fbackward_prefix_chars':
/tmp/emacs/src/syntax.c:2876: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c: In function 'scan_sexps_forward':
/tmp/emacs/src/syntax.c:3038: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3056: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3087: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3098: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3104: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3114: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3138: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3172: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3184: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3201: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3205: warning: comparison is always true due to 
limited range of data type
/tmp/emacs/src/syntax.c:3211: warning: comparison is always true due to 
limited range of data type

[...]

gcc -Demacs -DHAVE_CONFIG_H -DUSE_LUCID  -I. -I/tmp/emacs/src 
-I/usr/X11R6/include    -g -O2 -Wno-pointer-sign 
-Wl,--enable-auto-import -Wl,--enable-auto-image-base -L/usr/X11R6/lib 
/tmp/emacs/src/prefix-args.c -o prefix-args
touch stamp-oldxmenu
echo "dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o charset.o 
coding.o category.o ccl.o character.o chartab.o cm.o term.o terminal.o 
xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o 
image.o   emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o 
filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o 
cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o 
data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o 
syntax.o unexcw.o bytecode.o process.o callproc.o region-cache.o sound.o 
atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o 
sheap.o font.o terminfo.o gmalloc.o ralloc.o lastfile.o vm-limit.o 
widget.o mktime.o getloadavg.o " > buildobj.lst
gcc   -Wl,--enable-auto-import -Wl,--enable-auto-image-base 
-L/usr/X11R6/lib -o temacs ecrt0.o dispnew.o frame.o scroll.o xdisp.o 
xmenu.o window.o charset.o coding.o category.o ccl.o character.o 
chartab.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o xselect.o 
xrdb.o fontset.o xsmfns.o fringe.o image.o   emacs.o keyboard.o macros.o 
keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o 
fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o 
search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o 
floatfns.o fns.o print.o lread.o syntax.o unexcw.o bytecode.o process.o 
callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o 
intervals.o textprop.o composite.o md5.o   sheap.o font.o terminfo.o 
gmalloc.o ralloc.o lastfile.o vm-limit.o widget.o mktime.o getloadavg.o 
   ../lwlib/liblw.a -L/usr/X11R6/lib -lXaw3d -lXmu -lXt -lSM -lICE 
-lXext -ltiff -ljpeg -lpng -lz -lm -lungif -lXpm -lX11     -lresolv 
-lcurses -lg  `gcc -print-libgcc-file-name` -lm -lc `gcc 
-print-libgcc-file-name`
RUNEMACS="`/bin/pwd`/temacs"; cd /tmp/emacs/src/../admin/unidata; make 
-w --jobserver-fds=3,4 - --jobserver-fds=3,4 - --jobserver-fds=3,4 - 
--jobserver-fds=3,4 -j RUNEMACS="${RUNEMACS}" 
DSTDIR=/tmp/emacs/src/../lisp/international
make[3]: Entering directory `/tmp/emacs/admin/unidata'
/tmp/emacs/build/src/temacs -batch -f batch-byte-compile unidata-gen.el
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
ELC=`/bin/pwd`/unidata-gen.elc; \
	DATA=`/bin/pwd`/unidata.txt; \
	cd /tmp/emacs/src/../lisp/international; \
	/tmp/emacs/build/src/temacs -batch --load ${ELC} -f unidata-gen-files 
${DATA}
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
make[3]: Leaving directory `/tmp/emacs/admin/unidata'
`/bin/pwd`/temacs --batch --load loadup bootstrap
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
mv -f emacs.exe bootstrap-emacs.exe
mv: cannot stat `emacs.exe': No such file or directory
make[2]: *** [bootstrap-emacs.exe] Error 1
make[2]: Leaving directory `/tmp/emacs/build/src'
make[1]: *** [bootstrap-build] Error 2
make[1]: Leaving directory `/tmp/emacs/build'
make: *** [bootstrap] Error 2
=================================================================

Cheers,
    Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-01 20:32 The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk] Angelo Graziosi
@ 2008-02-02 18:03 ` Eli Zaretskii
  2008-02-02 19:32   ` Angelo Graziosi
  2008-02-02 18:03 ` Dan Nicolaescu
  2008-05-28  7:42 ` Angelo Graziosi
  2 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-02 18:03 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Fri, 01 Feb 2008 21:32:07 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> 
> RUNEMACS="`/bin/pwd`/temacs"; cd /tmp/emacs/src/../admin/unidata; make 
> -w --jobserver-fds=3,4 - --jobserver-fds=3,4 - --jobserver-fds=3,4 - 
> --jobserver-fds=3,4 -j RUNEMACS="${RUNEMACS}" 

You are running "make -j" here, right?  If so, please try without -j;
it's possible that parallel bootstrap is broken in Emacs 23.0.60.  If
it works without -j, we can come back to -j later.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-01 20:32 The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk] Angelo Graziosi
  2008-02-02 18:03 ` Eli Zaretskii
@ 2008-02-02 18:03 ` Dan Nicolaescu
  2008-02-02 18:32   ` Eli Zaretskii
  2008-05-28  7:42 ` Angelo Graziosi
  2 siblings, 1 reply; 47+ messages in thread
From: Dan Nicolaescu @ 2008-02-02 18:03 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

Angelo Graziosi <angelo.graziosi@alice.it> writes:

  > After the unicode branch is merged to trunk, bootstrapping Emacs on
  > Cygwin fails as reported below. The bootstrap was configured as follow:
  > 
  > 
  >     LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' \
  >     ../configure --prefix=${prefix_dir} \
  >                  --with-x-toolkit=lucid
  > 
  > (I have used the same build scrip with which I bootstrap Emacs since
  > an year and more).
[snip]
  > 
  > Emacs-CVS of less than 24 hours ago bootstraps just fine!
  > RUNEMACS="`/bin/pwd`/temacs"; cd /tmp/emacs/src/../admin/unidata; make
  > -w --jobserver-fds=3,4 - --jobserver-fds=3,4 - --jobserver-fds=3,4 - 
  > --jobserver-fds=3,4 -j RUNEMACS="${RUNEMACS}"

Are you using make -j? Can you try not to use parallel make? Make
there's still a bug in the makefiles...

  > DSTDIR=/tmp/emacs/src/../lisp/international
  > make[3]: Entering directory `/tmp/emacs/admin/unidata'
  > /tmp/emacs/build/src/temacs -batch -f batch-byte-compile unidata-gen.el
  > Loading loadup.el (source)...
  > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
  > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
  > /tmp/emacs/lisp/textmodes)
  > Loading emacs-lisp/byte-run (source)...
  > Loading emacs-lisp/backquote (source)...
  > Loading subr (source)...
  > Loading version.el (source)...
  > Loading widget (source)...
  > Loading custom (source)...
  > Loading emacs-lisp/map-ynp (source)...
  > Loading cus-start (source)...
  > Note, built-in variable `selection-coding-system' not bound
  > Loading international/mule (source)...
  > Loading international/mule-conf.el (source)...
  > ELC=`/bin/pwd`/unidata-gen.elc; \
  > 	DATA=`/bin/pwd`/unidata.txt; \
  > 	cd /tmp/emacs/src/../lisp/international; \
  > 	/tmp/emacs/build/src/temacs -batch --load ${ELC} -f
  > unidata-gen-files ${DATA}
  > Loading loadup.el (source)...
  > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
  > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
  > /tmp/emacs/lisp/textmodes)
  > Loading emacs-lisp/byte-run (source)...
  > Loading emacs-lisp/backquote (source)...
  > Loading subr (source)...
  > Loading version.el (source)...
  > Loading widget (source)...
  > Loading custom (source)...
  > Loading emacs-lisp/map-ynp (source)...
  > Loading cus-start (source)...
  > Note, built-in variable `selection-coding-system' not bound
  > Loading international/mule (source)...
  > Loading international/mule-conf.el (source)...
  > make[3]: Leaving directory `/tmp/emacs/admin/unidata'
  > `/bin/pwd`/temacs --batch --load loadup bootstrap
  > Loading loadup.el (source)...
  > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
  > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
  > /tmp/emacs/lisp/textmodes)
  > Loading emacs-lisp/byte-run (source)...
  > Loading emacs-lisp/backquote (source)...
  > Loading subr (source)...
  > Loading version.el (source)...
  > Loading widget (source)...
  > Loading custom (source)...
  > Loading emacs-lisp/map-ynp (source)...
  > Loading cus-start (source)...
  > Note, built-in variable `selection-coding-system' not bound
  > Loading international/mule (source)...
  > Loading international/mule-conf.el (source)...
The next line here should be:
Loading env...

So somehow this exited early, that's probably why things fail later.

Not many people use cygwin here, so if you can find out what is going
wrong it would be great.

  > mv -f emacs.exe bootstrap-emacs.exe
  > mv: cannot stat `emacs.exe': No such file or directory
  > make[2]: *** [bootstrap-emacs.exe] Error 1
  > make[2]: Leaving directory `/tmp/emacs/build/src'
  > make[1]: *** [bootstrap-build] Error 2
  > make[1]: Leaving directory `/tmp/emacs/build'
  > make: *** [bootstrap] Error 2





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-02 18:03 ` Dan Nicolaescu
@ 2008-02-02 18:32   ` Eli Zaretskii
  0 siblings, 0 replies; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-02 18:32 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel, angelo.graziosi

> From: Dan Nicolaescu <dann@ics.uci.edu>
> Date: Sat, 02 Feb 2008 10:03:54 -0800
> Cc: emacs-devel@gnu.org
> 
> Are you using make -j? Can you try not to use parallel make? Make
> there's still a bug in the makefiles...

I asked the same, but in the meanwhile I cannot find any problem in
the Makefiles with -j.

>   > DSTDIR=/tmp/emacs/src/../lisp/international
>   > make[3]: Entering directory `/tmp/emacs/admin/unidata'
>   > /tmp/emacs/build/src/temacs -batch -f batch-byte-compile unidata-gen.el
>   > Loading loadup.el (source)...
>   > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
>   > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
>   > /tmp/emacs/lisp/textmodes)
>   > Loading emacs-lisp/byte-run (source)...
>   > Loading emacs-lisp/backquote (source)...
>   > Loading subr (source)...
>   > Loading version.el (source)...
>   > Loading widget (source)...
>   > Loading custom (source)...
>   > Loading emacs-lisp/map-ynp (source)...
>   > Loading cus-start (source)...
>   > Note, built-in variable `selection-coding-system' not bound
>   > Loading international/mule (source)...
>   > Loading international/mule-conf.el (source)...
>   > ELC=`/bin/pwd`/unidata-gen.elc; \
>   > 	DATA=`/bin/pwd`/unidata.txt; \
>   > 	cd /tmp/emacs/src/../lisp/international; \
>   > 	/tmp/emacs/build/src/temacs -batch --load ${ELC} -f
>   > unidata-gen-files ${DATA}
>   > Loading loadup.el (source)...
>   > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
>   > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
>   > /tmp/emacs/lisp/textmodes)
>   > Loading emacs-lisp/byte-run (source)...
>   > Loading emacs-lisp/backquote (source)...
>   > Loading subr (source)...
>   > Loading version.el (source)...
>   > Loading widget (source)...
>   > Loading custom (source)...
>   > Loading emacs-lisp/map-ynp (source)...
>   > Loading cus-start (source)...
>   > Note, built-in variable `selection-coding-system' not bound
>   > Loading international/mule (source)...
>   > Loading international/mule-conf.el (source)...
>   > make[3]: Leaving directory `/tmp/emacs/admin/unidata'
>   > `/bin/pwd`/temacs --batch --load loadup bootstrap
>   > Loading loadup.el (source)...
>   > Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp
>   > /tmp/emacs/lisp/language /tmp/emacs/lisp/international
>   > /tmp/emacs/lisp/textmodes)
>   > Loading emacs-lisp/byte-run (source)...
>   > Loading emacs-lisp/backquote (source)...
>   > Loading subr (source)...
>   > Loading version.el (source)...
>   > Loading widget (source)...
>   > Loading custom (source)...
>   > Loading emacs-lisp/map-ynp (source)...
>   > Loading cus-start (source)...
>   > Note, built-in variable `selection-coding-system' not bound
>   > Loading international/mule (source)...
>   > Loading international/mule-conf.el (source)...
> The next line here should be:
> Loading env...
> 
> So somehow this exited early, that's probably why things fail later.

I'm beginning to suspect that it crashed, because all 3 invocations of
temacs end at the same point, which cannot be explained by parallel
invocation.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-02 18:03 ` Eli Zaretskii
@ 2008-02-02 19:32   ` Angelo Graziosi
  2008-02-02 19:43     ` Eli Zaretskii
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-02 19:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii ha scritto:
>> Date: Fri, 01 Feb 2008 21:32:07 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>>
>> RUNEMACS="`/bin/pwd`/temacs"; cd /tmp/emacs/src/../admin/unidata; make 
>> -w --jobserver-fds=3,4 - --jobserver-fds=3,4 - --jobserver-fds=3,4 - 
>> --jobserver-fds=3,4 -j RUNEMACS="${RUNEMACS}" 
> 
> You are running "make -j" here, right?  If so, please try without -j;
> it's possible that parallel bootstrap is broken in Emacs 23.0.60.  If
> it works without -j, we can come back to -j later.

Obviously I tried (and forgot to write!) also without -j. I have tried 
in the simplest way, from command line:

mkdir -p /tmp/build
cd /tmp/build
/tmp/emacs/configure --with-x-toolkit=lucid
make bootstrap

Same result:
...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < 
UnicodeData.txt > unidata.txt
ELC=`/bin/pwd`/unidata-gen.elc; \
	DATA=`/bin/pwd`/unidata.txt; \
	cd /tmp/emacs/src/../lisp/international; \
	/tmp/build/src/temacs -batch --load ${ELC} -f unidata-gen-files ${DATA}
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
make[3]: Leaving directory `/tmp/emacs/admin/unidata'
`/bin/pwd`/temacs --batch --load loadup bootstrap
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
mv -f emacs.exe bootstrap-emacs.exe
mv: cannot fare stat `emacs.exe': No such file or directory
make[2]: *** [bootstrap-emacs.exe] Error 1
make[2]: Leaving directory `/tmp/build/src'
make[1]: *** [bootstrap-build] Error 2
make[1]: Leaving directory `/tmp/build'
make: *** [bootstrap] Error 2


   Angelo




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-02 19:32   ` Angelo Graziosi
@ 2008-02-02 19:43     ` Eli Zaretskii
  2008-02-02 21:21       ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-02 19:43 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Sat, 02 Feb 2008 20:32:29 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
> 
> `/bin/pwd`/temacs --batch --load loadup bootstrap
> Loading loadup.el (source)...
> Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
> /tmp/emacs/lisp/language /tmp/emacs/lisp/international 
> /tmp/emacs/lisp/textmodes)
> Loading emacs-lisp/byte-run (source)...
> Loading emacs-lisp/backquote (source)...
> Loading subr (source)...
> Loading version.el (source)...
> Loading widget (source)...
> Loading custom (source)...
> Loading emacs-lisp/map-ynp (source)...
> Loading cus-start (source)...
> Note, built-in variable `selection-coding-system' not bound
> Loading international/mule (source)...
> Loading international/mule-conf.el (source)...

Please run this command under GDB, and try to find out why temacs
exits prematurely, after (or during) loading mule-conf.el.  Does it
get a fatal signal, perhaps?




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-02 19:43     ` Eli Zaretskii
@ 2008-02-02 21:21       ` Angelo Graziosi
  2008-02-03  4:10         ` Eli Zaretskii
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-02 21:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii ha scritto:
>> Date: Sat, 02 Feb 2008 20:32:29 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: emacs-devel@gnu.org
>>
>> `/bin/pwd`/temacs --batch --load loadup bootstrap
>> Loading loadup.el (source)...
>> Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
>> /tmp/emacs/lisp/language /tmp/emacs/lisp/international 
>> /tmp/emacs/lisp/textmodes)
>> Loading emacs-lisp/byte-run (source)...
>> Loading emacs-lisp/backquote (source)...
>> Loading subr (source)...
>> Loading version.el (source)...
>> Loading widget (source)...
>> Loading custom (source)...
>> Loading emacs-lisp/map-ynp (source)...
>> Loading cus-start (source)...
>> Note, built-in variable `selection-coding-system' not bound
>> Loading international/mule (source)...
>> Loading international/mule-conf.el (source)...
> 
> Please run this command under GDB, and try to find out why temacs
> exits prematurely, after (or during) loading mule-conf.el.  Does it
> get a fatal signal, perhaps?

I have tried obtaining the following (remember that I am not an expert 
of GDB):

=============================================================
$ cd /tmp/build
$ gdb /tmp/build/src/temacs
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) run --batch --load loadup bootstrap
Starting program: /tmp/build/src/temacs.exe --batch --load loadup bootstrap
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 /c/WINDOWS/system32/secur32.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/cygminires.dll
Loaded symbols for /usr/bin/cygtiff-5.dll
Loaded symbols for /usr/bin/cygungif-4.dll
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...

Program received signal SIGSEGV, Segmentation fault.
0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
(gdb)
==================================================================

For the sake of completeness I have discovered

$ find /tmp/ -name "*stackdump*"
/tmp/build/src/temacs.exe.stackdump
/tmp/emacs/admin/unidata/temacs.exe.stackdump
/tmp/emacs/lisp/international/temacs.exe.stackdump


Cheers,
    Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-02 21:21       ` Angelo Graziosi
@ 2008-02-03  4:10         ` Eli Zaretskii
  2008-02-03  9:19           ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-03  4:10 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Sat, 02 Feb 2008 22:21:04 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
> 
> Loading international/mule-conf.el (source)...
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
> (gdb)

So it crashed, indeed.  The command "bt" at this point will hopefully
shed some light on what happened.  Please post the results.

> For the sake of completeness I have discovered
> 
> $ find /tmp/ -name "*stackdump*"
> /tmp/build/src/temacs.exe.stackdump
> /tmp/emacs/admin/unidata/temacs.exe.stackdump
> /tmp/emacs/lisp/international/temacs.exe.stackdump

These are the Cygwin equivalents of core dump files.  I suspect they
are very similar; please take a look at them and see where temacs
crashed, and whether they tell the same story as "bt" in GDB above.

Thanks.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03  4:10         ` Eli Zaretskii
@ 2008-02-03  9:19           ` Angelo Graziosi
  2008-02-03 19:40             ` Eli Zaretskii
  2008-02-03 21:02             ` Jason Rumney
  0 siblings, 2 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-03  9:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii ha wrote:

> 
> So it crashed, indeed.  The command "bt" at this point will hopefully
> shed some light on what happened.  Please post the results.

 >
 >> For the sake of completeness I have discovered
 >>
 >> $ find /tmp/ -name "*stackdump*"
 >> /tmp/build/src/temacs.exe.stackdump
 >> /tmp/emacs/admin/unidata/temacs.exe.stackdump
 >> /tmp/emacs/lisp/international/temacs.exe.stackdump
 >
 > These are the Cygwin equivalents of core dump files.  I suspect they
 > are very similar; please take a look at them and see where temacs
 > crashed, and whether they tell the same story as "bt" in GDB above.
 >

They (stackdump) are (all) zero sized, i.e. empty! Below there is the bt 
output.

Thanks,
   Angelo.


========================================================
$ gdb /tmp/build/src/temacs
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) run --batch --load loadup bootstrap
Starting program: /tmp/build/src/temacs.exe --batch --load loadup bootstrap
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 /c/WINDOWS/system32/secur32.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
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...

Program received signal SIGSEGV, Segmentation fault.
0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
(gdb) bt
#0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
#1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
#2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
#3  0x00bfba30 in ?? ()
#4  0x00020000 in ?? ()
#5  0x20ef0000 in bss_sbrk_buffer ()
#6  0x00020000 in ?? ()
#7  0x00033668 in ?? ()
#8  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
     at /tmp/emacs/src/ralloc.c:315
#9  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
     at /tmp/emacs/src/ralloc.c:315
#10 0x201674c9 in relocate_blocs (bloc=0x22d008, heap=0x610933b8,
     address=0x20ef0000) at /tmp/emacs/src/ralloc.c:518
#11 0x20167cff in r_alloc_sbrk (size=196608) at /tmp/emacs/src/ralloc.c:863
#12 0x20165cdb in align (size=2281480) at /tmp/emacs/src/gmalloc.c:508
#13 0x20166813 in _malloc_internal_nolock (size=65536)
     at /tmp/emacs/src/gmalloc.c:691
#14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
#15 0x00010000 in ?? ()
#16 0x00000000 in ?? ()
(gdb)
========================================================





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03  9:19           ` Angelo Graziosi
@ 2008-02-03 19:40             ` Eli Zaretskii
  2008-02-03 21:02               ` Angelo Graziosi
  2008-02-03 21:02             ` Jason Rumney
  1 sibling, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-03 19:40 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Sun, 03 Feb 2008 10:19:38 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
> 
> (gdb) bt
> #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
> #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
> #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
> #3  0x00bfba30 in ?? ()
> #4  0x00020000 in ?? ()
> #5  0x20ef0000 in bss_sbrk_buffer ()
> #6  0x00020000 in ?? ()
> #7  0x00033668 in ?? ()
> #8  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
>      at /tmp/emacs/src/ralloc.c:315
> #9  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
>      at /tmp/emacs/src/ralloc.c:315
> #10 0x201674c9 in relocate_blocs (bloc=0x22d008, heap=0x610933b8,
>      address=0x20ef0000) at /tmp/emacs/src/ralloc.c:518
> #11 0x20167cff in r_alloc_sbrk (size=196608) at /tmp/emacs/src/ralloc.c:863
> #12 0x20165cdb in align (size=2281480) at /tmp/emacs/src/gmalloc.c:508
> #13 0x20166813 in _malloc_internal_nolock (size=65536)
>      at /tmp/emacs/src/gmalloc.c:691
> #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll

Ouch! again in malloc & friends...  Looks like the bug you succeeded
to avoid by switching to a different GCC version is back, sigh.

Can you try older versions of cygwin1.dll and/or other GCC versions?

If none of that helps, I'm afraid we will need a Cygwin hacker on
board to help us debug this.  Can you ask someone on the Cygwin list
to volunteer?

TIA




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03 19:40             ` Eli Zaretskii
@ 2008-02-03 21:02               ` Angelo Graziosi
  0 siblings, 0 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-03 21:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii ha scritto:
>> Date: Sun, 03 Feb 2008 10:19:38 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: emacs-devel@gnu.org
>>
>> (gdb) bt
>> #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
>> #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
>> #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
>> #3  0x00bfba30 in ?? ()
>> #4  0x00020000 in ?? ()
>> #5  0x20ef0000 in bss_sbrk_buffer ()
>> #6  0x00020000 in ?? ()
>> #7  0x00033668 in ?? ()
>> #8  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
>>      at /tmp/emacs/src/ralloc.c:315
>> #9  0x201671f1 in obtain (address=0x202b7a5c, size=552534016)
>>      at /tmp/emacs/src/ralloc.c:315
>> #10 0x201674c9 in relocate_blocs (bloc=0x22d008, heap=0x610933b8,
>>      address=0x20ef0000) at /tmp/emacs/src/ralloc.c:518
>> #11 0x20167cff in r_alloc_sbrk (size=196608) at /tmp/emacs/src/ralloc.c:863
>> #12 0x20165cdb in align (size=2281480) at /tmp/emacs/src/gmalloc.c:508
>> #13 0x20166813 in _malloc_internal_nolock (size=65536)
>>      at /tmp/emacs/src/gmalloc.c:691
>> #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
> 
> Ouch! again in malloc & friends...  Looks like the bug you succeeded
> to avoid by switching to a different GCC version is back, sigh.
> 
> Can you try older versions of cygwin1.dll and/or other GCC versions?

In the meanwhile I have tried with: GCC-3.4.4, 4.0.4, 4.1.2, 4.2.2, 
4.2.3; with Cygwin-1.5.25-7, 1.5.25-5, 1.5.24-2 (Jan. 2007).

In all cases it fails in the same manner!

> 
> If none of that helps, I'm afraid we will need a Cygwin hacker on
> board to help us debug this.  

I suspected it...

Can you ask someone on the Cygwin list
> to volunteer?

I will try.

Thanks,
    Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03  9:19           ` Angelo Graziosi
  2008-02-03 19:40             ` Eli Zaretskii
@ 2008-02-03 21:02             ` Jason Rumney
  2008-02-03 21:14               ` Angelo Graziosi
  2008-02-04  4:16               ` Eli Zaretskii
  1 sibling, 2 replies; 47+ messages in thread
From: Jason Rumney @ 2008-02-03 21:02 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Eli Zaretskii, emacs-devel

Angelo Graziosi wrote: 
> (gdb) bt
> #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
> #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
> #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
> #3  0x00bfba30 in ?? ()
> #4  0x00020000 in ?? ()
> #5  0x20ef0000 in bss_sbrk_buffer ()
> #6  0x00020000 in ?? ()
> #7  0x00033668 in ?? ()
> ...
> #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
> #15 0x00010000 in ?? ()
> #16 0x00000000 in ?? ()
> (gdb)
There are no Emacs symbols in there. Are you deliberately building 
without debug info?






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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03 21:02             ` Jason Rumney
@ 2008-02-03 21:14               ` Angelo Graziosi
  2008-02-04  4:19                 ` Eli Zaretskii
  2008-02-04  4:16               ` Eli Zaretskii
  1 sibling, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-03 21:14 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Eli Zaretskii, emacs-devel

Jason Rumney ha scritto:
> Angelo Graziosi wrote:
>> (gdb) bt
>> #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
>> #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
>> #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
>> #3  0x00bfba30 in ?? ()
>> #4  0x00020000 in ?? ()
>> #5  0x20ef0000 in bss_sbrk_buffer ()
>> #6  0x00020000 in ?? ()
>> #7  0x00033668 in ?? ()
>> ...
>> #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
>> #15 0x00010000 in ?? ()
>> #16 0x00000000 in ?? ()
>> (gdb)
> There are no Emacs symbols in there. Are you deliberately building 
> without debug info?
> 
> 

The debug (-g) info should be active (see [1] or [2]). Shortly, I use

../configure
make bootstrap.

   Angelo

---
[1] http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00052.html
[2] http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00140.html




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03 21:02             ` Jason Rumney
  2008-02-03 21:14               ` Angelo Graziosi
@ 2008-02-04  4:16               ` Eli Zaretskii
  2008-02-04  8:58                 ` Jason Rumney
  1 sibling, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-04  4:16 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel, angelo.graziosi

> Date: Sun, 03 Feb 2008 21:02:55 +0000
> From: Jason Rumney <jasonr@gnu.org>
> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> Angelo Graziosi wrote: 
> > (gdb) bt
> > #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
> > #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
> > #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
> > #3  0x00bfba30 in ?? ()
> > #4  0x00020000 in ?? ()
> > #5  0x20ef0000 in bss_sbrk_buffer ()
> > #6  0x00020000 in ?? ()
> > #7  0x00033668 in ?? ()
> > ...
> > #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
> > #15 0x00010000 in ?? ()
> > #16 0x00000000 in ?? ()
> > (gdb)
> There are no Emacs symbols in there.

The portions you omitted (frames 8 to 13) did include Emacs symbols,
such as `obtain' and `r_alloc_sbrk'.

I believe that the higher levels don't have debug info because this
crash was caused by a call to malloc from the Cygwin DLL that came
from something not directly related to Emacs.  Perhaps some error
message that the Cygwin DLL wanted to pop.  But that's a wild
unsubstantiated guess, no more.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-03 21:14               ` Angelo Graziosi
@ 2008-02-04  4:19                 ` Eli Zaretskii
  2008-02-04  8:39                   ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-04  4:19 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel, jasonr

> Date: Sun, 03 Feb 2008 22:14:35 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> > There are no Emacs symbols in there. Are you deliberately building 
> > without debug info?
> > 
> > 
> 
> The debug (-g) info should be active (see [1] or [2]). Shortly, I use
> 
> ../configure
> make bootstrap.

Try using -g3 -O1, it should produce better debug info.  Not sure if
it will help in this case, though.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04  4:19                 ` Eli Zaretskii
@ 2008-02-04  8:39                   ` Angelo Graziosi
  2008-02-04  9:00                     ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-04  8:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, jasonr

Eli Zaretskii ha scritto:
>> Date: Sun, 03 Feb 2008 22:14:35 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>>
>>> There are no Emacs symbols in there. Are you deliberately building 
>>> without debug info?
>>>
>>>
>> The debug (-g) info should be active (see [1] or [2]). Shortly, I use
>>
>> ../configure
>> make bootstrap.
> 
> Try using -g3 -O1, it should produce better debug info.  Not sure if
> it will help in this case, though.

Concorde! In any case, for the sake of completeness, below the results.

Cheers,
    Angelo.

===================================================
cd /tmp/build

CFLAGS='-g3 -O1' /tmp/emacs/configure --with-x-toolkit=lucid 2>&1 | tee 
emacs-session.log

make bootstrap  2>&1 | tee -a emacs-session.log

gdb /tmp/build/src/temacs
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) run --batch --load loadup bootstrap
Starting program: /tmp/build/src/temacs.exe --batch --load loadup bootstrap
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 /c/WINDOWS/system32/secur32.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
Loading loadup.el (source)...
Using load-path (/tmp/emacs/lisp /tmp/emacs/lisp/emacs-lisp 
/tmp/emacs/lisp/language /tmp/emacs/lisp/international 
/tmp/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Note, built-in variable `selection-coding-system' not bound
Loading international/mule (source)...
Loading international/mule-conf.el (source)...

Program received signal SIGSEGV, Segmentation fault.
0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
(gdb) bt
#0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
#1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
#2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
#3  0x00bf9a30 in ?? ()
#4  0x00020000 in ?? ()
#5  0x20ee0000 in bss_sbrk_buffer ()
#6  0x00020000 in ?? ()
#7  0x00033878 in ?? ()
#8  0x20159a74 in __default_morecore (increment=131072)
     at /tmp/emacs/src/gmalloc.c:1747
#9  0x20159a74 in __default_morecore (increment=131072)
     at /tmp/emacs/src/gmalloc.c:1747
#10 0x20159d2a in obtain (address=0x20ee0000, size=4368)
     at /tmp/emacs/src/ralloc.c:315
#11 0x20159fc9 in relocate_blocs (bloc=0x202ef7a0, heap=0x202dc530,
     address=0x20ee0000) at /tmp/emacs/src/ralloc.c:518
#12 0x2015a512 in r_alloc_sbrk (size=196608) at /tmp/emacs/src/ralloc.c:863
#13 0x20158781 in align (size=196608) at /tmp/emacs/src/gmalloc.c:508
#14 0x201589c5 in morecore_nolock (size=196608) at 
/tmp/emacs/src/gmalloc.c:691
#15 0x20158f9e in _malloc_internal_nolock (size=65536)
     at /tmp/emacs/src/gmalloc.c:937
#16 0x2015914f in _malloc_internal (size=65536)
     at /tmp/emacs/src/gmalloc.c:1005
---Type <return> to continue, or q <return> to quit---
#17 0x20159185 in malloc (size=65536) at /tmp/emacs/src/gmalloc.c:1029
#18 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
#19 0x00010000 in ?? ()
#20 0x00000000 in ?? ()
(gdb)
===================================================




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04  4:16               ` Eli Zaretskii
@ 2008-02-04  8:58                 ` Jason Rumney
  0 siblings, 0 replies; 47+ messages in thread
From: Jason Rumney @ 2008-02-04  8:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, angelo.graziosi

Eli Zaretskii wrote:
>> Date: Sun, 03 Feb 2008 21:02:55 +0000
>> From: Jason Rumney <jasonr@gnu.org>
>> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>>
>> Angelo Graziosi wrote: 
>>     
>>> (gdb) bt
>>> #0  0x610e1805 in _vfprintf_r () from /usr/bin/cygwin1.dll
>>> #1  0x610f0358 in printf () from /usr/bin/cygwin1.dll
>>> #2  0x610933b8 in _sigfe () from /usr/bin/cygwin1.dll
>>> #3  0x00bfba30 in ?? ()
>>> #4  0x00020000 in ?? ()
>>> #5  0x20ef0000 in bss_sbrk_buffer ()
>>> #6  0x00020000 in ?? ()
>>> #7  0x00033668 in ?? ()
>>> ...
>>> #14 0x61057dbc in malloc () from /usr/bin/cygwin1.dll
>>> #15 0x00010000 in ?? ()
>>> #16 0x00000000 in ?? ()
>>> (gdb)
>>>       
>> There are no Emacs symbols in there.
>>     
>
> The portions you omitted (frames 8 to 13) did include Emacs symbols,
> such as `obtain' and `r_alloc_sbrk'.
>   
I didn't recognize those. I was expecting to see main and 
Frecursive_edit in the last two places.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04  8:39                   ` Angelo Graziosi
@ 2008-02-04  9:00                     ` YAMAMOTO Mitsuharu
  2008-02-04 10:35                       ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-02-04  9:00 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Eli Zaretskii, jasonr, emacs-devel

>>>>> On Mon, 04 Feb 2008 09:39:38 +0100, Angelo Graziosi <angelo.graziosi@alice.it> said:

>> Try using -g3 -O1, it should produce better debug info.  Not sure
>> if it will help in this case, though.

> Concorde! In any case, for the sake of completeness, below the
> results.

What happens if you increase the value of STATIC_HEAP_SIZE in sheap.c?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04  9:00                     ` YAMAMOTO Mitsuharu
@ 2008-02-04 10:35                       ` Angelo Graziosi
  2008-02-04 11:01                         ` YAMAMOTO Mitsuharu
  2008-02-04 20:55                         ` Eli Zaretskii
  0 siblings, 2 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-04 10:35 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: Eli Zaretskii, jasonr, emacs-devel

YAMAMOTO Mitsuharu ha scritto:
>>>>>> On Mon, 04 Feb 2008 09:39:38 +0100, Angelo Graziosi <angelo.graziosi@alice.it> said:
> 
>>> Try using -g3 -O1, it should produce better debug info.  Not sure
>>> if it will help in this case, though.
> 
>> Concorde! In any case, for the sake of completeness, below the
>> results.
> 
> What happens if you increase the value of STATIC_HEAP_SIZE in sheap.c?

We have some progress here!

with STATIC_HEAP_SIZE	(24 * 1024 * 1024) instead of (12 * ...) it fails 
in the same manner (temacs.exe.stackdump) only a little shifted forward;


with STATIC_HEAP_SIZE	(36 * 1024 * 1024) it fails in this way:
----------------------------------
[...]
find /tmp/emacs/lisp -name "*.elc" -print | xargs chmod +w >/dev/null 
2>&1 || true; \
	wd=/tmp/emacs/lisp; subdirs=`(cd $wd; find . -type d -print)`; for file 
in $subdirs; do case $file in */Old | */RCS | */CVS | */CVS/* | */.* | 
*/.*/* | */=* ) ;; *) wins="$wins $wd/$file" ;; esac; done;	\
	els=`echo $wins | tr ' \011' '\012\012' | \
		sed -e 's|\(.\)$|\1/|' -e 's|^\./||' -e 's|$|*.el|'`;	\
	for el in /tmp/emacs/lisp/emacs-lisp/byte-opt.el 
/tmp/emacs/lisp/emacs-lisp/bytecomp.el /tmp/emacs/lisp/subr.el 
/tmp/emacs/lisp/progmodes/cc-mode.el 
/tmp/emacs/lisp/progmodes/cc-vars.el $els; do \
	  if test -f $el; \
	  then \
	    echo Compiling $el; \
	    EMACSLOADPATH=/tmp/emacs/lisp LC_ALL=C ../src/bootstrap-emacs.exe 
-batch --no-site-file --multibyte   -f batch-byte-compile-if-not-done 
$el || exit 1; \
	  fi \
	done
Compiling /tmp/emacs/lisp/emacs-lisp/byte-opt.el
Wrote /tmp/emacs/lisp/emacs-lisp/byte-opt.elc
Compiling /tmp/emacs/lisp/emacs-lisp/bytecomp.el
Wrote /tmp/emacs/lisp/emacs-lisp/bytecomp.elc
Compiling /tmp/emacs/lisp/subr.el
Wrote /tmp/emacs/lisp/subr.elc
Compiling /tmp/emacs/lisp/progmodes/cc-mode.el
Fatal error (6)/bin/sh: line 4:  3676 Aborted                 (core 
dumped) EMACSLOADPATH=/tmp/emacs/lisp LC_ALL=C 
../src/bootstrap-emacs.exe -batch --no-site-file --multibyte -f 
batch-byte-compile-if-not-done $el
make[2]: *** [compile] Error 1
make[2]: Leaving directory `/tmp/emacs/build/lisp'
make[1]: *** [bootstrap-build] Error 2
make[1]: Leaving directory `/tmp/emacs/build'
make: *** [bootstrap] Error 2
----------------------------------

But this: "Fatal error (6)/bin/sh: line 4:  3676 Aborted..." 
(bootstrap_emacs.exe.stackdump) is an old problem building under Cygwin: 
it also happened with 22 and 23.0.50 versions. It usually is solved with 
a new check out of Emacs from CVS or... changing build directory. And 
effectively changing from /tmp/build to 
$HOME/downloads/emacs/tmp/emacs/build is still building (also with -j2 
option in make!), even if slowly.

May you suggest an optimal value for STATIC_HEAP_SIZE ?

I note also some warnings beside those reported on emacs-devel:

/home/graziosi/downloads/emacs.ports/tmp.emacs/emacs/src/fontset.c:1804: 
warning: incompatible implicit declaration of built-in function 'sprintf'

/home/graziosi/downloads/emacs.ports/tmp.emacs/emacs/src/search.c:2456: 
warning: comparison is always true due to limited range of data type
...


   Angelo




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 10:35                       ` Angelo Graziosi
@ 2008-02-04 11:01                         ` YAMAMOTO Mitsuharu
  2008-02-04 11:11                           ` Jason Rumney
  2008-02-04 20:55                         ` Eli Zaretskii
  1 sibling, 1 reply; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-02-04 11:01 UTC (permalink / raw)
  To: angelo.graziosi; +Cc: eliz, jasonr, emacs-devel

>>>>> On Mon, 04 Feb 2008 11:35:09 +0100, Angelo Graziosi <angelo.graziosi@alice.it> said:

> May you suggest an optimal value for STATIC_HEAP_SIZE ?

Sorry,  I'm not using Windows, and I can't test it myself.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 11:01                         ` YAMAMOTO Mitsuharu
@ 2008-02-04 11:11                           ` Jason Rumney
  0 siblings, 0 replies; 47+ messages in thread
From: Jason Rumney @ 2008-02-04 11:11 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: eliz, emacs-devel, angelo.graziosi

YAMAMOTO Mitsuharu wrote:
>>>>>> On Mon, 04 Feb 2008 11:35:09 +0100, Angelo Graziosi <angelo.graziosi@alice.it> said:
>>>>>>             
>
>   
>> May you suggest an optimal value for STATIC_HEAP_SIZE ?
>>     
>
> Sorry,  I'm not using Windows, and I can't test it myself.
>   
On Windows, the STATIC_HEAP_SIZE requirement for dumping Emacs went from 
16Mb to 21Mb. So while it may have increased for Cygwin, I wouldn't 
expect it to more than double.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 10:35                       ` Angelo Graziosi
  2008-02-04 11:01                         ` YAMAMOTO Mitsuharu
@ 2008-02-04 20:55                         ` Eli Zaretskii
  2008-02-04 22:07                           ` Angelo Graziosi
  2008-02-05  2:10                           ` Angelo Graziosi
  1 sibling, 2 replies; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-04 20:55 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: jasonr, mituharu, emacs-devel

> Date: Mon, 04 Feb 2008 11:35:09 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org, jasonr@gnu.org
> 
> May you suggest an optimal value for STATIC_HEAP_SIZE ?

How about calling report_sheap_usage from GDB, like so:

  (gdb) call report_sheap_usage(0)

It should print how much of the static heap is used.  By defining a
large value of STATIC_HEAP_SIZE and measuring its usage with this
function, you could estimate the optimal value.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 20:55                         ` Eli Zaretskii
@ 2008-02-04 22:07                           ` Angelo Graziosi
  2008-02-05  4:17                             ` Eli Zaretskii
  2008-02-05  2:10                           ` Angelo Graziosi
  1 sibling, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-04 22:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

Eli Zaretskii ha scritto:
>> Date: Mon, 04 Feb 2008 11:35:09 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org, jasonr@gnu.org
>>
>> May you suggest an optimal value for STATIC_HEAP_SIZE ?
> 

I have done several tries.

With STATIC_HEAP_SIZE 30MB (30*1024*1024) at the end of the build I find:

$ find /tmp/ -name "*stackdump*"
/tmp/emacs/lisp/international/temacs.exe.stackdump

Instead trying 32 MB seems to avoid the stackdump and STATIC_HEAP_SIZE 
should be >= 32 MB.

 > How about calling report_sheap_usage from GDB, like so:
 >
 >   (gdb) call report_sheap_usage(0)
 >
 > It should print how much of the static heap is used.  By defining a
 > large value of STATIC_HEAP_SIZE and measuring its usage with this
 > function, you could estimate the optimal value.

I have tried this:

gdb /tmp/build/src/temacs
(gdb)run --batch --load loadup bootstrap
[...]
(gdb) call report_sheap_usage(0)
Static heap usage: 12486816 of 12582912 bytes

But from the result it seems that I have not completely understood how 
this test should be executed! Sorry!


   Angelo.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 20:55                         ` Eli Zaretskii
  2008-02-04 22:07                           ` Angelo Graziosi
@ 2008-02-05  2:10                           ` Angelo Graziosi
  2008-02-05  4:17                             ` Eli Zaretskii
  1 sibling, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05  2:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

Eli Zaretskii ha scritto:
>> Date: Mon, 04 Feb 2008 11:35:09 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org, jasonr@gnu.org
>>
>> May you suggest an optimal value for STATIC_HEAP_SIZE ?
> 
> How about calling report_sheap_usage from GDB, like so:
> 
>   (gdb) call report_sheap_usage(0)
> 
> It should print how much of the static heap is used.  By defining a
> large value of STATIC_HEAP_SIZE and measuring its usage with this
> function, you could estimate the optimal value.

Well, I have completed the bootstrap (now it take 3 hours aganist 1 - 
1.5 of 23.0.50 builds) without stackdump. I have used 32MB for 
STATIC_HEAP_SIZE and, this time, I have configured to use XFT and LUCID 
(on Cygwin, GTK is not yet possible! Ooops... obviously I did a GTK 
bootstrap on GNU/Linux Kubuntu 7.10!):

LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' \
${source_dir}/configure --prefix=${prefix_dir} \
                         --enable-font-backend \
                         --with-x-toolkit=lucid

Adding

Emacs.FontBackend:      xft
Emacs.font:             Bitstream Vera Sans Mono-14

to .Xdefaults  l e a v e s  without words!!!

Hope only it is stable!


Cheers,
    Angelo.


---
http://www.webalice.it/angelo.graziosi


Facesti come quei che va di notte,
che porta il lume dietro e se' non giova,
ma dopo se' fa le persone dotte.
--
                   DANTE, Purgatorio, xxii 67-69




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-04 22:07                           ` Angelo Graziosi
@ 2008-02-05  4:17                             ` Eli Zaretskii
  0 siblings, 0 replies; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-05  4:17 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: jasonr, mituharu, emacs-devel

> Date: Mon, 04 Feb 2008 23:07:57 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
> 
> gdb /tmp/build/src/temacs
> (gdb)run --batch --load loadup bootstrap
> [...]
> (gdb) call report_sheap_usage(0)
> Static heap usage: 12486816 of 12582912 bytes
> 
> But from the result it seems that I have not completely understood how 
> this test should be executed! Sorry!

What makes you think you misunderstood it?  I think you understood it
perfectly.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05  2:10                           ` Angelo Graziosi
@ 2008-02-05  4:17                             ` Eli Zaretskii
  2008-02-05 10:12                               ` Angelo Graziosi
  2008-02-05 17:22                               ` Angelo Graziosi
  0 siblings, 2 replies; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-05  4:17 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: jasonr, mituharu, emacs-devel

> Date: Tue, 05 Feb 2008 03:10:04 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
> 
> Well, I have completed the bootstrap (now it take 3 hours aganist 1 - 
> 1.5 of 23.0.50 builds) without stackdump. I have used 32MB for 
> STATIC_HEAP_SIZE and

So I guess 32MB is the value we need to use, right?




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05  4:17                             ` Eli Zaretskii
@ 2008-02-05 10:12                               ` Angelo Graziosi
  2008-02-05 10:19                                 ` Jason Rumney
                                                   ` (2 more replies)
  2008-02-05 17:22                               ` Angelo Graziosi
  1 sibling, 3 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05 10:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

Eli Zaretskii ha scritto:
>> Date: Tue, 05 Feb 2008 03:10:04 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
>>
>> Well, I have completed the bootstrap (now it take 3 hours aganist 1 - 
>> 1.5 of 23.0.50 builds) without stackdump. I have used 32MB for 
>> STATIC_HEAP_SIZE and
> 
> So I guess 32MB is the value we need to use, right?

32MB is the value that has given the best result. I have used it 
applying this:

========================================================
--- sheap.c.orig	2008-01-08 21:44:26.000000000 +0100
+++ sheap.c	2008-02-04 21:37:57.234375000 +0100
@@ -26,7 +26,11 @@

  #include <unistd.h>

-#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
+#ifdef CYGWIN
+  #define STATIC_HEAP_SIZE	(32 * 1024 * 1024)
+#else
+  #define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
+#endif

  int debug_sheap = 0;
========================================================

(Eli, if you object that things as "#ifdef CYGWIN" should go to 
cygwin.h, observe the sheap.c yet contains an "#ifdef CYGWIN sbrk...")


Cheers,
    Angelo.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 10:12                               ` Angelo Graziosi
@ 2008-02-05 10:19                                 ` Jason Rumney
  2008-02-05 10:52                                   ` Angelo Graziosi
  2008-02-05 20:17                                 ` Eli Zaretskii
  2008-05-28  2:15                                 ` Jashy
  2 siblings, 1 reply; 47+ messages in thread
From: Jason Rumney @ 2008-02-05 10:19 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Eli Zaretskii, mituharu, emacs-devel

Angelo Graziosi wrote:
> 32MB is the value that has given the best result. I have used it 
> applying this:

And yet sheap_usage reported only just over 12Mb...

gdb /tmp/build/src/temacs
(gdb)run --batch --load loadup bootstrap
[...]
(gdb) call report_sheap_usage(0)
Static heap usage: 12486816 of 12582912 bytes





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 10:19                                 ` Jason Rumney
@ 2008-02-05 10:52                                   ` Angelo Graziosi
  2008-02-05 11:10                                     ` Jason Rumney
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05 10:52 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Eli Zaretskii, mituharu, emacs-devel

Jason Rumney ha scritto:
> Angelo Graziosi wrote:
>> 32MB is the value that has given the best result. I have used it 
>> applying this:
> 
> And yet sheap_usage reported only just over 12Mb...
> 
> gdb /tmp/build/src/temacs
> (gdb)run --batch --load loadup bootstrap
> [...]
> (gdb) call report_sheap_usage(0)
> Static heap usage: 12486816 of 12582912 bytes
> 

For the sake of completeness, in the build log I find

[...]
Loading /tmp.emacs/emacs/lisp/term/x-win.el (source)...
((267413 . 13825) (13303 . 8) (644 . 191) 1942477 1271837 (86 . 1) (20 . 
71) (29741 . 11335))
Loading /tmp.emacs/emacs/lisp/emacs-lisp/float-sup.el (source)...
((267470 . 13768) (13307 . 4) (644 . 191) 1942778 1271837 (92 . 4) (20 . 
71) (29750 . 11263))
Loading /tmp.emacs/emacs/lisp/vc-hooks.el (source)...
Loading /tmp.emacs/emacs/lisp/ediff-hook.el (source)...
Loading /tmp.emacs/emacs/lisp/tooltip.el (source)...
((271923 . 9315) (13466 . 2) (645 . 190) 1964878 1271890 (94 . 2) (20 . 
71) (30197 . 10816))
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs

Static heap usage: 27297952 of 33554432 bytes         <<===
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


71022 pure bytes used
mv -f emacs.exe bootstrap-emacs.exe
make[2]: Leaving directory `/tmp.emacs/build/src'
(cd lisp; make -w bootstrap EMACS=../src/bootstrap-emacs.exe)
[...]

   Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 10:52                                   ` Angelo Graziosi
@ 2008-02-05 11:10                                     ` Jason Rumney
  2008-02-05 12:03                                       ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Jason Rumney @ 2008-02-05 11:10 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Eli Zaretskii, mituharu, emacs-devel

Angelo Graziosi wrote:
> Jason Rumney ha scritto:
>> Angelo Graziosi wrote:
>>> 32MB is the value that has given the best result. I have used it 
>>> applying this:
>>
>> And yet sheap_usage reported only just over 12Mb...
>>
>> gdb /tmp/build/src/temacs
>> (gdb)run --batch --load loadup bootstrap
>> [...]
>> (gdb) call report_sheap_usage(0)
>> Static heap usage: 12486816 of 12582912 bytes
>>
>
> For the sake of completeness, in the build log I find
> Static heap usage: 27297952 of 33554432 bytes         <<===

That makes more sense based on your experimentation that found that 32Mb 
worked best, but it doesn't explain why Cygwin suddenly needs a lot more 
than other platforms. And is the increased size only required for 
bootstrapping?





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 11:10                                     ` Jason Rumney
@ 2008-02-05 12:03                                       ` Angelo Graziosi
  0 siblings, 0 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05 12:03 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Eli Zaretskii, mituharu, emacs-devel

Jason Rumney ha scritto:
> Angelo Graziosi wrote:
>> Jason Rumney ha scritto:
>>> Angelo Graziosi wrote:
>>>> 32MB is the value that has given the best result. I have used it 
>>>> applying this:
>>>
>>> And yet sheap_usage reported only just over 12Mb...
>>>
>>> gdb /tmp/build/src/temacs
>>> (gdb)run --batch --load loadup bootstrap
>>> [...]
>>> (gdb) call report_sheap_usage(0)
>>> Static heap usage: 12486816 of 12582912 bytes
>>>
>>
>> For the sake of completeness, in the build log I find
>> Static heap usage: 27297952 of 33554432 bytes         <<===
> 
> That makes more sense based on your experimentation that found that 32Mb 
> worked best, but it doesn't explain why Cygwin suddenly needs a lot more 
> than other platforms. And is the increased size only required for 
> bootstrapping?
> 

After the bootstrap, I have done a source snapshot (make-dist
--snapshot...) and then I have tried to build it

.../configure ...
make

using the current CVS value of 12MB and it fails:

[...]
Loading format...
./emacs -q -batch -f list-load-path-shadows
make[1]: ./emacs: Command not found
make[1]: [emacs.exe] Error 127 (ignored)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make[1]: Leaving directory `/tmp.emacs/build/src'
(export PARALLEL; PARALLEL=0; cd leim; make all  \
	  CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='' \
	  LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base
-L/usr/X11R6/lib' MAKE='make')
make[1]: Entering directory `/tmp.emacs/build/leim'
cd ../src; make -w emacs
make[2]: Entering directory `/tmp.emacs/build/src'
gcc -Wl,--enable-auto-import -Wl,--enable-auto-image-base
-L/usr/X11R6/lib  emacs.o   -o emacs
emacs.o: In function `syms_of_emacs':
/tmp.emacs/emacs-23.0.60/src/emacs.c:2447: undefined reference to `_intern'
/tmp.emacs/emacs-23.0.60/src/emacs.c:2448: undefined reference to
`_staticpro'
/tmp.emacs/emacs-23.0.60/src/emacs.c:2454: undefined reference to `_defsubr'
[...]
/tmp.emacs/emacs-23.0.60/src/emacs.c:2180: undefined reference to
`_check_message_stack'
collect2: ld returned 1 exit status
make[2]: *** [emacs] Error 1
make[2]: Leaving directory `/tmp.emacs/build/src'
make[1]: *** [../src/emacs] Error 2
make[1]: Leaving directory `/tmp.emacs/build/leim'
make: *** [leim] Error 2

$ find /tmp.emacs/ -name "*stackdump*"
/tmp.emacs/build/src/temacs.exe.stackdump


Instead if I use 32MB, the build is completed (in 11 min.) and I find:

...
Dumping under the name emacs
Static heap usage: 21072032 of 33554432 bytes
                    ^^^^^^^^^^^^^^^^^^^^^
1171946 pure bytes used
...


    Angelo.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05  4:17                             ` Eli Zaretskii
  2008-02-05 10:12                               ` Angelo Graziosi
@ 2008-02-05 17:22                               ` Angelo Graziosi
  1 sibling, 0 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05 17:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

I wrote:

 > Adding
 >
 > Emacs.FontBackend:      xft
 > Emacs.font:             Bitstream Vera Sans Mono-14
 >
 >to .Xdefaults  l e a v e s  without words!!!

I forgot to atach an example.


Cheers,
    Angelo.

[-- Attachment #2: emacs.png --]
[-- Type: image/png, Size: 125411 bytes --]

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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 10:12                               ` Angelo Graziosi
  2008-02-05 10:19                                 ` Jason Rumney
@ 2008-02-05 20:17                                 ` Eli Zaretskii
  2008-02-05 20:49                                   ` Angelo Graziosi
  2008-05-28  2:15                                 ` Jashy
  2 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-05 20:17 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: jasonr, mituharu, emacs-devel

> Date: Tue, 05 Feb 2008 11:12:13 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
> 
> -#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
> +#ifdef CYGWIN
> +  #define STATIC_HEAP_SIZE	(32 * 1024 * 1024)
> +#else
> +  #define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
> +#endif
> 
>   int debug_sheap = 0;
> ========================================================
> 
> (Eli, if you object that things as "#ifdef CYGWIN" should go to 
> cygwin.h, observe the sheap.c yet contains an "#ifdef CYGWIN sbrk...")

Actually, I wonder why do you need "#ifdef CYGWIN" at all: sheap.c is
compiled _only_ for the Cygwin build (see src/Makefile.in).  It looks
like you can change the above line unconditionally.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 20:17                                 ` Eli Zaretskii
@ 2008-02-05 20:49                                   ` Angelo Graziosi
  2008-02-06  4:10                                     ` Eli Zaretskii
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-05 20:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

Eli Zaretskii ha scritto:
>> Date: Tue, 05 Feb 2008 11:12:13 +0100
>> From: Angelo Graziosi <angelo.graziosi@alice.it>
>> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
>>
>> -#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
>> +#ifdef CYGWIN
>> +  #define STATIC_HEAP_SIZE	(32 * 1024 * 1024)
>> +#else
>> +  #define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
>> +#endif
>>
>>   int debug_sheap = 0;
>> ========================================================
>>
>> (Eli, if you object that things as "#ifdef CYGWIN" should go to 
>> cygwin.h, observe the sheap.c yet contains an "#ifdef CYGWIN sbrk...")
> 
> Actually, I wonder why do you need "#ifdef CYGWIN" at all: sheap.c is
> compiled _only_ for the Cygwin build (see src/Makefile.in).  It looks
> like you can change the above line unconditionally.

This explains why I have not found it compiled on linux (a search for 
*heap in the build log finds w32heap.c).

In any case, if sheap.c is used only on Cygwin, this section of code

void *
bss_sbrk (ptrdiff_t request_size)
{
   if (!bss_sbrk_ptr)
     {
       bss_sbrk_ptr = bss_sbrk_buffer;
#ifdef CYGWIN
       sbrk (BLOCKSIZE);		/* force space for fork to work */
#endif
     }

   if (!(int) request_size)


should be changed too! or not?


Cheers,
    Angelo.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 20:49                                   ` Angelo Graziosi
@ 2008-02-06  4:10                                     ` Eli Zaretskii
  2008-02-06 15:27                                       ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2008-02-06  4:10 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: jasonr, mituharu, emacs-devel

> Date: Tue, 05 Feb 2008 21:49:21 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org, jasonr@gnu.org
> 
> In any case, if sheap.c is used only on Cygwin, this section of code
> 
> void *
> bss_sbrk (ptrdiff_t request_size)
> {
>    if (!bss_sbrk_ptr)
>      {
>        bss_sbrk_ptr = bss_sbrk_buffer;
> #ifdef CYGWIN
>        sbrk (BLOCKSIZE);		/* force space for fork to work */
> #endif
>      }
> 
>    if (!(int) request_size)
> 
> 
> should be changed too! or not?

Yes, the #ifdef should go away.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-06  4:10                                     ` Eli Zaretskii
@ 2008-02-06 15:27                                       ` Angelo Graziosi
  0 siblings, 0 replies; 47+ messages in thread
From: Angelo Graziosi @ 2008-02-06 15:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jasonr, mituharu, emacs-devel

I would ask if you have an idea about this warning:

------------------------------------------------------------
Warning: Default coding system `iso-latin-1' disagrees with
system codeset `US-ASCII' for this locale.
------------------------------------------------------------

it appears both in the build log (toward the end) and when starting 
Emacs ('emacs -nw' or from an X shell 'emacs&').

I have bootstrapped configuring

LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' \
${source_dir}/configure --prefix=${prefix_dir} \
                         --enable-font-backend \
                         --with-x-toolkit=lucid

using 32MB for STATIC_HEAP_SIZE and in .Xdefault I have added

Emacs.FontBackend:      xft
Emacs.font:             Bitstream Vera Sans Mono-14


Thanks,
    Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-02-05 10:12                               ` Angelo Graziosi
  2008-02-05 10:19                                 ` Jason Rumney
  2008-02-05 20:17                                 ` Eli Zaretskii
@ 2008-05-28  2:15                                 ` Jashy
  2008-05-28  3:06                                   ` Stefan Monnier
  2008-05-28  3:21                                   ` YAMAMOTO Mitsuharu
  2 siblings, 2 replies; 47+ messages in thread
From: Jashy @ 2008-05-28  2:15 UTC (permalink / raw)
  To: Emacs-devel


Seemly the patch does not enter into current emacs CVS.

I just tried the patch on Cygwin with current emacs CVS, PASS.


Angelo Graziosi-2 wrote:
> 
> ========================================================
> --- sheap.c.orig	2008-01-08 21:44:26.000000000 +0100
> +++ sheap.c	2008-02-04 21:37:57.234375000 +0100
> @@ -26,7 +26,11 @@
> 
>   #include <unistd.h>
> 
> -#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
> +#ifdef CYGWIN
> +  #define STATIC_HEAP_SIZE	(32 * 1024 * 1024)
> +#else
> +  #define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
> +#endif
> 
>   int debug_sheap = 0;
> ========================================================
> 

-- 
View this message in context: http://www.nabble.com/The-bootstrap-of-Emacs-on-Cygwin-is-broken--Is-also%3A-unicode-branch-is-merged-to-trunk--tp15234948p17503984.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28  2:15                                 ` Jashy
@ 2008-05-28  3:06                                   ` Stefan Monnier
  2008-05-28  3:21                                   ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 47+ messages in thread
From: Stefan Monnier @ 2008-05-28  3:06 UTC (permalink / raw)
  To: Jashy; +Cc: Emacs-devel

>> --- sheap.c.orig	2008-01-08 21:44:26.000000000 +0100
>> +++ sheap.c	2008-02-04 21:37:57.234375000 +0100
>> @@ -26,7 +26,11 @@
>> 
>> #include <unistd.h>
>> 
>> -#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
>> +#ifdef CYGWIN

According to the first 2 lines of sheap.c, this file is specific to
cygwin, so there's no need to "#ifdef CYGWIN".


        Stefan




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28  2:15                                 ` Jashy
  2008-05-28  3:06                                   ` Stefan Monnier
@ 2008-05-28  3:21                                   ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-05-28  3:21 UTC (permalink / raw)
  To: Jashy; +Cc: Emacs-devel

>>>>> On Tue, 27 May 2008 19:15:21 -0700 (PDT), Jashy <nanjunjie@gmail.com> said:

> Seemly the patch does not enter into current emacs CVS.

> I just tried the patch on Cygwin with current emacs CVS, PASS.


> Angelo Graziosi-2 wrote:
>> 
>> ========================================================
>> --- sheap.c.orig	2008-01-08 21:44:26.000000000 +0100
>> +++ sheap.c	2008-02-04 21:37:57.234375000 +0100
>> @@ -26,7 +26,11 @@
>> 
>> #include <unistd.h>
>> 
>> -#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
>> +#ifdef CYGWIN
>> +  #define STATIC_HEAP_SIZE	(32 * 1024 * 1024)
>> +#else
>> +  #define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
>> +#endif
>> 
>> int debug_sheap = 0;
>> ========================================================
>> 

In relation to the recent "Problems preloading x-win.el" thread, the
requirement for the final dump is not that big (12486816 bytes)
according to:

  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00295.html
  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00360.html

Only bootstrapping stage requires more room (27297952 bytes) according
to:

  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00362.html

Could someone check how much sheap size is required if x-win.el (or
some counterparts in the compilation on Cygwin) is not preloaded at
the *bootstrapping stage* ?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
@ 2008-05-28  7:42 ` Angelo Graziosi
  2008-05-28 10:20   ` Jashy
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-05-28  7:42 UTC (permalink / raw)
  To: emacs-devel; +Cc: nanjunjie, monnier, mituharu

Jashy wrote:

 > I just tried the patch on Cygwin with current emacs CVS, PASS.


Stefan Monnier wrote:

 > According to the first 2 lines of sheap.c, this file is specific to
 > cygwin, so there's no need to "#ifdef CYGWIN".


YAMAMOTO Mitsuharu wrote:

 > In relation to the recent "Problems preloading x-win.el" thread, the
 > requirement for the final dump is not that big (12486816 bytes)



For the sake of completeness, they are a few months I use this patch:

====================================================
--- sheap.orig.c        2008-01-08 21:44:26.000000000 +0100
+++ sheap.c     2008-04-10 14:32:40.265625000 +0200
@@ -26,7 +26,11 @@

  #include <unistd.h>

-#define STATIC_HEAP_SIZE       (12 * 1024 * 1024)
+#ifdef BOOT_STRAP
+#define STATIC_HEAP_SIZE       (25 * 1024 * 1024)
+#else
+#define STATIC_HEAP_SIZE       (19 * 1024 * 1024)
+#endif

  int debug_sheap = 0;

@@ -42,9 +46,7 @@
    if (!bss_sbrk_ptr)
      {
        bss_sbrk_ptr = bss_sbrk_buffer;
-#ifdef CYGWIN
        sbrk (BLOCKSIZE);                /* force space for fork to work */
-#endif
      }

    if (!(int) request_size)
====================================================


Bootstrapping on Cygwin needs about 24 MB for STATIC_HEAP_SIZE, after 
the first build of binaries; it needs 'only' about < 19MB, after the 
final build of binaries.


So, if I want a full bootstrap, I configure with:

-DBOOT_STRAP  ${source_dir}/configure...

If I bootstrap on GNU/Linux, make-dist --snapshot... then I can build 
(NO bootstrap) configuring

  ${source_dir}/configure


Any other solution (mainly reducing STATIC_HEAP_SIZE) is good.


Cheers,
    Angelo.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28  7:42 ` Angelo Graziosi
@ 2008-05-28 10:20   ` Jashy
  2008-05-28 10:30     ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 47+ messages in thread
From: Jashy @ 2008-05-28 10:20 UTC (permalink / raw)
  To: Emacs-devel


Just tried 
#define STATIC_HEAP_SIZE       (25 * 1024 * 1024)  works
but 
#define STATIC_HEAP_SIZE       (24 * 1024 * 1024) NOT

So seemly 25 is the key number.


Angelo Graziosi-2 wrote:
> 
> 
>   #include <unistd.h>
> 
> -#define STATIC_HEAP_SIZE       (12 * 1024 * 1024)
> +#ifdef BOOT_STRAP
> +#define STATIC_HEAP_SIZE       (25 * 1024 * 1024)
> +#else
> +#define STATIC_HEAP_SIZE       (19 * 1024 * 1024)
> +#endif
> 
>   int debug_sheap = 0;
> 
> @@ -42,9 +46,7 @@
>     if (!bss_sbrk_ptr)
>       {
>         bss_sbrk_ptr = bss_sbrk_buffer;
> -#ifdef CYGWIN
>         sbrk (BLOCKSIZE);                /* force space for fork to work
> */
> -#endif
>       }
> 

-- 
View this message in context: http://www.nabble.com/The-bootstrap-of-Emacs-on-Cygwin-is-broken--Is-also%3A-unicode-branch-is-merged-to-trunk--tp15234948p17509540.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28 10:20   ` Jashy
@ 2008-05-28 10:30     ` YAMAMOTO Mitsuharu
  2008-05-28 11:36       ` Jashy
  0 siblings, 1 reply; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-05-28 10:30 UTC (permalink / raw)
  To: Jashy; +Cc: Emacs-devel

>>>>> On Wed, 28 May 2008 03:20:15 -0700 (PDT), Jashy <nanjunjie@gmail.com> said:

> Just tried 
> #define STATIC_HEAP_SIZE       (25 * 1024 * 1024)  works
> but 
> #define STATIC_HEAP_SIZE       (24 * 1024 * 1024) NOT

> So seemly 25 is the key number.

What happens if you replace

      (load "term/x-win")

with

      (unless (or (equal (nth 3 command-line-args) "bootstrap")
		  (equal (nth 4 command-line-args) "bootstrap"))
	(load "term/x-win"))

(and likewise for "term/w32-win") in lisp/loadup.el?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28 10:30     ` YAMAMOTO Mitsuharu
@ 2008-05-28 11:36       ` Jashy
  2008-05-28 12:06         ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 47+ messages in thread
From: Jashy @ 2008-05-28 11:36 UTC (permalink / raw)
  To: Emacs-devel


#define STATIC_HEAP_SIZE       (24 * 1024 * 1024) 
plus 
the term/x-win, term/w32-win patch 
works.

But I still prefer the solution:
#define STATIC_HEAP_SIZE       (32 * 1024 * 1024)
since it is stupid and simple and may work for longer time in the future if
more lisp files added.


YAMAMOTO Mitsuharu wrote:
> 
>>>>>> On Wed, 28 May 2008 03:20:15 -0700 (PDT), Jashy <nanjunjie@gmail.com>
>>>>>> said:
> 
>> Just tried 
>> #define STATIC_HEAP_SIZE       (25 * 1024 * 1024)  works
>> but 
>> #define STATIC_HEAP_SIZE       (24 * 1024 * 1024) NOT
> 
>> So seemly 25 is the key number.
> 
> What happens if you replace
> 
>       (load "term/x-win")
> 
> with
> 
>       (unless (or (equal (nth 3 command-line-args) "bootstrap")
> 		  (equal (nth 4 command-line-args) "bootstrap"))
> 	(load "term/x-win"))
> 
> (and likewise for "term/w32-win") in lisp/loadup.el?
> 
> 

-- 
View this message in context: http://www.nabble.com/The-bootstrap-of-Emacs-on-Cygwin-is-broken--Is-also%3A-unicode-branch-is-merged-to-trunk--tp15234948p17510675.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28 11:36       ` Jashy
@ 2008-05-28 12:06         ` YAMAMOTO Mitsuharu
  2008-05-28 13:16           ` Jashy
  0 siblings, 1 reply; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-05-28 12:06 UTC (permalink / raw)
  To: Jashy; +Cc: Emacs-devel

>>>>> On Wed, 28 May 2008 04:36:01 -0700 (PDT), Jashy <nanjunjie@gmail.com> said:

> #define STATIC_HEAP_SIZE       (24 * 1024 * 1024) 
> plus 
> the term/x-win, term/w32-win patch 
> works.

> But I still prefer the solution:
> #define STATIC_HEAP_SIZE       (32 * 1024 * 1024)
> since it is stupid and simple and may work for longer time in the future if
> more lisp files added.

Thanks for testing.  So, did it fail with 23MB?  I'd like to know
how much reduction is possible by not preloading *-win.el at the
bootstrap stage.  As I said, the final dump requires much less
sheap (less than 19MB according to Angelo Graziosi).  Also,
preloading *-win at the bootstrap stage does not make sense.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28 12:06         ` YAMAMOTO Mitsuharu
@ 2008-05-28 13:16           ` Jashy
  2008-05-28 17:21             ` Angelo Graziosi
  0 siblings, 1 reply; 47+ messages in thread
From: Jashy @ 2008-05-28 13:16 UTC (permalink / raw)
  To: Emacs-devel


23M failed.


YAMAMOTO Mitsuharu wrote:
> 
> Thanks for testing.  So, did it fail with 23MB?  I'd like to know
> how much reduction is possible by not preloading *-win.el at the
> bootstrap stage.  As I said, the final dump requires much less
> sheap (less than 19MB according to Angelo Graziosi).  Also,
> preloading *-win at the bootstrap stage does not make sense.
> 
> 				     YAMAMOTO Mitsuharu
> 				mituharu@math.s.chiba-u.ac.jp
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/The-bootstrap-of-Emacs-on-Cygwin-is-broken--Is-also%3A-unicode-branch-is-merged-to-trunk--tp15234948p17512441.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.





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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
@ 2008-05-28 17:21             ` Angelo Graziosi
  2008-05-29  0:38               ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 47+ messages in thread
From: Angelo Graziosi @ 2008-05-28 17:21 UTC (permalink / raw)
  To: emacs-devel; +Cc: mituharu

YAMAMOTO Mitsuharu wrote:

 > What happens if you replace
 >
 >      (load "term/x-win")
 >
 > with
 >
 >      (unless (or (equal (nth 3 command-line-args) "bootstrap")
 >                  (equal (nth 4 command-line-args) "bootstrap"))
 >        (load "term/x-win"))
 >
 > (and likewise for "term/w32-win") in lisp/loadup.el?

With the above suggestions, the full bootstrap requests at least 24MB.

The log file of the bootstrap shows that in the first stage it needs 24 MB:

[...]
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
Static heap usage: 25097944 of 25165824 bytes             <==
71662 pure bytes used
mv -f emacs.exe bootstrap-emacs.exe
[...]


in the final stage about 19MB,

[...]
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
Static heap usage: 19265240 of 25165824 bytes           <==
1209462 pure bytes used
./emacs -q -batch -f list-load-path-shadows
make[3]: Leaving directory `/work/build/src'
[...]

These values are not too much different from those I usually use:

#ifdef BOOT_STRAP
#define STATIC_HEAP_SIZE       (25 * 1024 * 1024)
#else
#define STATIC_HEAP_SIZE       (19 * 1024 * 1024)
#endif


Cheers,
    Angelo.




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

* Re: The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk]
  2008-05-28 17:21             ` Angelo Graziosi
@ 2008-05-29  0:38               ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 47+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-05-29  0:38 UTC (permalink / raw)
  To: Jashy, Angelo Graziosi; +Cc: Emacs-devel

>>>>> On Wed, 28 May 2008 06:16:43 -0700 (PDT), Jashy <nanjunjie@gmail.com> said:

> 23M failed.

>>>>> On Wed, 28 May 2008 19:21:10 +0200, Angelo Graziosi <angelo.graziosi@alice.it> said:

>> What happens if you replace
>> 
>> (load "term/x-win")
>> 
>> with
>> 
>> (unless (or (equal (nth 3 command-line-args) "bootstrap")
>> (equal (nth 4 command-line-args) "bootstrap"))
>> (load "term/x-win"))
>> 
>> (and likewise for "term/w32-win") in lisp/loadup.el?

> With the above suggestions, the full bootstrap requests at least 24MB.

> The log file of the bootstrap shows that in the first stage it needs 24 MB:

> [...]
> Finding pointers to doc strings...
> Finding pointers to doc strings...done
> Dumping under the name emacs
> Static heap usage: 25097944 of 25165824 bytes             <==
> 71662 pure bytes used
> mv -f emacs.exe bootstrap-emacs.exe
> [...]

Thanks again.  So, even for the case without preloading *-win.el, 24MB
seems to be too tight for the bootstrap stage.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

end of thread, other threads:[~2008-05-29  0:38 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-01 20:32 The bootstrap of Emacs on Cygwin is broken [Is also: unicode branch is merged to trunk] Angelo Graziosi
2008-02-02 18:03 ` Eli Zaretskii
2008-02-02 19:32   ` Angelo Graziosi
2008-02-02 19:43     ` Eli Zaretskii
2008-02-02 21:21       ` Angelo Graziosi
2008-02-03  4:10         ` Eli Zaretskii
2008-02-03  9:19           ` Angelo Graziosi
2008-02-03 19:40             ` Eli Zaretskii
2008-02-03 21:02               ` Angelo Graziosi
2008-02-03 21:02             ` Jason Rumney
2008-02-03 21:14               ` Angelo Graziosi
2008-02-04  4:19                 ` Eli Zaretskii
2008-02-04  8:39                   ` Angelo Graziosi
2008-02-04  9:00                     ` YAMAMOTO Mitsuharu
2008-02-04 10:35                       ` Angelo Graziosi
2008-02-04 11:01                         ` YAMAMOTO Mitsuharu
2008-02-04 11:11                           ` Jason Rumney
2008-02-04 20:55                         ` Eli Zaretskii
2008-02-04 22:07                           ` Angelo Graziosi
2008-02-05  4:17                             ` Eli Zaretskii
2008-02-05  2:10                           ` Angelo Graziosi
2008-02-05  4:17                             ` Eli Zaretskii
2008-02-05 10:12                               ` Angelo Graziosi
2008-02-05 10:19                                 ` Jason Rumney
2008-02-05 10:52                                   ` Angelo Graziosi
2008-02-05 11:10                                     ` Jason Rumney
2008-02-05 12:03                                       ` Angelo Graziosi
2008-02-05 20:17                                 ` Eli Zaretskii
2008-02-05 20:49                                   ` Angelo Graziosi
2008-02-06  4:10                                     ` Eli Zaretskii
2008-02-06 15:27                                       ` Angelo Graziosi
2008-05-28  2:15                                 ` Jashy
2008-05-28  3:06                                   ` Stefan Monnier
2008-05-28  3:21                                   ` YAMAMOTO Mitsuharu
2008-02-05 17:22                               ` Angelo Graziosi
2008-02-04  4:16               ` Eli Zaretskii
2008-02-04  8:58                 ` Jason Rumney
2008-02-02 18:03 ` Dan Nicolaescu
2008-02-02 18:32   ` Eli Zaretskii
2008-05-28  7:42 ` Angelo Graziosi
2008-05-28 10:20   ` Jashy
2008-05-28 10:30     ` YAMAMOTO Mitsuharu
2008-05-28 11:36       ` Jashy
2008-05-28 12:06         ` YAMAMOTO Mitsuharu
2008-05-28 13:16           ` Jashy
2008-05-28 17:21             ` Angelo Graziosi
2008-05-29  0:38               ` YAMAMOTO Mitsuharu

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