unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68429: Catch2-3.5.1 tests fails on i686-linux, SSE extension
@ 2024-01-13 16:43 Richard Sent
  2024-01-13 22:56 ` John Kehayias via Bug reports for GNU Guix
  2024-01-13 22:56 ` John Kehayias via Bug reports for GNU Guix
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Sent @ 2024-01-13 16:43 UTC (permalink / raw)
  To: 68429

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

Opening a ticket so discussions a bit more organized. Hope this doesn't 
step on anybody's toes.

Catch2-3.5.1 fails to build with system=i686-linux, log attached. This 
is due to a test added upstream that assumes the SSE extension is 
present, 
SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp:570.

One fix was proposed that replaces GCC with Clang, attached. This works 
because Clang assumes the SSE extension by default. If we add 
"-DCMAKE_CXX_FLAGS=-mno-sse", the test fails again.

Another solution is to add "-DCMAKE_CXX_FLAGS=-msse -mfpmath=sse" to the 
existing package definition.

Of the two, the second is more explicit in how the problem is resolved, 
but I don't know if we should assume SSE is present on i686.

An issue was opened upstream at 
https://github.com/catchorg/Catch2/issues/2796

Richard Sent

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: clang-fix.diff --]
[-- Type: text/x-diff; name=clang-fix.diff, Size: 865 bytes --]

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 449340f331..e09a7bd82a 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -621,9 +621,14 @@ (define-public catch2-3
     (arguments
      (list
       #:configure-flags
-      #~(list "-DCATCH_DEVELOPMENT_BUILD=ON"
+      #~(list "-DCMAKE_CXX_COMPILER=clang++" ; tests fail with gcc-11 on i686
+              "-DCMAKE_CXX_STANDARD=14"
+              "-DCMAKE_CXX_STANDARD_REQUIRED=ON"
+              "-DCMAKE_CXX_EXTENSIONS=OFF"
+              "-DCATCH_DEVELOPMENT_BUILD=ON"
               "-DCATCH_ENABLE_WERROR=OFF"
               "-DBUILD_SHARED_LIBS=ON")))
+    (native-inputs (list clang-10))
     (inputs (list python-wrapper))
     (synopsis "Automated test framework for C++ and Objective-C")
     (description "Catch2 stands for C++ Automated Test Cases in Headers and is

[-- Attachment #3: sll1zarpy78qi6fgrz9xrpx99hhn3b-catch2-3.5.1.drv.gz --]
[-- Type: application/gzip, Size: 21759 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-13 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13 16:43 bug#68429: Catch2-3.5.1 tests fails on i686-linux, SSE extension Richard Sent
2024-01-13 22:56 ` John Kehayias via Bug reports for GNU Guix
2024-01-13 22:56 ` John Kehayias via Bug reports for GNU Guix

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).