From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [staging] Mesa FTBFS on 32-bit architectures Date: Wed, 19 Apr 2017 02:02:50 +0200 Message-ID: <87k26huuvp.fsf@fastmail.com> References: <20170412162650.31333-1-mbakke@fastmail.com> <87r30unafo.fsf@openmailbox.org> <8737d9obe8.fsf@fastmail.com> <87d1calthj.fsf@fastmail.com> <20170417200901.GB26350@jasmine> <87wpahvefe.fsf@fastmail.com> <20170418185218.GA31333@jasmine> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0d5J-00073M-80 for guix-devel@gnu.org; Tue, 18 Apr 2017 20:03:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0d5F-0001uC-SX for guix-devel@gnu.org; Tue, 18 Apr 2017 20:03:01 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60641) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d0d5F-0001t9-GO for guix-devel@gnu.org; Tue, 18 Apr 2017 20:02:57 -0400 In-Reply-To: <20170418185218.GA31333@jasmine> 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" To: Leo Famulari Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Leo Famulari writes: > On Tue, Apr 18, 2017 at 07:00:37PM +0200, Marius Bakke wrote: >> "mesa" failed the same test on both i686 and armhf: >>=20 >> 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 >>=20 >> Oddly, I'm not able to reproduce it when compiling on x86_64: >>=20 >> $ ./pre-inst-env guix build --system=3Di686-linux mesa >> [...] >> /gnu/store/kkpq84ki2ipjcn9nhywgm2ww9c5ddlaq-mesa-17.0.4 >>=20 >> 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > Failed to create ./cache-test-tmp/xdg-cache-home for shader cache (No suc= h file or directory)---disabling. > Failed to create ./cache-test-tmp/mesa-glsl-cache-dir for shader cache (N= o such file or directory)---disabling. > Error: Test 'no eviction before overflow with MAX_SIZE=3D1M' failed: Expe= cted=3D3, Actual=3D2 > Error: Test 'eviction after overflow with MAX_SIZE=3D1M' failed: Expected= =3D2, Actual=3D1 > 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=3D4026b45bbc4c2c067feeee1= 81c54e2beaa1cc5e0 Patch attached. WDYT? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-mesa-Fix-build-on-32-bit-architectures.patch Content-Transfer-Encoding: quoted-printable From=203c5e9f124615501a081dc2c24d1e3e68c65c6ace Mon Sep 17 00:00:00 2001 From: Marius Bakke 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. =2D-- 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.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index e6dee5839..55fa4f970 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -776,6 +776,7 @@ dist_patch_DATA =3D \ %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 =2D-- 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/gn= u/packages/patches/mesa-fix-disk-cache-test-32bit.patch new file mode 100644 index 000000000..c5a60fdef =2D-- /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=3D61bbb25a080e48a8ca897b= a7f6e73cc6a8e9b5b8 + +From a2121a13b912c5c3cc2aa22009c978b69b3bbadc Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +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 +Reviewed-by: Timothy Arceri +--- + 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); +=20 + if (size) { +- p_atomic_add(cache->size, - size); ++ p_atomic_add(cache->size, - (uint64_t)size); + return; + } +=20 +@@ -542,7 +542,7 @@ evict_random_item(struct disk_cache *cache) + free(dir_path); +=20 + if (size) +- p_atomic_add(cache->size, - size); ++ p_atomic_add(cache->size, - (uint64_t)size); + } +=20 + void +--=20 +2.12.2 + =2D-=20 2.12.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlj2qSsACgkQoqBt8qM6 VPpIpgf+Pc+38XddcUGq3B/0odPGpNkMKRAjRi0vANaonXygB7c4e8/2QZ/Wg+lR I3Ftlmjvj91tkUuxeBxbqploGiFQbawiSMZYhBajf/Laoo/s+GmzDcRaPi+QhnOe y7xg73Gcsy+aKa8ZxzotqqXXfTKiLxM3FspRt3StrHQIKM6dKN1ddeABSLOIw7u7 YUU0Sg8EgzOaqN347fx7S21UzxZJjD95FtIiOYeHUQ5ugAjqax5ns9Bq7CiDsXYe lt1EPMKhKx38+xdX+PMoPzWPGTBY6fUwU/0gF08wGLowjhFko7VF3sKOVvmsjyBH RHHtxHnRTW58ZyKifKOyK1E+4gmQBQ== =BsDX -----END PGP SIGNATURE----- --==-=-=--