unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Richard Sent <richard@freakingpenguin.com>
Cc: 68429@debbugs.gnu.org
Subject: bug#68429: Catch2-3.5.1 tests fails on i686-linux, SSE extension
Date: Sat, 13 Jan 2024 22:56:20 +0000	[thread overview]
Message-ID: <87a5p8c06r.fsf@protonmail.com> (raw)
In-Reply-To: <3e5407f77e0e70bafed2f11eed692cdc@freakingpenguin.com>

Hi,

On Sat, Jan 13, 2024 at 11:43 AM, Richard Sent wrote:

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

Thanks! Looking at other packages, seems it is find to enable SSE, just
for x86_64 and i686. Other times we explicitly disable SSE2 more
generally, but in this case it makes sense to match upstream (unless
they change this) and enable in these cases.

So, I used that configure flag just for those systems in
18393fcdddf5c3d834fa89ebf5f3925fc5b166ed which I've pushed. I added you
and another (Jo Gay, from the other channel) as co-authors for finding
the fix(es).

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

And thanks for this too!

John

> Richard Sent
>
> 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





  reply	other threads:[~2024-01-13 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-01-13 22:56 ` John Kehayias via Bug reports for GNU Guix

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=87a5p8c06r.fsf@protonmail.com \
    --to=bug-guix@gnu.org \
    --cc=68429@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=richard@freakingpenguin.com \
    /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).