Debian Bug report logs - #698330
coreutils: fails to build on arm64

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <mstone@debian.org>; Source for coreutils is src:coreutils.

Reported by: Colin Watson <cjwatson@ubuntu.com>

Date: Thu, 17 Jan 2013 04:33:01 UTC

Severity: normal

Tags: patch

Found in version coreutils/8.20-3

Fixed in version coreutils/8.21-1.2

Done: Wookey <wookey@debian.org>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#698330; Package coreutils. (Thu, 17 Jan 2013 04:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Michael Stone <mstone@debian.org>. (Thu, 17 Jan 2013 04:33:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: submit@bugs.debian.org
Subject: coreutils: fails to build on arm64
Date: Thu, 17 Jan 2013 04:29:21 +0000
Package: coreutils
Version: 8.20-3
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch raring

After fixing #689611 (config.guess/sub update), coreutils still fails to
build on arm64 as follows:

        aarch64-linux-gnu-gcc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -D_FORTIFY_SOURCE=2   -g -O2 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT -MT src/factor.o -MD -MP -MF $depbase.Tpo -c -o src/factor.o src/factor.c &&\
        mv -f $depbase.Tpo $depbase.Po
/tmp/ccaz8Jyv.s: Assembler messages:
/tmp/ccaz8Jyv.s:747: Error: operand 3 should be an integer register -- `adc x11,x2,0'
/tmp/ccaz8Jyv.s:760: Error: operand 3 should be an integer register -- `adc x2,x11,0'
/tmp/ccaz8Jyv.s:798: Error: operand 3 should be an integer register -- `adc x4,x11,0'
/tmp/ccaz8Jyv.s:814: Error: operand 3 should be an integer register -- `adc x8,x10,0'
/tmp/ccaz8Jyv.s:844: Error: operand 3 should be an integer register -- `adc x3,x8,0'
/tmp/ccaz8Jyv.s:857: Error: operand 3 should be an integer register -- `adc x1,x3,0'
/tmp/ccaz8Jyv.s:6193: Error: operand 3 should be an integer register -- `adc x1,x1,0'
/tmp/ccaz8Jyv.s:6299: Error: operand 3 should be an integer register -- `adc x0,x5,0'
/tmp/ccaz8Jyv.s:6457: Error: operand 3 should be an integer register -- `adc x5,x5,0'
make[3]: *** [src/factor.o] Error 1

This has been fixed in gmp upstream; cf.
https://bugs.launchpad.net/linaro-aarch64/+bug/1099558.  The following
patch fixes it.

  * Backport from gmp upstream:
    - (aarch64): Make add_ssaaaa and sub_ddmmss actually work.

diff -u coreutils-8.20/debian/patches/00list coreutils-8.20/debian/patches/00list
--- coreutils-8.20/debian/patches/00list
+++ coreutils-8.20/debian/patches/00list
@@ -7,3 +7,4 @@
 99_kill_df_total-unprocessed_test
 99_hppa_longlong
 99_factor_long_long
+99_arm64_longlong
--- coreutils-8.20.orig/debian/patches/99_arm64_longlong.dpatch
+++ coreutils-8.20/debian/patches/99_arm64_longlong.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99_arm64_longlong.dpatch by Colin Watson <cjwatson@ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: (aarch64): Make add_ssaaaa and sub_ddmmss actually work.
+## DP: Author: Torbjorn Granlund <tege@gmplib.org>
+## DP: Origin: upstream, http://gmplib.org:8000/gmp/rev/187b7b1646ee
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.20~/src/longlong.h coreutils-8.20/src/longlong.h
+--- coreutils-8.20~/src/longlong.h	2013-01-17 04:05:16.000000000 +0000
++++ coreutils-8.20/src/longlong.h	2013-01-17 04:05:46.000000000 +0000
+@@ -530,23 +530,16 @@
+ #endif /* __arm__ */
+ 
+ #if defined (__aarch64__) && W_TYPE_SIZE == 64
++/* FIXME: Extend the immediate range for the low word by using both
++   ADDS and SUBS, since they set carry in the same way.  */
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+-  __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3"			\
++  __asm__ ("adds\t%1, %x4, %5\n\tadc\t%0, %x2, %x3"			\
+ 	   : "=r" (sh), "=&r" (sl)					\
+-	   : "r" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
++	   : "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
+ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+-  do {									\
+-    if (__builtin_constant_p (bl))					\
+-      {									\
+-	__asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3"			\
+-		 : "=r" (sh), "=&r" (sl)				\
+-		 : "r" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
+-      }									\
+-    else /* only bh might be a constant */				\
+-      __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3"			\
+-	       : "=r" (sh), "=&r" (sl)					\
+-	       : "r" (ah), "rZ" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\
+-    } while (0)
++  __asm__ ("subs\t%1, %x4, %5\n\tsbc\t%0, %x2, %x3"			\
++	   : "=r,r" (sh), "=&r,&r" (sl)					\
++	   : "rZ,rZ" (ah), "rZ,rZ" (bh), "r,Z" (al), "rI,r" (bl) __CLOBBER_CC)
+ #define umul_ppmm(ph, pl, m0, m1) \
+   do {									\
+     UDItype __m0 = (m0), __m1 = (m1);					\

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



Reply sent to Wookey <wookey@wookware.org>:
You have taken responsibility. (Sun, 13 Apr 2014 00:18:08 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Sun, 13 Apr 2014 00:18:08 GMT) Full text and rfc822 format available.

Message #10 received at 698330-done@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: 698330-done@bugs.debian.org, 689611-done@bugs.debian.org
Subject: coreutils NMUed for arm64 port
Date: Sun, 13 Apr 2014 01:14:41 +0100
I've prepared a coreutils_8.21-1.2, which fixes the two bugs preventing building for arm64:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689611
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698330

As both of these have been filed for months and are uncontroversial
I've uploaded to delayed/2. Shout if that's a problem.

I note that 689611 was actually fixed already, but only by a static
update of the files. I've put in the dh autotools-dev update so that
they are always upto date in future. This is now recommended for all
packages. Even better would be to use dh-autoreconf to update all the
atofoo files, but there is a small risk of that causing breakage, and
as I'm not familiar with this package, that seemed a step too far.

Anyway, hope this is OK, shout if not.

arm64 status in case you cared: http://buildd.debian-ports.org/status/architecture.php?a=arm64


Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/



Reply sent to Wookey <wookey@debian.org>:
You have taken responsibility. (Tue, 15 Apr 2014 00:06:05 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Tue, 15 Apr 2014 00:06:05 GMT) Full text and rfc822 format available.

Message #15 received at 698330-close@bugs.debian.org (full text, mbox):

From: Wookey <wookey@debian.org>
To: 698330-close@bugs.debian.org
Subject: Bug#698330: fixed in coreutils 8.21-1.2
Date: Tue, 15 Apr 2014 00:03:33 +0000
Source: coreutils
Source-Version: 8.21-1.2

We believe that the bug you reported is fixed in the latest version of
coreutils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 698330@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Wookey <wookey@debian.org> (supplier of updated coreutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 12 Apr 2014 01:51:02 +0000
Source: coreutils
Binary: coreutils mktemp
Architecture: source all amd64
Version: 8.21-1.2
Distribution: unstable
Urgency: low
Maintainer: Michael Stone <mstone@debian.org>
Changed-By: Wookey <wookey@debian.org>
Description: 
 coreutils  - GNU core utilities
 mktemp     - coreutils mktemp transitional package
Closes: 689611 698330
Changes: 
 coreutils (8.21-1.2) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Ensure config.{sub,guess} are up to date for new arches, using
     autotools-dev (Closes: #689611)
   * Add aarch64 assembler in longlong.h (from Colin Watson) (Closes: #698330)
Checksums-Sha1: 
 bc5d308bb8275e219e82daade4abb160fbad02d2 1268 coreutils_8.21-1.2.dsc
 948f0ff5667905e99556a16be07ef2969879fb53 25404 coreutils_8.21-1.2.diff.gz
 cfad4a40d3d54df4147b7762c3bc59c9e58e40d6 17086 mktemp_8.21-1.2_all.deb
 caaab8f7d0a7d34a14dbc515ad619611fc3a098f 2583710 coreutils_8.21-1.2_amd64.deb
Checksums-Sha256: 
 2ee204fe88babf07c701976ff4255b555e4011882311f232146b44491a5b385b 1268 coreutils_8.21-1.2.dsc
 dfb4ee049432f4dbddabb69139827fbdf978b92ccff837c9a53eafe20456fa9c 25404 coreutils_8.21-1.2.diff.gz
 ac1466268f8359d9d099ed4d9b0cc20f8d706061182acf2f99c2609260eefa91 17086 mktemp_8.21-1.2_all.deb
 d6e182355ce5bbb7e1f396806e5e4afa3aaf234301853ffbddc6c45b0e9cb242 2583710 coreutils_8.21-1.2_amd64.deb
Files: 
 1af7409292bedfb4ab6cc2a289227d16 1268 utils required coreutils_8.21-1.2.dsc
 92615bbb521d12e37b7a1313e378a4d1 25404 utils required coreutils_8.21-1.2.diff.gz
 8cbf513593d7f4951411c1ab57818bb6 17086 oldlibs extra mktemp_8.21-1.2_all.deb
 0d55071d3c44451d18aaa9ae9ad1fe1d 2583710 utils required coreutils_8.21-1.2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlNJzgsACgkQIWclcBdP7jXOJQCcC/AlXgD/V+a2F5EZzAiCfXjZ
zFkAn2TFOjXsn5IKRaYCxcwH8QhuW4Ml
=PUwZ
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 02:00:29 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.