unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Gmp test failure on armhf
Date: Fri, 3 Jul 2015 22:12:07 +0200	[thread overview]
Message-ID: <20150703201207.GB26201@debian> (raw)
In-Reply-To: <87d20fsh2z.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

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


[-- Attachment #2: 0001-gnu-gmp-Patch-detection-of-multicore-ARM-neon.patch --]
[-- Type: text/plain, Size: 3072 bytes --]

From 42af05881facd3eac843133b9aac49de36716003 Mon Sep 17 00:00:00 2001
From: Andreas Enge <privat@xobs-novena>
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


  reply	other threads:[~2015-07-03 20:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  9:32 Gmp test failure on armhf Andreas Enge
2015-06-28 20:39 ` Ludovic Courtès
2015-07-03 20:12   ` Andreas Enge [this message]
2015-07-04  7:08     ` Mark H Weaver
2015-07-04  8:15       ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150703201207.GB26201@debian \
    --to=andreas@enge.fr \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).