[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacs24 got freeze exception, what happens to emacs add-ons?



Rob Browning <rlb@defaultvalue.org> writes:

> In any case, the fix is trivial, and I'll upload a -3 shortly that
> includes it.  After that, I'll foward a diff between -1 and -3 to
> debian-release, and then you can decide what you'd like to do.

I suppose it's probably time to consider whether or not emacs24 should
be included in wheezy.

I uploaded the last FTBS fix yesterday, and following 24.4+1-1, there
have been three changes:

  * Restrict libselinux1-dev build dependency to [linux-any] (#679679).
  * Don't check errno after fabs() -- fixes i386 builds. (upstream patch).
  * Use -O1 on ia64 (fix FTBS) -- this is a reversion to the emacs23 behavior.

Here are the significant bits:

--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: bsd-mailx | mailx, libncurses5-dev, texinfo, liblockfile-dev, lib
  libgpm-dev [linux-any], libdbus-1-dev,
  autoconf, automake, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42),
  debhelper (>= 7.0.50~), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev,
- libgnutls-dev, libxml2-dev, libselinux1-dev, libmagick++-dev,
+ libgnutls-dev, libxml2-dev, libselinux1-dev [linux-any], libmagick++-dev,
  libgconf2-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
 Homepage: http://www.gnu.org/software/emacs/
 Standards-Version: 3.7.2
--- a/debian/rules
+++ b/debian/rules
@@ -105,10 +105,12 @@ CFLAGS += -Wall
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
-LDFLAGS   += -g
-
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-  CFLAGS += -O2
+  ifneq (,$(filter $(DEB_HOST_ARCH),ia64))
+    # Fix a problem with newer versions of gcc on ia64.
+    # See bugs #582439 and #679986.
+    CFLAGS += -O1
+  endif # eq ia64
 endif
 
 joblimit := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
+	Unlike the other wrapped functions, fabs has an unspecified
+	effect on errno.
+
 2012-06-01  Chong Yidong  <cyd@gnu.org>
 
 	* Version 24.1 released.
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -676,7 +676,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
   CHECK_NUMBER_OR_FLOAT (arg);
 
   if (FLOATP (arg))
-    IN_FLOAT (arg = make_float (fabs (XFLOAT_DATA (arg))), "abs", arg);
+    arg = make_float (fabs (XFLOAT_DATA (arg)));
   else if (XINT (arg) < 0)
     XSETINT (arg, - XINT (arg));
 
and here's the full debdiff:

diff -Nru emacs24-24.1+1/debian/.git-dpm emacs24-24.1+1/debian/.git-dpm
--- emacs24-24.1+1/debian/.git-dpm	2012-06-27 21:41:01.000000000 -0500
+++ emacs24-24.1+1/debian/.git-dpm	2012-07-17 19:23:17.000000000 -0500
@@ -1,6 +1,6 @@
 # see git-dpm(1) from git-dpm package
-c29cccb1d825523faf484808a699959766d71348
-c29cccb1d825523faf484808a699959766d71348
+6ac9d5dbfded9610d8208378a3be49b1ccd8fe9a
+6ac9d5dbfded9610d8208378a3be49b1ccd8fe9a
 dccb7aff653035782f95e87102338cabcd318122
 dccb7aff653035782f95e87102338cabcd318122
 emacs24_24.1+1.orig.tar.bz2
diff -Nru emacs24-24.1+1/debian/changelog emacs24-24.1+1/debian/changelog
--- emacs24-24.1+1/debian/changelog	2012-06-29 16:16:58.000000000 -0500
+++ emacs24-24.1+1/debian/changelog	2012-07-20 12:51:38.000000000 -0500
@@ -1,3 +1,27 @@
+emacs24 (24.1+1-4) unstable; urgency=low
+
+  * Fix FTBS on ia64 with -O1.  Remove redundant LDFLAGS+=-g and
+    CFLAGS+=-O2.  See also: #582439. (Closes: #679986)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Fri, 20 Jul 2012 12:51:32 -0500
+
+emacs24 (24.1+1-3) unstable; urgency=low
+
+  * Add 0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch.
+    Fix FTBS on i386 by adding an upstream patch to skip fabs() errno
+    checking.  Since fabs() has no error conditions, it doesn't guarantee
+    that it won't clobber errno.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 17 Jul 2012 19:25:59 -0500
+
+emacs24 (24.1+1-2) unstable; urgency=low
+
+  * Restrict libselinux1-dev build dependency to [linux-any].
+    Thanks to James McCoy <jamessan@debian.org> for the report.
+    (Closes: #679679)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 04 Jul 2012 19:16:00 -0500
+
 emacs24 (24.1+1-1) unstable; urgency=low
 
   * Upgrade to upstream version 24.1.
diff -Nru emacs24-24.1+1/debian/control emacs24-24.1+1/debian/control
--- emacs24-24.1+1/debian/control	2012-06-29 16:18:17.000000000 -0500
+++ emacs24-24.1+1/debian/control	2012-07-20 12:53:48.000000000 -0500
@@ -8,7 +8,7 @@
  libgpm-dev [linux-any], libdbus-1-dev,
  autoconf, automake, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42),
  debhelper (>= 7.0.50~), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev,
- libgnutls-dev, libxml2-dev, libselinux1-dev, libmagick++-dev,
+ libgnutls-dev, libxml2-dev, libselinux1-dev [linux-any], libmagick++-dev,
  libgconf2-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
 Homepage: http://www.gnu.org/software/emacs/
 Standards-Version: 3.7.2
diff -Nru emacs24-24.1+1/debian/control.in emacs24-24.1+1/debian/control.in
--- emacs24-24.1+1/debian/control.in	2012-06-27 21:41:01.000000000 -0500
+++ emacs24-24.1+1/debian/control.in	2012-07-17 19:23:16.000000000 -0500
@@ -8,7 +8,7 @@
  libgpm-dev [linux-any], libdbus-1-dev,
  autoconf, automake, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42),
  debhelper (>= 7.0.50~), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev,
- libgnutls-dev, libxml2-dev, libselinux1-dev, libmagick++-dev,
+ libgnutls-dev, libxml2-dev, libselinux1-dev [linux-any], libmagick++-dev,
  libgconf2-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
 Homepage: http://www.gnu.org/software/emacs/
 Standards-Version: 3.7.2
diff -Nru emacs24-24.1+1/debian/patches/0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch emacs24-24.1+1/debian/patches/0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch
--- emacs24-24.1+1/debian/patches/0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch	1969-12-31 18:00:00.000000000 -0600
+++ emacs24-24.1+1/debian/patches/0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch	2012-07-17 19:23:17.000000000 -0500
@@ -0,0 +1,47 @@
+From 6ac9d5dbfded9610d8208378a3be49b1ccd8fe9a Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 16 Jul 2012 19:56:00 -0700
+Subject: Don't use IN_FLOAT() when calling fabs() since it may clobber errno.
+
+The emacs build shouldn't fail sometimes with an "Arithmetic error:".
+
+Previously Emacs assumed that fabs() would not modify errno
+unless there was an error, but that isn't guaranteed since fabs()
+has no error conditions.
+
+Origin: upstream, commit: 8e0e7a92f5ae99ce2461fc0f0b606d4cec3efb81
+Added-by: Rob Browning <rlb@defaultvalue.org>
+Provided-By: Paul Eggert  <eggert@cs.ucla.edu>
+Bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11913
+---
+ src/ChangeLog  |    6 ++++++
+ src/floatfns.c |    2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/ChangeLog b/src/ChangeLog
+index 98c4124..32631e7 100644
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1,3 +1,9 @@
++2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>
++
++	* floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
++	Unlike the other wrapped functions, fabs has an unspecified
++	effect on errno.
++
+ 2012-06-01  Chong Yidong  <cyd@gnu.org>
+ 
+ 	* Version 24.1 released.
+diff --git a/src/floatfns.c b/src/floatfns.c
+index 305c78c..fa672c7 100644
+--- a/src/floatfns.c
++++ b/src/floatfns.c
+@@ -676,7 +676,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
+   CHECK_NUMBER_OR_FLOAT (arg);
+ 
+   if (FLOATP (arg))
+-    IN_FLOAT (arg = make_float (fabs (XFLOAT_DATA (arg))), "abs", arg);
++    arg = make_float (fabs (XFLOAT_DATA (arg)));
+   else if (XINT (arg) < 0)
+     XSETINT (arg, - XINT (arg));
+ 
diff -Nru emacs24-24.1+1/debian/patches/series emacs24-24.1+1/debian/patches/series
--- emacs24-24.1+1/debian/patches/series	2012-06-27 21:41:01.000000000 -0500
+++ emacs24-24.1+1/debian/patches/series	2012-07-17 19:23:17.000000000 -0500
@@ -8,3 +8,4 @@
 0008-Fix-startup-hang-on-Debian-GNU-kFreeBSD.patch
 0009-Restore-doc-emacs-emacsver.texi.patch
 0010-Rename-infodir-to-buildinfodir-in-doc-Makefile.in-GN.patch
+0011-Don-t-use-IN_FLOAT-when-calling-fabs-since-it-may-cl.patch
diff -Nru emacs24-24.1+1/debian/rules emacs24-24.1+1/debian/rules
--- emacs24-24.1+1/debian/rules	2012-06-29 16:15:15.000000000 -0500
+++ emacs24-24.1+1/debian/rules	2012-07-20 12:49:20.000000000 -0500
@@ -105,10 +105,12 @@
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
-LDFLAGS   += -g
-
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-  CFLAGS += -O2
+  ifneq (,$(filter $(DEB_HOST_ARCH),ia64))
+    # Fix a problem with newer versions of gcc on ia64.
+    # See bugs #582439 and #679986.
+    CFLAGS += -O1
+  endif # eq ia64
 endif
 
 joblimit := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply to: