unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6039: Building Emacs BZR with GCC 4.5.0
@ 2010-04-26 14:33 Vladimir Lomov
  2010-04-26 15:03 ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Lomov @ 2010-04-26 14:33 UTC (permalink / raw)
  To: 6039

Hi.

(Some response to #6031, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031)

I'm trying to compile Emacs from BZR using gcc 4.5.0
$ bzr revno
100035

Compilation went ok but when I try to run Emacs it segfault'ed.

Here what I see running compiled Emacs in gdb:
=========================================================================================
$ gdb ./emacs
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/USER/tmp/src/emacs-bzr/src/emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not
from terminal]
DISPLAY = :0.0
TERM = xterm
Breakpoint 1 at 0x4e7510: file emacs.c, line 430.
Temporary breakpoint 2 at 0x504090: file sysdep.c, line 1118.
(gdb) run -Q -D
Starting program: /home/USER/tmp/src/emacs-bzr/src/emacs -Q -D
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
fill_stretch_glyph_string (s=<value optimized out>, start=<value
optimized out>, end=<value optimized out>, s=<value optimized out>,
    start=<value optimized out>, end=<value optimized out>) at xdisp.c:20842
20842	  s->font = s->face->font;
(gdb) bt
#0  fill_stretch_glyph_string (s=<value optimized out>, start=<value
optimized out>, end=<value optimized out>, s=<value optimized out>,
    start=<value optimized out>, end=<value optimized out>) at xdisp.c:20842
#1  0x0000000000445d44 in draw_glyphs (w=0xfb98e0, x=10, row=<value
optimized out>, area=TEXT_AREA, start=0, end=1, hl=DRAW_CURSOR,
    overlaps=0) at xdisp.c:21384
#2  0x000000000044b330 in draw_phys_cursor_glyph (w=0xfb98e0,
row=0x128f550, hl=DRAW_CURSOR) at xdisp.c:23566
#3  0x00000000004a51a0 in x_draw_window_cursor (w=0xfb98e0,
glyph_row=0x128f550, x=0, y=60, cursor_type=<value optimized out>,
    cursor_width=<value optimized out>, on_p=1, active_p=1) at xterm.c:7514
#4  0x000000000044ba63 in display_and_set_cursor (w=0xfb98e0, on=1,
hpos=<value optimized out>, vpos=<value optimized out>, x=0, y=60)
    at xdisp.c:23790
#5  0x00000000004a6d04 in x_update_window_end (w=0xfb98e0,
cursor_on_p=<value optimized out>, mouse_face_overwritten_p=0) at
xterm.c:650
#6  0x0000000000416992 in update_window (w=<value optimized out>,
force_p=<value optimized out>) at dispnew.c:3984
#7  0x0000000000417d43 in update_window_tree (w=0xfb98e0, force_p=0)
at dispnew.c:3613
#8  0x000000000041b573 in update_frame (f=0xfb8c80, force_p=0,
inhibit_hairy_id_p=0) at dispnew.c:3540
#9  0x000000000043f51c in redisplay_internal
(preserve_echo_area=<value optimized out>) at xdisp.c:12243
#10 0x00000000004f5382 in read_char (commandflag=1, nmaps=2,
maps=0x7fffffffd430, prev_event=12421458,
used_mouse_menu=0x7fffffffd53c,
    end_time=0x0) at keyboard.c:2576
#11 0x00000000004f790c in read_key_sequence (keybuf=<value optimized
out>, prompt=12421458, dont_downcase_last=0,
    can_return_switch_frame=1, fix_current_buffer=1, bufsize=30) at
keyboard.c:9402
#12 0x00000000004f9759 in command_loop_1 () at keyboard.c:1636
#13 0x000000000055d00f in internal_condition_case (bfun=0x4f9590
<command_loop_1>, handlers=12473314, hfun=0x4ecc70 <cmd_error>)
    at eval.c:1512
#14 0x00000000004ec2fe in command_loop_2 () at keyboard.c:1356
#15 0x000000000055ceea in internal_catch (tag=12469394, func=0x4ec2e0
<command_loop_2>, arg=12421458) at eval.c:1248
#16 0x00000000004ece71 in command_loop () at keyboard.c:1335
#17 0x00000000004ecf0a in recursive_edit_1 () at keyboard.c:950
#18 0x00000000004ed047 in Frecursive_edit () at keyboard.c:1012
#19 0x00000000004e8da7 in main (argc=<value optimized out>,
argv=<value optimized out>) at emacs.c:1784
(gdb) quit
=========================================================================================


The same happens with emacs-23.1.96 (taken from
ftp://alpha.gnu.org/gnu/emacs/pretest/):
=========================================================================================
$ gdb ./emacs
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/USER/tmp/emacs-23.1.96/src/emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not
from terminal]
DISPLAY = :0.0
TERM = xterm
Breakpoint 1 at 0x4e1480: file emacs.c, line 430.
Temporary breakpoint 2 at 0x4fe790: file sysdep.c, line 1129.
(gdb) run -Q -D
Starting program: /home/USER/tmp/emacs-23.1.96/src/emacs -Q -D
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
fill_stretch_glyph_string (s=<value optimized out>, start=<value
optimized out>, end=<value optimized out>, s=<value optimized out>,
    start=<value optimized out>, end=<value optimized out>) at xdisp.c:19755
19755	  s->font = s->face->font;
(gdb) bt
#0  fill_stretch_glyph_string (s=<value optimized out>, start=<value
optimized out>, end=<value optimized out>, s=<value optimized out>,
    start=<value optimized out>, end=<value optimized out>) at xdisp.c:19755
#1  0x0000000000443f84 in draw_glyphs (w=0x1165820, x=10, row=<value
optimized out>, area=TEXT_AREA, start=0, end=1, hl=DRAW_CURSOR,
    overlaps=0) at xdisp.c:20297
#2  0x000000000044952c in draw_phys_cursor_glyph (w=0x1165820,
row=0x11fd1b0, hl=DRAW_CURSOR) at xdisp.c:22406
#3  0x000000000049ff10 in x_draw_window_cursor (w=0x1165820,
glyph_row=0x11fd1b0, x=0, y=60, cursor_type=<value optimized out>,
    cursor_width=<value optimized out>, on_p=1, active_p=1) at xterm.c:7510
#4  0x0000000000449c6b in display_and_set_cursor (w=0x1165820, on=1,
hpos=<value optimized out>, vpos=<value optimized out>, x=0, y=60)
    at xdisp.c:22628
#5  0x00000000004a1a54 in x_update_window_end (w=0x1165820,
cursor_on_p=<value optimized out>, mouse_face_overwritten_p=0) at
xterm.c:652
#6  0x000000000041680d in update_window (w=<value optimized out>,
force_p=<value optimized out>) at dispnew.c:4375
#7  0x0000000000417bb3 in update_window_tree (w=0x1165820, force_p=0)
at dispnew.c:4004
#8  0x000000000041c068 in update_frame (f=0x11655d0, force_p=0,
inhibit_hairy_id_p=0) at dispnew.c:3931
#9  0x000000000043d8dc in redisplay_internal
(preserve_echo_area=<value optimized out>) at xdisp.c:11826
#10 0x00000000004ef892 in read_char (commandflag=1, nmaps=2,
maps=0x7fffffffd450, prev_event=11659666,
used_mouse_menu=0x7fffffffd55c,
    end_time=0x0) at keyboard.c:2727
#11 0x00000000004f1e1c in read_key_sequence (keybuf=<value optimized
out>, prompt=11659666, dont_downcase_last=0,
    can_return_switch_frame=1, fix_current_buffer=1, bufsize=30) at
keyboard.c:9512
#12 0x00000000004f3c71 in command_loop_1 () at keyboard.c:1643
#13 0x000000000055717f in internal_condition_case (bfun=0x4f3aa0
<command_loop_1>, handlers=11726930, hfun=0x4e7450 <cmd_error>)
    at eval.c:1490
#14 0x00000000004e629e in command_loop_2 () at keyboard.c:1360
#15 0x000000000055705a in internal_catch (tag=11719746, func=0x4e6280
<command_loop_2>, arg=11659666) at eval.c:1226
#16 0x00000000004e7651 in command_loop () at keyboard.c:1339
#17 0x00000000004e76ea in recursive_edit_1 () at keyboard.c:954
#18 0x00000000004e7827 in Frecursive_edit () at keyboard.c:1016
#19 0x00000000004e2d27 in main (argc=<value optimized out>,
argv=<value optimized out>) at emacs.c:1833
(gdb) quit
=========================================================================================

In both cases configure script was run with options:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--mandir=$HOME/tmp/emacs --libexecdir=/usr/lib --with-xpm --with-jpeg
--with-tiff --with-gif --with-png --with-rsvg --with-x-toolkit=gtk
--with-xft --with-libotf --with-dbus --without-sound
--enable-maintainer-mode

OS: Archlinux x86_64
GCC: 4.5.0

I also tried to compile Emacs (BZR) with gcc 4.4.3 ( the same distro
but a bit outdated). After compilation I managed to run Emacs
(terminal session).

Seems that with gcc 4.4
(http://bugs.gentoo.org/show_bug.cgi?id=317187) Emacs could be
compiled and run without errors.

---
WBR, Vladimir Lomov







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

* bug#6039: Building Emacs BZR with GCC 4.5.0
  2010-04-26 14:33 bug#6039: Building Emacs BZR with GCC 4.5.0 Vladimir Lomov
@ 2010-04-26 15:03 ` Chong Yidong
  2010-04-27  3:01   ` Vladimir Lomov
  2010-04-27  4:38   ` Vladimir Lomov
  0 siblings, 2 replies; 6+ messages in thread
From: Chong Yidong @ 2010-04-26 15:03 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 6039

Vladimir Lomov <lomov.vl@gmail.com> writes:

> Hi.
>
> (Some response to #6031, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031)
>
> I'm trying to compile Emacs from BZR using gcc 4.5.0
> $ bzr revno
> 100035
>
> Compilation went ok but when I try to run Emacs it segfault'ed.

Could you see if the problem also exists on the emacs-23 branch?
Thanks.






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

* bug#6039: Building Emacs BZR with GCC 4.5.0
  2010-04-26 15:03 ` Chong Yidong
@ 2010-04-27  3:01   ` Vladimir Lomov
  2010-04-27  4:38   ` Vladimir Lomov
  1 sibling, 0 replies; 6+ messages in thread
From: Vladimir Lomov @ 2010-04-27  3:01 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 6039

** Chong Yidong [2010-04-26 11:03:19 -0400]:

> Vladimir Lomov <lomov.vl@gmail.com> writes:

>> Hi.

>> (Some response to #6031, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031)

>> I'm trying to compile Emacs from BZR using gcc 4.5.0
>> $ bzr revno
>> 100035

>> Compilation went ok but when I try to run Emacs it segfault'ed.

> Could you see if the problem also exists on the emacs-23 branch?
> Thanks.

Sorry, I can't.

I took sources from gnu.org:
emacs-23.1.tar.gz
emacs-22.3.tar.gz
and configured them with the same options as for emacs BZR. But make
fails:
================== emacs-23.1 ======================
cd lib-src; make all                            \
	  CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE  ' \
	  LDFLAGS='-Wl,-znocombreloc ' MAKE='make'
make[1]: Entering directory `/home/USER/tmp/emacs-23.1/lib-src'
Makefile:144: *** commands commence before first target.  Stop.
make[1]: Leaving directory `/home/USER/tmp/emacs-23.1/lib-src'
make: *** [lib-src] Error 2
====================================================

================== emacs-22.3 ======================
cd lib-src; make all  \
	  CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE  ' \
	  LDFLAGS='-Wl,-znocombreloc ' MAKE='make'
make[1]: Entering directory `/home/USER/tmp/emacs-22.3/lib-src'
Makefile:148: *** commands commence before first target.  Stop.
make[1]: Leaving directory `/home/USER/tmp/emacs-22.3/lib-src'
make: *** [lib-src] Error 2
====================================================

Lines 143-144 in lib-src/Makefile:
================== emacs-23.1 ======================
ALL_CFLAGS = -D_BSD_SOURCE -DHAVE_CONFIG_H
	  -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
====================================================

Lines 147-148 in lib-src/Makefile:
================== emacs-22.3 ======================
ALL_CFLAGS = -D_BSD_SOURCE -DHAVE_CONFIG_H
	  -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
====================================================

I use
$ autoconf --version
autoconf (GNU Autoconf) 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

$ automake --version
automake (GNU automake) 1.11.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.

As I already mentioned I could compile emacs with gcc 4.4.3 (my another
machine with the same distro).

P.S.
My previous successful compilation of Emacs BZR was on Sat
2010-04-24, (bzr revno 100014). After that I updated my system and any
further compilation (I tried 100014, 100013, EMACS_23_1_BASE) Emacs was
successful but all them are segfault'ed (this happened on my home machine).
Compilation with ''without-x' option passed to configure didn't help.

-- 
Try to get all of your posthumous medals in advance.






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

* bug#6039: Building Emacs BZR with GCC 4.5.0
  2010-04-26 15:03 ` Chong Yidong
  2010-04-27  3:01   ` Vladimir Lomov
@ 2010-04-27  4:38   ` Vladimir Lomov
  2010-04-27 15:38     ` Chong Yidong
  1 sibling, 1 reply; 6+ messages in thread
From: Vladimir Lomov @ 2010-04-27  4:38 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 6039

** Chong Yidong [2010-04-26 11:03:19 -0400]:

> Vladimir Lomov <lomov.vl@gmail.com> writes:

>> Hi.

>> (Some response to #6031, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031)

>> I'm trying to compile Emacs from BZR using gcc 4.5.0
>> $ bzr revno
>> 100035

>> Compilation went ok but when I try to run Emacs it segfault'ed.

> Could you see if the problem also exists on the emacs-23 branch?
> Thanks.

Seems that if I pass option '-fno-optimize-sibling-calls' to configure
(CFLAGS="-O2 -fno-optimize-sibling-calls")
then compiled emacs works
(I run it under gdb with options '-Q -D' and without any options
without segfault) but I don't know how this option affects the emacs.

-- 
Interchangeable parts won't.






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

* bug#6039: Building Emacs BZR with GCC 4.5.0
  2010-04-27  4:38   ` Vladimir Lomov
@ 2010-04-27 15:38     ` Chong Yidong
  2010-04-28  3:07       ` Vladimir Lomov
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2010-04-27 15:38 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: 6039

Vladimir Lomov <lomov.vl@gmail.com> writes:

> Seems that if I pass option '-fno-optimize-sibling-calls' to configure
> (CFLAGS="-O2 -fno-optimize-sibling-calls")
> then compiled emacs works
> (I run it under gdb with options '-Q -D' and without any options
> without segfault) but I don't know how this option affects the emacs.

Yep, see

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031

It's a GCC bug.






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

* bug#6039: Building Emacs BZR with GCC 4.5.0
  2010-04-27 15:38     ` Chong Yidong
@ 2010-04-28  3:07       ` Vladimir Lomov
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Lomov @ 2010-04-28  3:07 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 6039

** Chong Yidong [2010-04-27 11:38:18 -0400]:

> Vladimir Lomov <lomov.vl@gmail.com> writes:

>> Seems that if I pass option '-fno-optimize-sibling-calls' to configure
>> (CFLAGS="-O2 -fno-optimize-sibling-calls")
>> then compiled emacs works
>> (I run it under gdb with options '-Q -D' and without any options
>> without segfault) but I don't know how this option affects the emacs.

> Yep, see

>   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031

> It's a GCC bug.
It is nice :).

Actually I found more puzzling thing. If I run configure with the same
options as I described earlier but define CFLAGS variable like this
CFLAGS="-O3"
compile emacs source and run emacs within gdb:
(gdb) run -Q -D
or 
(gdb) run
it don't segfault.
(bzr revno && bzr revno --tree: 100061)

May be there are some tests to check compiled executable?

-- 
A guy has to get fresh once in a while so a girl doesn't lose her confidence.






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

end of thread, other threads:[~2010-04-28  3:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-26 14:33 bug#6039: Building Emacs BZR with GCC 4.5.0 Vladimir Lomov
2010-04-26 15:03 ` Chong Yidong
2010-04-27  3:01   ` Vladimir Lomov
2010-04-27  4:38   ` Vladimir Lomov
2010-04-27 15:38     ` Chong Yidong
2010-04-28  3:07       ` Vladimir Lomov

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