From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Gmp test failure on armhf Date: Fri, 3 Jul 2015 22:12:07 +0200 Message-ID: <20150703201207.GB26201@debian> References: <20150626093215.GA3593@debian> <87d20fsh2z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="FCuugMFkClbJLl1L" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB7Jn-0001iU-OD for guix-devel@gnu.org; Fri, 03 Jul 2015 16:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB7Ji-0001eN-Aq for guix-devel@gnu.org; Fri, 03 Jul 2015 16:12:15 -0400 Content-Disposition: inline In-Reply-To: <87d20fsh2z.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel@gnu.org --FCuugMFkClbJLl1L Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Jun 28, 2015 at 10:39:32PM +0200, Ludovic Courtès wrote: > Could you post the relevant excerpt of the build log, or > ‘test-suite.log’? Well, I tried to build it by hand, and it worked; then I tried again with a recent git version, and it also worked. Since I noticed a "FIXME" in the gmp package, I worked on that. The attached patch backports a fix to config.guess in the gmp trunk that correctly detects the neon architecture on multicore arm machines, instead of explicitly passing the build triplet. For testing purposes and your scrutiny, I added a new package gmp-arm; as indicated in the log message, my real intent is to modify the gmp package itself, which should be done in a new core-updates cycle. This would also be the occasion to update mpfr. Andreas --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-gmp-Patch-detection-of-multicore-ARM-neon.patch" >From 42af05881facd3eac843133b9aac49de36716003 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 3 Jul 2015 22:01:27 +0200 Subject: [PATCH] gnu: gmp: Patch detection of multicore ARM neon. * gnu/packages/patches/gmp-arm-neon.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/multiprecision.scm (gmp)[source]: Use it. [arguments]: Drop the field. --- gnu-system.am | 1 + gnu/packages/multiprecision.scm | 16 ++++++++++++++++ gnu/packages/patches/gmp-arm-neon.patch | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 gnu/packages/patches/gmp-arm-neon.patch diff --git a/gnu-system.am b/gnu-system.am index a3c56a8..61385f2 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -447,6 +447,7 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-locales.patch \ gnu/packages/patches/gmp-arm-asm-nothumb.patch \ + gnu/packages/patches/gmp-arm-neon.patch \ gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \ diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index da52b2b..da257ed 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -66,6 +66,22 @@ cryptography and computational algebra.") (license lgpl3+) (home-page "http://gmplib.org/"))) +(define-public gmp-arm + (package (inherit gmp) + (name "gmp-arm") + (version "6.0.0a") + (source (origin + (method url-fetch) + (uri + (string-append "mirror://gnu/gmp/gmp-" + version ".tar.xz")) + (sha256 + (base32 + "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli")) + (patches (list (search-patch "gmp-arm-asm-nothumb.patch") + (search-patch "gmp-arm-neon.patch"))))) + (arguments '()))) + (define-public mpfr (package (name "mpfr") diff --git a/gnu/packages/patches/gmp-arm-neon.patch b/gnu/packages/patches/gmp-arm-neon.patch new file mode 100644 index 0000000..6c267f5 --- /dev/null +++ b/gnu/packages/patches/gmp-arm-neon.patch @@ -0,0 +1,16 @@ +Patch to correctly detect the neon architecture for multicore machines; +taken from the trunk of the gmp mercurial repository. + +--- gmp-6.0.0.old/config.guess 2014-03-25 15:37:55.000000000 +0100 ++++ gmp-6.0.0.new/config.guess 2015-07-03 09:03:15.009942296 +0200 +@@ -199,8 +199,9 @@ + 0xc14) exact_cpu="armcortexr4";; # v7r + 0xc15) exact_cpu="armcortexr5";; # v7r + 0xc23) exact_cpu="armcortexm3";; # v7m ++ *) exact_cpu=$guess_cpu;; + esac +- exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo 2>/dev/null`" ++ exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo 2>/dev/null | head -n 1 2>/dev/null`" + ;; + + ia64*-*-*) -- 2.1.4 --FCuugMFkClbJLl1L--