GNU bug report logs -
#6039
Building Emacs BZR with GCC 4.5.0
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6039 in the body.
You can then email your comments to 6039 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
emacs
.
(Mon, 26 Apr 2010 14:54:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vladimir Lomov <lomov.vl <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 26 Apr 2010 14:54:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
emacs
.
(Mon, 26 Apr 2010 15:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6039 <at> debbugs.gnu.org (full text, mbox):
Vladimir Lomov <lomov.vl <at> 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.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
emacs
.
(Tue, 27 Apr 2010 03:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6039 <at> debbugs.gnu.org (full text, mbox):
** Chong Yidong [2010-04-26 11:03:19 -0400]:
> Vladimir Lomov <lomov.vl <at> 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 <at> redhat.com>
and Alexandre Duret-Lutz <adl <at> 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.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
emacs
.
(Tue, 27 Apr 2010 04:39:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 6039 <at> debbugs.gnu.org (full text, mbox):
** Chong Yidong [2010-04-26 11:03:19 -0400]:
> Vladimir Lomov <lomov.vl <at> 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.
Merged 6031 6039.
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Tue, 27 Apr 2010 15:38:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
emacs
.
(Tue, 27 Apr 2010 15:39:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 6039 <at> debbugs.gnu.org (full text, mbox):
Vladimir Lomov <lomov.vl <at> 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.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
notemacs
.
(Wed, 28 Apr 2010 03:07:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 6039 <at> debbugs.gnu.org (full text, mbox):
** Chong Yidong [2010-04-27 11:38:18 -0400]:
> Vladimir Lomov <lomov.vl <at> 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.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6039
; Package
notemacs
.
(Mon, 10 May 2010 03:42:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 6039 <at> debbugs.gnu.org (full text, mbox):
Hi.
Sorry for later response.
2010/5/3 Chong Yidong <cyd <at> stupidchicken.com>:
> Elias Pipping <pipping.elias <at> googlemail.com> writes:
>
>> Could you make the check and the error message a bit more precise? For
>> example, CFLAGS="-O2 -fno-optimize-sibling-calls" should get through
>> (CFLAGS="-O1 -foptimize-sibling-calls" should not, but that can
>> probably be ignored). It'd also be nice if either the error message or
>> the comments in configure.in referred to this bug.
>
> Sure. Could you test this updated patch?
>
>
> *** configure.in 2010-04-20 01:29:37 +0000
> --- configure.in 2010-05-02 23:38:03 +0000
> ***************
> *** 2600,2605 ****
> --- 2600,2613 ----
> CFLAGS="$REAL_CFLAGS"
> CPPFLAGS="$REAL_CPPFLAGS"
>
> + ## Hack to detect a buggy GCC version.
> + if test "x$GCC" = xyes \
> + && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
> + && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
> + && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
> + AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
> + fi
> +
> #### Find out which version of Emacs this is.
> [version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
> | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`]
>
> *** configure 2010-04-20 01:29:37 +0000
> --- configure 2010-05-02 23:38:37 +0000
> ***************
> *** 25559,25564 ****
> --- 25559,25574 ----
> CFLAGS="$REAL_CFLAGS"
> CPPFLAGS="$REAL_CPPFLAGS"
>
> + ## Hack to detect a buggy GCC version.
> + if test "x$GCC" = xyes \
> + && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
> + && test x"`echo $CFLAGS | grep '\-O23'`" != x \
> + && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
> + { { $as_echo "$as_me:$LINENO: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&5
> + $as_echo "$as_me: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&2;}
> + { (exit 1); exit 1; }; }
> + fi
> +
> #### Find out which version of Emacs this is.
> version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
> | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
>
Why you check versus O3 option? I checked that with O3 option GCC
4.5.0 compiles emacs (BZR) fine and it works.
Could you please remove this check (actually I rather ask GCC
developers to release a bug fix but they have they own schedule).
P.S. I make custom builds for my Archlinux system (x86_64). Now I use
a patch to remove O3 check so this just a wish.
---
WBR, Vladimir Lomov
bug closed, send any further explanations to Elias Pipping <pipping.elias <at> googlemail.com>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 21 May 2010 07:08:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Jun 2010 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.