Source: emacs23 Version: 23.4+1 Severity: normal Tags: patch User: debian-...@lists.debian.org Usertag: arm64
emacs23 does not build on arm64. The package was lacking support for the arch. The attached patch adds that support, but the build still fails. It hangs apparently forever (left for several hours at 100% cpu) at this point (log shows eventual interrupt): Compiling /home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp/cedet/srecode/mode.el Parsing *srecode-map-tmp* (LALR)... Parsing *srecode-map-tmp* (LALR)...done Makefile:1497: recipe for target '/home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp/cedet/srecode/mode.elc' failed make[3]: *** [/home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp/cedet/srecode/mode.elc] Interrupt Makefile:320: recipe for target 'lisp' failed make[2]: *** [lisp] Interrupt top shows that commands running were: /usr/bin/make all -w CC=gcc CFLAGS=-g -O2 -Wformat -Werror=format-security -Wall -DDEBIAN -O2 CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro -g MAKE=/usr/bin/make - /bin/sh -c EMACSLOADPATH=/home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp LC_ALL=C ../src/emacs -batch --no-site-file --multibyte -f batch-byte-compile /home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp/cedet/srecode/mode.el - ../src/emacs -batch --no-site-file --multibyte -f batch-byte-compile /home/buildd/packages/modified/emacs23-23.4+1/debian/build-x/lisp/cedet/srecode/mode.el There may be something wrong with src/m/aarch64.h which is causing this problem, but it's not obvious what. emacs24 builds OK, but seems to have removed this special per-arch config. I'm filing this bug in case the maintainers have any clue what the issue might be and so that those of us working on the port can compare notes. Hopefully someone can improve on this patch. emacs23 is important because 'emacs' depends on it, and thus various packages are uninstallable, and this is causing a lot of builds to fail. If 'emacs' were to move on to emacs24 the FTBFS would become much less significant. Ubuntu and fedora have already moved over. Is there any reason why we should not do so? The full build log is at: http://wookware.org/files/emacs23-23.4+1_arm64-2014-06-17 -- System Information: Debian Release: unstable APT prefers unstable Architecture: arm64 (aarch64) Kernel: Linux 3.12.0-mustang_sw_1.11.09-beta (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash -- no debconf information
diff -Nru emacs23-23.4+1/debian/changelog emacs23-23.4+1/debian/changelog --- emacs23-23.4+1/debian/changelog 2013-06-25 22:19:24.000000000 +0000 +++ emacs23-23.4+1/debian/changelog 2014-06-18 11:08:04.000000000 +0000 @@ -1,3 +1,10 @@ +emacs23 (23.4+1-4.2) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Add arm64 support + + -- Wookey <woo...@debian.org> Wed, 18 Jun 2014 11:07:32 +0000 + emacs23 (23.4+1-4.1) unstable; urgency=low * Non-maintainer upload. diff -Nru emacs23-23.4+1/debian/control emacs23-23.4+1/debian/control --- emacs23-23.4+1/debian/control 2013-06-25 22:19:29.000000000 +0000 +++ emacs23-23.4+1/debian/control 2014-06-18 20:31:57.000000000 +0000 @@ -6,7 +6,7 @@ libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng-dev, libjpeg-dev, libm17n-dev, libotf-dev, libgpm-dev [linux-any], libdbus-1-dev, - autoconf, automake, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42), + autoconf, automake, autotools-dev, dh-autoreconf, dpkg-dev (>> 1.10.0), quilt (>= 0.42), debhelper (>= 7.0.50~), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libgconf2-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] Homepage: http://www.gnu.org/software/emacs/ diff -Nru emacs23-23.4+1/debian/patches/0019-Add-arm64-support.patch emacs23-23.4+1/debian/patches/0019-Add-arm64-support.patch --- emacs23-23.4+1/debian/patches/0019-Add-arm64-support.patch 1970-01-01 00:00:00.000000000 +0000 +++ emacs23-23.4+1/debian/patches/0019-Add-arm64-support.patch 2014-06-17 17:34:37.000000000 +0000 @@ -0,0 +1,68 @@ +Index: emacs23-23.4+1/configure.in +=================================================================== +--- emacs23-23.4+1.orig/configure.in ++++ emacs23-23.4+1/configure.in +@@ -457,6 +457,10 @@ dnl see the `changequote' comment above. + esac + ;; + ++ aarch64*-*-linux-gnu* ) ++ machine=aarch64 opsys=gnu-linux ++ ;; ++ + alpha*-*-linux-gnu* ) + machine=alpha opsys=gnu-linux + ;; +Index: emacs23-23.4+1/src/m/aarch64.h +=================================================================== +--- /dev/null ++++ emacs23-23.4+1/src/m/aarch64.h +@@ -0,0 +1,48 @@ ++/* Machine description file for ARMv8/arm64/aarch64 machines. ++ Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, ++ 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. ++ ++This file is part of GNU Emacs. ++ ++GNU Emacs is free software: you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation, either version 3 of the License, or ++(at your option) any later version. ++ ++GNU Emacs is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ++ ++ ++ ++#define BITS_PER_LONG 64 ++#define BITS_PER_EMACS_INT 64 ++ ++/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word ++ is the most significant byte. */ ++ ++#undef WORDS_BIG_ENDIAN ++ ++/* Define NO_ARG_ARRAY if you cannot take the address of the first of a ++ * group of arguments and treat it as an array of the arguments. */ ++ ++#define NO_ARG_ARRAY ++ ++/* __aarch64__ defined automatically. */ ++ ++/* Define the type to use. */ ++#define EMACS_INT long ++#define EMACS_UINT unsigned long ++ ++/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend ++ the 24-bit bit field into an int. In other words, if bit fields ++ are always unsigned. ++ ++ This flag only matters if you use USE_LISP_UNION_TYPE. */ ++ ++#define EXPLICIT_SIGN_EXTEND ++ diff -Nru emacs23-23.4+1/debian/patches/series emacs23-23.4+1/debian/patches/series --- emacs23-23.4+1/debian/patches/series 2012-09-08 19:58:21.000000000 +0000 +++ emacs23-23.4+1/debian/patches/series 2014-06-18 16:04:50.000000000 +0000 @@ -16,3 +16,4 @@ 0016-quail-indian.el-indian-tlg-base-table-Fix-typo-dev-t.patch 0017-Initialize-xgselect-in-function-xg_select-when-gfds_.patch 0018-Don-t-eval-code-when-enable-local-variables-is-safe.patch +0019-Add-arm64-support.patch diff -Nru emacs23-23.4+1/debian/rules emacs23-23.4+1/debian/rules --- emacs23-23.4+1/debian/rules 2013-06-25 21:58:14.000000000 +0000 +++ emacs23-23.4+1/debian/rules 2014-06-18 20:26:25.000000000 +0000 @@ -308,7 +308,7 @@ endef %: - dh $@ --parallel + dh $@ --parallel --autoreconf check-vars: @echo "src_name: $(src_name)"