all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [staging] Mesa FTBFS on 32-bit architectures
Date: Wed, 19 Apr 2017 02:02:50 +0200	[thread overview]
Message-ID: <87k26huuvp.fsf@fastmail.com> (raw)
In-Reply-To: <20170418185218.GA31333@jasmine>


[-- Attachment #1.1: Type: text/plain, Size: 1628 bytes --]

Leo Famulari <leo@famulari.name> writes:

> On Tue, Apr 18, 2017 at 07:00:37PM +0200, Marius Bakke wrote:
>> "mesa" failed the same test on both i686 and armhf:
>> 
>> https://hydra.gnu.org/job/gnu/staging/mesa-17.0.4.i686-linux
>> https://hydra.gnu.org/job/gnu/staging/mesa-17.0.4.armhf-linux
>> 
>> Oddly, I'm not able to reproduce it when compiling on x86_64:
>> 
>> $ ./pre-inst-env guix build --system=i686-linux mesa
>> [...]
>> /gnu/store/kkpq84ki2ipjcn9nhywgm2ww9c5ddlaq-mesa-17.0.4
>> 
>> Can someone with a native machine get the "test-suite.log" of the
>> failing test?
>
> The test, glsl/tests/cache-test, failed for me on x86_64 when building
> for i686-linux.
>
> I've attached '/mesa-17.0.4/src/compiler/test-suite.log'.

[...]

> FAIL: glsl/tests/cache-test
> ===========================
>
> Failed to create ./cache-test-tmp/xdg-cache-home for shader cache (No such file or directory)---disabling.
> Failed to create ./cache-test-tmp/mesa-glsl-cache-dir for shader cache (No such file or directory)---disabling.
> Error: Test 'no eviction before overflow with MAX_SIZE=1M' failed: Expected=3, Actual=2
> Error: Test 'eviction after overflow with MAX_SIZE=1M' failed: Expected=2, Actual=1
> FAIL glsl/tests/cache-test (exit status: 1)

I am able reproduce this failure on a foreign distro (Jessie with
backported kernel), but not on GuixSD. I wonder what that's about, the
built libraries are indeed 32-bit.

Anyway, this commit seems to fix the issue:

https://cgit.freedesktop.org/mesa/mesa/commit/?id=4026b45bbc4c2c067feeee181c54e2beaa1cc5e0

Patch attached. WDYT?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-mesa-Fix-build-on-32-bit-architectures.patch --]
[-- Type: text/x-patch, Size: 3661 bytes --]

From 3c5e9f124615501a081dc2c24d1e3e68c65c6ace Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Wed, 19 Apr 2017 01:35:45 +0200
Subject: [PATCH] gnu: mesa: Fix build on 32-bit architectures.

* gnu/packages/patches/mesa-fix-disk-cache-test-32bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gl.scm (mesa)[source]: Use it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gl.scm                                |  1 +
 .../patches/mesa-fix-disk-cache-test-32bit.patch   | 47 ++++++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 gnu/packages/patches/mesa-fix-disk-cache-test-32bit.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e6dee5839..55fa4f970 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -776,6 +776,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/mcrypt-CVE-2012-4409.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4426.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4527.patch			\
+  %D%/packages/patches/mesa-fix-disk-cache-test-32bit.patch	\
   %D%/packages/patches/mesa-skip-disk-cache-test.patch		\
   %D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch	\
   %D%/packages/patches/metabat-remove-compilation-date.patch	\
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f43f46439..f19b59d2c 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -230,6 +230,7 @@ also known as DXTn or DXTC) for Mesa.")
           "0im3ca1vwwmkjf5w761vh7vabr4vrrdxpckr0wm974x18n2xqs8j"))
         (patches
          (search-patches "mesa-wayland-egl-symbols-check-mips.patch"
+                         "mesa-fix-disk-cache-test-32bit.patch"
                          "mesa-skip-disk-cache-test.patch"))))
     (build-system gnu-build-system)
     (propagated-inputs
diff --git a/gnu/packages/patches/mesa-fix-disk-cache-test-32bit.patch b/gnu/packages/patches/mesa-fix-disk-cache-test-32bit.patch
new file mode 100644
index 000000000..c5a60fdef
--- /dev/null
+++ b/gnu/packages/patches/mesa-fix-disk-cache-test-32bit.patch
@@ -0,0 +1,47 @@
+This fixes a test failure on 32bit architectures.
+
+Patch adapted from upstream source repository:
+
+https://cgit.freedesktop.org/mesa/mesa/commit/?id=61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8
+
+From a2121a13b912c5c3cc2aa22009c978b69b3bbadc Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Thu, 9 Mar 2017 02:54:53 +0200
+Subject: [PATCH] util/disk_cache: fix size subtraction on 32bit
+
+Negating size_t on 32bit produces a 32bit result. This was effectively
+adding values close to UINT_MAX to the cache size (the files are usually
+small) instead of intended subtraction.
+Fixes 'make check' disk_cache failures on 32bit.
+
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
+---
+ src/util/disk_cache.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
+index d3e8b40123..ea7832d29e 100644
+--- a/src/util/disk_cache.c
++++ b/src/util/disk_cache.c
+@@ -521,7 +521,7 @@ evict_random_item(struct disk_cache *cache)
+    free(dir_path);
+ 
+    if (size) {
+-      p_atomic_add(cache->size, - size);
++      p_atomic_add(cache->size, - (uint64_t)size);
+       return;
+    }
+ 
+@@ -542,7 +542,7 @@ evict_random_item(struct disk_cache *cache)
+    free(dir_path);
+ 
+    if (size)
+-      p_atomic_add(cache->size, - size);
++      p_atomic_add(cache->size, - (uint64_t)size);
+ }
+ 
+ void
+-- 
+2.12.2
+
-- 
2.12.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2017-04-19  0:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 16:26 bug#26465: [PATCH] gnu: mesa: Update to 17.0.3 Marius Bakke
2017-04-14 17:52 ` Kei Kebreau
2017-04-15 16:58   ` Marius Bakke
2017-04-17 19:33     ` Marius Bakke
2017-04-17 20:09       ` Staging Leo Famulari
2017-04-18 17:00         ` Staging Marius Bakke
2017-04-18 18:52           ` [staging] Mesa FTBFS on 32-bit architectures Leo Famulari
2017-04-18 19:30             ` Leo Famulari
2017-04-18 23:52             ` Leo Famulari
2017-04-19  0:02             ` Marius Bakke [this message]
2017-04-19  0:13             ` Leo Famulari
2017-04-19  0:17               ` Marius Bakke
2017-04-19 22:03                 ` Leo Famulari
2017-04-19  0:37               ` Leo Famulari
2017-04-21 13:57         ` Staging Marius Bakke
2017-04-21 17:47           ` Staging Leo Famulari
2017-04-21 18:59             ` Staging Mark H Weaver
2017-04-21 19:05               ` Staging Leo Famulari
2017-04-23  9:45                 ` Staging Marius Bakke
2017-04-23  9:49                   ` Staging Marius Bakke
2017-04-25 18:33         ` Staging Leo Famulari
2017-04-27  4:49           ` Staging merged! Leo Famulari
2017-04-27  6:40             ` Ricardo Wurmus
2017-04-27 13:50               ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=87k26huuvp.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.