Subject: [bug#50091] [PATCH 10/21] gnu: openssl: Fix build on riscv64-linux.

From: Efraim Flashner <[email-masked]>
Date: Wed, 18 Aug 2021 10:09:39 +0300

On Tue, Aug 17, 2021 at 12:33:45PM -0700, Sarah Morgensen wrote:
> Hi Efraim,
> 
> Efraim Flashner <[email-masked]> writes:
> 
> > * gnu/packages/tls.scm (openssl)[arguments]: Add phase for riscv64-linux
> > to skip failing test.
> > (target->openssl-target): Add case for riscv64-linux.
> > ---
> >  gnu/packages/tls.scm | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
> > index 4b8df04f17..f6cdeac363 100644
> > --- a/gnu/packages/tls.scm
> > +++ b/gnu/packages/tls.scm
> > @@ -337,7 +337,10 @@ OpenSSL for TARGET."
> >          ((string-prefix? "powerpc64" target)
> >           "linux-ppc64")
> >          ((string-prefix? "powerpc" target)
> > -         "linux-ppc")))
> > +         "linux-ppc")
> > +        ((string-prefix? "riscv64" target)
> > +         ;; linux64-riscv64 isn't recognized until 3.0.0.
> > +         "linux-generic64")))
> >  
> >  (define-public openssl
> >    (package
> > @@ -380,6 +383,12 @@ OpenSSL for TARGET."
> >                                 #$(target->openssl-target
> >                                    (%current-target-system))))))
> >                  #~())
> > +         ;; Unclear why this test is failing.
> > +         #$@(if (target-riscv?)
> > +              #~((add-after 'unpack 'skip-failing-test
> > +                   (lambda _
> > +                     (delete-file "test/recipes/30-test_afalg.t"))))
> > +              #~())
> >           (replace 'configure
> >             (lambda* (#:key configure-flags #:allow-other-keys)
> >               (let* ((out #$output)
> 
> This test is also failing on aarch64 [0] and has been reported upstream
> for some time [1] with no action.

I was able to build openssl without any problems on my pine64, I'll run
it again and see what I come up with.

Looking at the bug report, it looks like it also might be kernel
dependant and/or related to cross compiling. I'm pretty sure the aarch64
builders are running Guix System, and my pine64 is running Armbian.

I'll go ahead and disable it for all the arm* architectures.

> Looks like it can also be disabled with
> 
>   make TESTS=-test_afalg test
> 
> if that's more desirable.

I do like that better.

> [0] https://ci.guix.gnu.org/build/29270/details
> [1] https://github.com/openssl/openssl/issues/12242
> 
> --
> Sarah

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted