all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 53722@debbugs.gnu.org
Subject: [bug#53722] [PATCH staging 1/2] gnu: tbb: Fix test on AArch64.
Date: Wed,  2 Feb 2022 09:41:01 -0500	[thread overview]
Message-ID: <2b93c60ffb8c3ced234c023975a8e35f4bd3ba11.1643812145.git.simon@simonsouth.net> (raw)
In-Reply-To: <cover.1643812145.git.simon@simonsouth.net>

* gnu/packages/patches/tbb-fix-test-on-aarch64.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/tbb.scm (tbb)[source]: Apply it.
---
 gnu/local.mk                                  |  1 +
 .../patches/tbb-fix-test-on-aarch64.patch     | 35 +++++++++++++++++++
 gnu/packages/tbb.scm                          |  4 +++
 3 files changed, 40 insertions(+)
 create mode 100644 gnu/packages/patches/tbb-fix-test-on-aarch64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dceaa53145..ab96d06a34 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1843,6 +1843,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/tao-fix-parser-types.patch		\
   %D%/packages/patches/tar-remove-wholesparse-check.patch	\
   %D%/packages/patches/tar-skip-unreliable-tests.patch		\
+  %D%/packages/patches/tbb-fix-test-on-aarch64.patch		\
   %D%/packages/patches/tcc-boot-0.9.27.patch			\
   %D%/packages/patches/tclxml-3.2-install.patch			\
   %D%/packages/patches/tcsh-fix-autotest.patch			\
diff --git a/gnu/packages/patches/tbb-fix-test-on-aarch64.patch b/gnu/packages/patches/tbb-fix-test-on-aarch64.patch
new file mode 100644
index 0000000000..3a6003591e
--- /dev/null
+++ b/gnu/packages/patches/tbb-fix-test-on-aarch64.patch
@@ -0,0 +1,35 @@
+From 013035b4e9af39f506e87ae6b755c3363e768d4d Mon Sep 17 00:00:00 2001
+From: Vladislav Shchapov <phprus@gmail.com>
+Date: Thu, 23 Dec 2021 19:17:24 +0500
+Subject: [PATCH] Fix issue #687 (test_eh_thread) (#697)
+
+Signed-off-by: Vladislav Shchapov <phprus@gmail.com>
+---
+ test/tbb/test_eh_thread.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp
+index aa6d764d..af291f48 100644
+--- a/test/tbb/test_eh_thread.cpp
++++ b/test/tbb/test_eh_thread.cpp
+@@ -36,6 +36,7 @@
+ // TODO: enable limitThreads with sanitizer under docker
+ #if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__
+ 
++#include <limits.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+@@ -73,7 +74,8 @@ public:
+         mValid = false;
+         pthread_attr_t attr;
+         // Limit the stack size not to consume all virtual memory on 32 bit platforms.
+-        if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, 100*1024) == 0) {
++        std::size_t stacksize = utils::max(128*1024, PTHREAD_STACK_MIN);
++        if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, stacksize) == 0) {
+             mValid = pthread_create(&mHandle, &attr, thread_routine, /* arg = */ nullptr) == 0;
+         }
+     }
+-- 
+2.34.0
+
diff --git a/gnu/packages/tbb.scm b/gnu/packages/tbb.scm
index e5d8394f5f..ef92e6db69 100644
--- a/gnu/packages/tbb.scm
+++ b/gnu/packages/tbb.scm
@@ -41,6 +41,10 @@ (define-public tbb
               (sha256
                (base32
                 "0ih727g802j9lvwkqhw021bk1wb7xlvfgd0vl1i6jng4am1wv7vq"))))
+              (patches (list
+                        ;; Backport an upstream commit that prevents the
+                        ;; "test_eh_thread" test failing on AArch64.
+                        (search-patch "tbb-fix-test-on-aarch64.patch")))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DTBB_STRICT=OFF"))) ;; Don't fail on warnings
-- 
2.34.0





  reply	other threads:[~2022-02-02 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 14:41 [bug#53724] [PATCH staging 0/2] gnu: tbb: Fix build on AArch64; update to 2021.5.0 Simon South
2022-02-02 14:41 ` Simon South [this message]
2022-02-02 14:47 ` [bug#53724] [PATCH staging 2/2] gnu: tbb: Update " Simon South
2022-02-05  0:15 ` bug#53724: [PATCH staging 0/2] gnu: tbb: Fix build on AArch64; update " 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=2b93c60ffb8c3ced234c023975a8e35f4bd3ba11.1643812145.git.simon@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=53722@debbugs.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 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.