[PATCH 0/5] Add wfmash

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Efraim Flashner
  • Maxime Devos
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 30 Mar 2022 11:19
(address . guix-patches@gnu.org)
20220330091913.23206-1-arunisaac@systemreboot.net
This patchset adds wfmash, and ensures that, in addition to x86_64, it also
cross-compiles to riscv64.

Arun Isaac (5):
gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
gnu: htslib: Add bzip2 and xz to inputs.
gnu: atomic-queue: Run tests correctly.
gnu: atomic-queue: Do not depend on boost when cross-compiling.
gnu: Add wfmash.

gnu/packages/bioinformatics.scm | 55 +++++++++++++++++++++++++++++++--
gnu/packages/cpp.scm | 26 +++++++++++++---
gnu/packages/maths.scm | 15 ++++++++-
3 files changed, 88 insertions(+), 8 deletions(-)

--
2.34.0
A
A
Arun Isaac wrote on 30 Mar 2022 11:23
[PATCH 2/5] gnu: htslib: Add bzip2 and xz to inputs.
(address . 54635@debbugs.gnu.org)
20220330092313.23584-2-arunisaac@systemreboot.net
htslib links to libbz2 from bzip2 and liblzma from xz. Therefore, bzip2 and xz
should be listed in inputs even though they are already present implicitly in
native-inputs. Else, cross-compilation will fail.

* gnu/packages/bioinformatics.scm (htslib)[inputs]: Add bzip2 and xz.
---
gnu/packages/bioinformatics.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 4e1028b3ce..2f6f3efb66 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2016, 2018 Raoul Bonnal <ilpuccio.febo@gmail.com>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017, 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018, 2019, 2020, 2021 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
@@ -4788,7 +4788,7 @@ (define-public htslib
"--enable-libcurl"
"--enable-s3")))
(inputs
- (list curl openssl))
+ (list bzip2 curl openssl xz))
;; This is referred to in the pkg-config file as a required library.
(propagated-inputs
(list zlib))
--
2.34.0
A
A
Arun Isaac wrote on 30 Mar 2022 11:23
[PATCH 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
(address . 54635@debbugs.gnu.org)
20220330092313.23584-1-arunisaac@systemreboot.net
* gnu/packages/maths.scm (gsl)[arguments]: Force autotools bootstrap when
cross-compiling to riscv64-linux.
[native-inputs]: Add autoconf, automake and libtool when cross-compiling to
riscv64-linux.
---
gnu/packages/maths.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ecb85642ec..f01bf51580 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -19,7 +19,7 @@
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
-;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2019, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
;;; Copyright © 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -533,6 +533,13 @@ (define-public gsl
#:phases
(modify-phases %standard-phases
,@(cond
+ ((target-riscv64?)
+ '((add-after 'unpack 'force-bootstrap
+ (lambda _
+ ;; gsl ships with an old configure script that does not
+ ;; support riscv64. Regenerate it.
+ (delete-file "configure")))))
+
((or (string-prefix? "aarch64" system)
(string-prefix? "powerpc" system))
;; Some sparse matrix tests are failing on AArch64 and PowerPC:
@@ -568,6 +575,12 @@ (define-public gsl
(string-append "exit (77);\n" all)))))))
(else '()))))))
+ (native-inputs
+ (if (target-riscv64?)
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool))
+ '()))
(home-page "https://www.gnu.org/software/gsl/")
(synopsis "Numerical library for C and C++")
(description
--
2.34.0
A
A
Arun Isaac wrote on 30 Mar 2022 11:23
[PATCH 4/5] gnu: atomic-queue: Do not depend on boost when cross-compiling.
(address . 54635@debbugs.gnu.org)
20220330092313.23584-4-arunisaac@systemreboot.net
* gnu/packages/cpp.scm (atomic-queue)[arguments]: When cross-compiling, add
do-not-check-for-boost phase and delete the build phase.
[native-inputs]: Do not include boost when cross-compiling.
---
gnu/packages/cpp.scm | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index eb48902034..649a57b0d5 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1294,6 +1294,21 @@ (define-public atomic-queue
`(#:configure-flags '("-Dbenchmarks=false")
#:phases
(modify-phases %standard-phases
+ ,@(if (%current-target-system)
+ `(;; boost is a test dependency. We don't run tests when
+ ;; cross-compiling. So, do not check for it.
+ (add-after 'unpack 'do-not-check-for-boost
+ (lambda _
+ (substitute* "meson.build"
+ (("unit_test_framework =" all)
+ (string-append "# " all))
+ ((", unit_test_framework") ""))))
+ ;; atomic-queue is a header-only library. Excepting the
+ ;; tests, no building is required. And since we don't run
+ ;; tests when cross-compiling, delete the build phase
+ ;; entirely.
+ (delete 'build))
+ '())
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -1303,9 +1318,11 @@ (define-public atomic-queue
(copy-recursively "../source/include/atomic_queue"
(string-append (assoc-ref outputs "out")
"/include/atomic_queue")))))))
- (native-inputs
- (list boost
- pkg-config))
+ (native-inputs
+ (cons pkg-config
+ (if (%current-target-system)
+ '()
+ (list boost))))
(home-page "https://github.com/max0x7ba/atomic_queue")
(synopsis "C++ lockless queue")
(description
--
2.34.0
A
A
Arun Isaac wrote on 30 Mar 2022 11:23
[PATCH 3/5] gnu: atomic-queue: Run tests correctly.
(address . 54635@debbugs.gnu.org)
20220330092313.23584-3-arunisaac@systemreboot.net
* gnu/packages/cpp.scm (atomic-queue)[arguments]: In the check phase, run
tests instead of returning a function to run them.
---
gnu/packages/cpp.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bb7f5ab95a..eb48902034 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1297,8 +1297,7 @@ (define-public atomic-queue
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (lambda _
- (invoke "make" "run_tests")))))
+ (invoke "./tests"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(copy-recursively "../source/include/atomic_queue"
--
2.34.0
A
A
Arun Isaac wrote on 30 Mar 2022 11:23
[PATCH 5/5] gnu: Add wfmash.
(address . 54635@debbugs.gnu.org)
20220330092313.23584-5-arunisaac@systemreboot.net
* gnu/packages/bioinformatics.scm (wfmash): New variable.
---
gnu/packages/bioinformatics.scm | 51 +++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 2f6f3efb66..500ba4ac60 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -16107,3 +16107,54 @@ (define-public ccwl
@acronym{EDSL, Embedded Domain Specific Language} in the Scheme programming
language.")
(license license:gpl3+)))
+
+(define-public wfmash
+ (package
+ (name "wfmash")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ekg/wfmash/releases/download/v"
+ version "/wfmash-v" version ".tar.gz"))
+ (sha256
+ (base32
+ "031cm1arpfckvihb28vlk69mirpnmlag81zcscfba1bac58wvr7c"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Unbundle atomic-queue.
+ (delete-file-recursively "src/common/atomic_queue")
+ (substitute* "src/align/include/computeAlignments.hpp"
+ (("\"common/atomic_queue/atomic_queue.h\"")
+ "<atomic_queue/atomic_queue.h>"))))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ ;; Remove compiler flags and checks specific to x86 when not
+ ;; targeting it.
+ ,@(if (target-x86-64?)
+ '()
+ '((add-after 'unpack 'remove-x86-specific-compile-flags
+ (lambda _
+ (substitute* (find-files "." "CMakeLists\\.txt")
+ (("-mcx16") "")
+ (("-march=native") ""))
+ (substitute* "src/common/dset64.hpp"
+ (("!__x86_64__") "0")))))))))
+ (inputs
+ (list atomic-queue
+ gsl
+ htslib
+ jemalloc
+ zlib))
+ (synopsis "Base-accurate DNA sequence aligner")
+ (description "@code{wfmash} is a DNA sequence read mapper based on mash
+distances and the wavefront alignment algorithm. It is a fork of MashMap that
+implements base-level alignment via the wflign tiled wavefront global
+alignment algorithm. It completes MashMap with a high-performance alignment
+module capable of computing base-level alignments for very large sequences.")
+ (home-page "https://github.com/ekg/wfmash")
+ (license license:expat)))
--
2.34.0
M
M
Maxime Devos wrote on 30 Mar 2022 13:33
Re: [bug#54635] [PATCH 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
04d943d67c26bedc32ffcb7951c6eb626e5facaf.camel@telenet.be
Arun Isaac schreef op wo 30-03-2022 om 14:53 [+0530]:
Toggle quote (7 lines)
> +    (native-inputs
> +     (if (target-riscv64?)
> +         `(("autoconf" ,autoconf)
> +           ("automake" ,automake)
> +           ("libtool" ,libtool))
> +         '()))

Nowadays input labels are not required anymore here, you can do

(native-inputs (if (targer-riscv64?) (list autoconf automake libtool)
'()))

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkQ/+BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uv3APsEPzooH+FWdeMH/y+cC5MTMhck
OGqVtZQEXI2CdqbcIgEA9unxzKMww/iWfxHvTV7QKYtNGYbHuQxweLBZrImcsww=
=32v2
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 30 Mar 2022 13:36
(name . Efraim Flashner)(address . efraim@flashner.co.il)
c31e66dbac7a55a0dd47462d6c1f7b1c976b795e.camel@telenet.be
Arun Isaac schreef op wo 30-03-2022 om 14:53 [+0530]:
Toggle quote (9 lines)
>             ,@(cond
> +              ((target-riscv64?)
> +               '((add-after 'unpack 'force-bootstrap
> +                   (lambda _
> +                     ;; gsl ships with an old configure script that does not
> +                     ;; support riscv64. Regenerate it.
> +                     (delete-file "configure")))))
> +

WDYT of making this unconditional? Two benefits:

* if Guix is ported to another new architecture,
then no changes are necessary to the package definition.

* 'configure' and 'Makefile.in' are not source code,
and more difficult to audit for things like malware than
'configure.ac' and 'Makefile.am'.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkRAwhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7przAQCA2vHYr2jzrV62rX78/ie30ubS
noeYomSgTzSZtJMYqwD/SnGXSFASebMQgLZ4x00XSBLZI9u82KNLxXceGEL25g8=
=kX1Z
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 30 Mar 2022 13:39
(name . Maxime Devos)(address . maximedevos@telenet.be)
YkRBijIJ16QKrr5G@3900XT
On Wed, Mar 30, 2022 at 01:36:34PM +0200, Maxime Devos wrote:
Toggle quote (19 lines)
> Arun Isaac schreef op wo 30-03-2022 om 14:53 [+0530]:
> >             ,@(cond
> > +              ((target-riscv64?)
> > +               '((add-after 'unpack 'force-bootstrap
> > +                   (lambda _
> > +                     ;; gsl ships with an old configure script that does not
> > +                     ;; support riscv64. Regenerate it.
> > +                     (delete-file "configure")))))
> > +
>
> WDYT of making this unconditional? Two benefits:
>
> * if Guix is ported to another new architecture,
> then no changes are necessary to the package definition.
>
> * 'configure' and 'Makefile.in' are not source code,
> and more difficult to audit for things like malware than
> 'configure.ac' and 'Makefile.am'.

This can be with a TODO for core-updates. gsl itself has about 2000
dependant packages.

That said, I'm not convinced about unilaterally removing configure
unless we make it a policy to remove it. Also, I haven't had trouble
with building gsl on riscv64-linux without this patch.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmJEQYgACgkQQarn3Mo9
g1HgSxAAoegHgtmRF76zsby/u/r1yyKOKe2wbcL8DKK1rJMWUUd1he/f8M4YeeCn
+jg5UKDS3T7rIXnp95NSnrxEX285sjkmaX0KirsY+aGq4AIbNxg+BB7Zz0aNBkSx
RFu29kduN592BsMi1rOYKK1Vhd0P72Xp6q4DewOgMltAjtJIBhJFeZjB4rayotn/
qYULummdFCyodH9gCRL203v3XMgQeuN6hjnXXKqiR45E6LvnaNh1MsPTIS3YDlJA
UHhYuyppt2ivYTkBXqFD5k/+dlHDZ3M3Pekxb2xo6ghaOhV1HMJdtRNNeL1eQUUJ
BPIZoLs/trbirRxhyN4zGoKaiTxNboQh26qI7hHBPZrz6gndejKL8wM8N+vDTbgr
Old3n0/SgmfY8lAJZ5JJ56J6KoPJF8by1LculU1GfjVAjf44sUbZoCH6AM6uImn8
gJXXjLn62t803EpRRUZqT4fxdB8tIcZwYDDO7UNrszK2zIi0GPk8e7QEC9L58Tae
tW2PD+cI+uj5p6422bEY1YUNUNJPGQPHQCI+kZrr/4dShI2IjBYryPR1lGkhFsLX
zbHxzm4hFWLY6cWHBsGporF6TPRo7DaHnCCTCyXSaeWEV54pdUNhf5aDpJ/EP8cg
7YmQNc2qdajEUZh1OFvfEoC+WNipvDv0gqKoginCAjwwNklwkUQ=
=ywNk
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 30 Mar 2022 13:49
Re: [bug#54635] [PATCH 4/5] gnu: atomic-queue: Do not depend on boost when cross-compiling.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
848708b853ca9e04c6aa92f14021724dd23af025.camel@telenet.be
Arun Isaac schreef op wo 30-03-2022 om 14:53 [+0530]:
Toggle quote (4 lines)
> * gnu/packages/cpp.scm (atomic-queue)[arguments]: When cross-compiling, add
> do-not-check-for-boost phase and delete the build phase.
> [native-inputs]: Do not include boost when cross-compiling.

I think it's simpler and less tedious to just always include test
dependencies in native-inputs, without special-casing cross-
compilation. WYDT?

Also, being header-only does not per-se mean ‘no building’. E.g., what
if some of the headers are generated? I think it's a bit simpler and
less likely to cause trouble to just always run the build phase, even
if sometimes it is a no-op.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkRDzxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uzFAQDE+CCL73GXWEncENwvV47x4yJE
PaUZr9S+ocStGbasuAEAiRT2LbbTLYLMnXgkJqE3wrVdgz2IAvGTplOWwmybQQY=
=gUv1
-----END PGP SIGNATURE-----


A
A
Arun Isaac wrote on 31 Mar 2022 08:14
Re: [bug#54635] [PATCH 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87mth6zm1g.fsf@systemreboot.net
Toggle quote (5 lines)
> Nowadays input labels are not required anymore here, you can do
>
> (native-inputs (if (targer-riscv64?) (list autoconf automake libtool)
> '()))

Yes, indeed! Will remove the input labels in the next version of the
patchset.
A
A
Arun Isaac wrote on 31 Mar 2022 08:33
(address . 54635@debbugs.gnu.org)
87k0cazl4s.fsf@systemreboot.net
Toggle quote (21 lines)
>> >             ,@(cond
>> > +              ((target-riscv64?)
>> > +               '((add-after 'unpack 'force-bootstrap
>> > +                   (lambda _
>> > +                     ;; gsl ships with an old configure script that does not
>> > +                     ;; support riscv64. Regenerate it.
>> > +                     (delete-file "configure")))))
>> > +
>>
>> WDYT of making this unconditional? Two benefits:
>>
>> * if Guix is ported to another new architecture,
>> then no changes are necessary to the package definition.
>>
>> * 'configure' and 'Makefile.in' are not source code,
>> and more difficult to audit for things like malware than
>> 'configure.ac' and 'Makefile.am'.
>
> This can be with a TODO for core-updates. gsl itself has about 2000
> dependant packages.

I agree. That was my reasoning as well. If we agree that making it
unconditional is the way forward, I can send another patch for
core-updates after this patchset is pushed to master.

Toggle quote (4 lines)
> That said, I'm not convinced about unilaterally removing configure
> unless we make it a policy to remove it. Also, I haven't had trouble
> with building gsl on riscv64-linux without this patch.

Without the force-boostrap phase, the configure phase fails during
cross-compilation.

Toggle snippet (28 lines)
$ ./pre-inst-env guix build --target=riscv64-linux-gnu gsl
[...]
starting phase `configure'
source directory: "/tmp/guix-build-gsl-2.7.drv-0/gsl-2.7" (relative from build: ".")
build directory: "/tmp/guix-build-gsl-2.7.drv-0/gsl-2.7"
configure flags: ("CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/x7ag3i38ykn2l3f6sfn06bn9356kdk0x-gsl-2.7" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=riscv64-linux-gnu" "--disable-static")
checking for a BSD-compatible install... /gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin/install -c
checking whether build environment is sane... yes
checking for riscv64-linux-gnu-strip... riscv64-linux-gnu-strip
checking for a race-free mkdir -p... /gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a sed that does not truncate output... /gnu/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8/bin/sed
checking whether make sets $(MAKE)... (cached) no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... Invalid configuration `riscv64-linux-gnu': machine `riscv64' not recognized
configure: error: /gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash ./config.sub riscv64-linux-gnu failed
error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" arguments: ("./configure" "CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/x7ag3i38ykn2l3f6sfn06bn9356kdk0x-gsl-2.7" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=riscv64-linux-gnu" "--disable-static") exit-status: 1 term-signal: #f stop-signal: #f>
phase `configure' failed after 0.3 seconds
command "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "./configure" "CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/x7ag3i38ykn2l3f6sfn06bn9356kdk0x-gsl-2.7" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=riscv64-linux-gnu" "--disable-static" failed with status 1
builder for `/gnu/store/fwjvvklmswc9midrcdg6qir2knvmraif-gsl-2.7.drv' failed with exit code 1
build of /gnu/store/fwjvvklmswc9midrcdg6qir2knvmraif-gsl-2.7.drv failed
View build log at '/var/log/guix/drvs/fw/jvvklmswc9midrcdg6qir2knvmraif-gsl-2.7.drv.gz'.
guix build: error: build of `/gnu/store/fwjvvklmswc9midrcdg6qir2knvmraif-gsl-2.7.drv' failed
A
A
Arun Isaac wrote on 31 Mar 2022 09:24
Re: [bug#54635] [PATCH 4/5] gnu: atomic-queue: Do not depend on boost when cross-compiling.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87h77ezirq.fsf@systemreboot.net
Toggle quote (4 lines)
> I think it's simpler and less tedious to just always include test
> dependencies in native-inputs, without special-casing cross-
> compilation. WYDT?

Sure, agreed!

Toggle quote (5 lines)
> Also, being header-only does not per-se mean ‘no building’. E.g., what
> if some of the headers are generated? I think it's a bit simpler and
> less likely to cause trouble to just always run the build phase, even
> if sometimes it is a no-op.

Agreed too!

Will address both in the next version of my patchset.
A
A
Arun Isaac wrote on 31 Mar 2022 09:28
[PATCH v2 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
20220331072849.22417-1-arunisaac@systemreboot.net
* gnu/packages/maths.scm (gsl)[arguments]: Force autotools bootstrap when
cross-compiling to riscv64-linux.
[native-inputs]: Add autoconf, automake and libtool when cross-compiling to
riscv64-linux.
---
gnu/packages/maths.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ecb85642ec..a05f89cb4e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -19,7 +19,7 @@
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
-;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2019, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
;;; Copyright © 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -533,6 +533,13 @@ (define-public gsl
#:phases
(modify-phases %standard-phases
,@(cond
+ ((target-riscv64?)
+ '((add-after 'unpack 'force-bootstrap
+ (lambda _
+ ;; gsl ships with an old configure script that does not
+ ;; support riscv64. Regenerate it.
+ (delete-file "configure")))))
+
((or (string-prefix? "aarch64" system)
(string-prefix? "powerpc" system))
;; Some sparse matrix tests are failing on AArch64 and PowerPC:
@@ -568,6 +575,10 @@ (define-public gsl
(string-append "exit (77);\n" all)))))))
(else '()))))))
+ (native-inputs
+ (if (target-riscv64?)
+ (list autoconf automake libtool)
+ '()))
(home-page "https://www.gnu.org/software/gsl/")
(synopsis "Numerical library for C and C++")
(description
--
2.34.0
A
A
Arun Isaac wrote on 31 Mar 2022 09:28
[PATCH v2 3/5] gnu: atomic-queue: Run tests correctly.
20220331072849.22417-3-arunisaac@systemreboot.net
* gnu/packages/cpp.scm (atomic-queue)[arguments]: In the check phase, run
tests instead of returning a function to run them.
---
gnu/packages/cpp.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index bb7f5ab95a..eb48902034 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1297,8 +1297,7 @@ (define-public atomic-queue
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (lambda _
- (invoke "make" "run_tests")))))
+ (invoke "./tests"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(copy-recursively "../source/include/atomic_queue"
--
2.34.0
A
A
Arun Isaac wrote on 31 Mar 2022 09:28
[PATCH v2 5/5] gnu: Add wfmash.
20220331072849.22417-5-arunisaac@systemreboot.net
* gnu/packages/bioinformatics.scm (wfmash): New variable.
---
gnu/packages/bioinformatics.scm | 51 +++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 2f6f3efb66..500ba4ac60 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -16107,3 +16107,54 @@ (define-public ccwl
@acronym{EDSL, Embedded Domain Specific Language} in the Scheme programming
language.")
(license license:gpl3+)))
+
+(define-public wfmash
+ (package
+ (name "wfmash")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ekg/wfmash/releases/download/v"
+ version "/wfmash-v" version ".tar.gz"))
+ (sha256
+ (base32
+ "031cm1arpfckvihb28vlk69mirpnmlag81zcscfba1bac58wvr7c"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Unbundle atomic-queue.
+ (delete-file-recursively "src/common/atomic_queue")
+ (substitute* "src/align/include/computeAlignments.hpp"
+ (("\"common/atomic_queue/atomic_queue.h\"")
+ "<atomic_queue/atomic_queue.h>"))))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ ;; Remove compiler flags and checks specific to x86 when not
+ ;; targeting it.
+ ,@(if (target-x86-64?)
+ '()
+ '((add-after 'unpack 'remove-x86-specific-compile-flags
+ (lambda _
+ (substitute* (find-files "." "CMakeLists\\.txt")
+ (("-mcx16") "")
+ (("-march=native") ""))
+ (substitute* "src/common/dset64.hpp"
+ (("!__x86_64__") "0")))))))))
+ (inputs
+ (list atomic-queue
+ gsl
+ htslib
+ jemalloc
+ zlib))
+ (synopsis "Base-accurate DNA sequence aligner")
+ (description "@code{wfmash} is a DNA sequence read mapper based on mash
+distances and the wavefront alignment algorithm. It is a fork of MashMap that
+implements base-level alignment via the wflign tiled wavefront global
+alignment algorithm. It completes MashMap with a high-performance alignment
+module capable of computing base-level alignments for very large sequences.")
+ (home-page "https://github.com/ekg/wfmash")
+ (license license:expat)))
--
2.34.0
A
A
Arun Isaac wrote on 31 Mar 2022 09:28
[PATCH v2 2/5] gnu: htslib: Add bzip2 and xz to inputs.
20220331072849.22417-2-arunisaac@systemreboot.net
htslib links to libbz2 from bzip2 and liblzma from xz. Therefore, bzip2 and xz
should be listed in inputs even though they are already present implicitly in
native-inputs. Else, cross-compilation will fail.

* gnu/packages/bioinformatics.scm (htslib)[inputs]: Add bzip2 and xz.
---
gnu/packages/bioinformatics.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 4e1028b3ce..2f6f3efb66 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2016, 2018 Raoul Bonnal <ilpuccio.febo@gmail.com>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017, 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018, 2019, 2020, 2021 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
@@ -4788,7 +4788,7 @@ (define-public htslib
"--enable-libcurl"
"--enable-s3")))
(inputs
- (list curl openssl))
+ (list bzip2 curl openssl xz))
;; This is referred to in the pkg-config file as a required library.
(propagated-inputs
(list zlib))
--
2.34.0
A
A
Arun Isaac wrote on 31 Mar 2022 09:28
[PATCH v2 4/5] gnu: atomic-queue: Do not look for boost when cross-compiling.
20220331072849.22417-4-arunisaac@systemreboot.net
* gnu/packages/cpp.scm (atomic-queue)[arguments]: When cross-compiling, add a
do-not-check-for-boost phase.
---
gnu/packages/cpp.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index eb48902034..b0d4fdeb3e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1294,6 +1294,15 @@ (define-public atomic-queue
`(#:configure-flags '("-Dbenchmarks=false")
#:phases
(modify-phases %standard-phases
+ ,@(if (%current-target-system)
+ `(;; boost is a test dependency. We don't run tests when
+ ;; cross-compiling. Disable all targets that depend on it.
+ (add-after 'unpack 'do-not-check-for-boost
+ (lambda _
+ (substitute* "meson.build"
+ (("unit_test_framework = [^\n]*" all)
+ "unit_test_framework = disabler()")))))
+ '())
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
--
2.34.0
M
M
Maxime Devos wrote on 31 Mar 2022 13:29
Re: [bug#54635] [PATCH 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
(address . 54635@debbugs.gnu.org)
fcb0bbead44a05e20337819b5c898c7c0b0092b4.camel@telenet.be
Arun Isaac schreef op do 31-03-2022 om 12:03 [+0530]:
Toggle quote (16 lines)
> > > WDYT of making this unconditional?  Two benefits:
> > >
> > >    * if Guix is ported to another new architecture,
> > >      then no changes are necessary to the package definition.
> > >
> > >    * 'configure' and 'Makefile.in' are not source code,
> > >      and more difficult to audit for things like malware than
> > >      'configure.ac' and 'Makefile.am'.
> >
> > This can be with a TODO for core-updates. gsl itself has about 2000
> > dependant packages.
>
> I agree. That was my reasoning as well. If we agree that making it
> unconditional is the way forward, I can send another patch for
> core-updates after this patchset is pushed to master.

I started an e-mail thread about this at

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkWQrBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qSFAQDTuaUm7RFy+0+7mVUDgXPGmbVe
03UbOjRuyAwuYS5AZwEAqVvJtMmTd3XOLnI13AD4VpEheMQJ6hNO0BJH71MtDA4=
=o9az
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 31 Mar 2022 13:34
Re: [PATCH v2 5/5] gnu: Add wfmash.
(address . 54635@debbugs.gnu.org)
41db70e1e90803d02444ea5c0ffae0e0d6309700.camel@telenet.be
Arun Isaac schreef op do 31-03-2022 om 12:58 [+0530]:
Toggle quote (2 lines)
> +                       (("-march=native") ""))

This is also wrong for x86 systems because it makes the build non-
reproducible. Also, has upstream been informed about some of the
compiler flags being architecture-specific?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkWRxRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gstAP0RrwO4JZ0rAerFNEIKaHCxfvUY
rZKRUgKb6TFniKPqZQD+MI0UhDhhOMCJboXwLAN+CsDg6Ns15c+u05cpASwmvwQ=
=VBBR
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 31 Mar 2022 14:18
(name . Maxime Devos)(address . maximedevos@telenet.be)
YkWcDYc6j2XRinl8@3900XT
On Thu, Mar 31, 2022 at 01:34:29PM +0200, Maxime Devos wrote:
Toggle quote (7 lines)
> Arun Isaac schreef op do 31-03-2022 om 12:58 [+0530]:
> > +                       (("-march=native") ""))
>
> This is also wrong for x86 systems because it makes the build non-
> reproducible. Also, has upstream been informed about some of the
> compiler flags being architecture-specific?

I'm pretty sure upstream is aware of it, and the -mcx16 flag. That whole
phase doesn't need to be non-x86_64 only, upstream prefers it that way
to get fater results but IMO it would be fine to move it into a snippet.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmJFnAsACgkQQarn3Mo9
g1HfGA//cpMglg4yDTptiU1hN1Q6pOV4io4ehyUS+tqdvhTYZZ7O6/K+yemThL4I
cgd6kVEcGrK1QEBjJaGfSQ/NfIzxS8ryg6ol0RueYbXaHxt4jJd5WlLYpGvWB1Zv
hiBO/odNTgN1zKq78cvfHJutfD8nZsoFTa4ZaNuE5qj4QAVA4OEcB+42lBFEzj9D
yOJo1gUMOFbZU21PqcGiKeqD9Q5q9YeoBmByzP4MWgUmch46fpertBFFj2P13d8q
2n2nJkDlKQKz5n+Zp8ibvyvenGg8w1H9jdHcmvycGijNx+fpX4SnN+/fMu7NDr5u
uEgLUigcXECUG0nwv9+7nQi/EzGUBK+qgKP/OBV84D8kkD0IohYynazBqd2rM/Op
zHgLUFhXXy3+7nF3dwxACQFsc85gMoL0teXQxK7U5GPUvIUcdfyMjvNWpsr77XoL
GaivlXnHKfEbbxzyb6hSKfpPD15JHdDR5vkyyy/4VtkL2y0Rz94UUxYA5+lCFL4y
b9PUy3Y6rj6lezvoKzz18BvQiiDuudahoSVssH8UOG+ATLSLlGJC+UrJTMYUTYut
LJWo/vSb4SabGC2RmfkDmCijnoMadzJNSlxD6tkeDLk0AvDXSGabVYAFrAtJ2kQU
qf3FCU8eNNVHTS0KaE2h+ijMUlXgcLLiMe/1qtm0pTUgAjswhew=
=MBAx
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 31 Mar 2022 14:35
Re: [bug#54635] [PATCH 1/5] gnu: gsl: Force bootstrap when cross-compiling to riscv64-linux.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
YkWgCHAby4i+Y5dz@3900XT
On Thu, Mar 31, 2022 at 12:03:39PM +0530, Arun Isaac wrote:
Toggle quote (34 lines)
>
> >> >             ,@(cond
> >> > +              ((target-riscv64?)
> >> > +               '((add-after 'unpack 'force-bootstrap
> >> > +                   (lambda _
> >> > +                     ;; gsl ships with an old configure script that does not
> >> > +                     ;; support riscv64. Regenerate it.
> >> > +                     (delete-file "configure")))))
> >> > +
> >>
> >> WDYT of making this unconditional? Two benefits:
> >>
> >> * if Guix is ported to another new architecture,
> >> then no changes are necessary to the package definition.
> >>
> >> * 'configure' and 'Makefile.in' are not source code,
> >> and more difficult to audit for things like malware than
> >> 'configure.ac' and 'Makefile.am'.
> >
> > This can be with a TODO for core-updates. gsl itself has about 2000
> > dependant packages.
>
> I agree. That was my reasoning as well. If we agree that making it
> unconditional is the way forward, I can send another patch for
> core-updates after this patchset is pushed to master.
>
> > That said, I'm not convinced about unilaterally removing configure
> > unless we make it a policy to remove it. Also, I haven't had trouble
> > with building gsl on riscv64-linux without this patch.
>
> Without the force-boostrap phase, the configure phase fails during
> cross-compilation.
>
> --8<---------------cut here---------------start------------->8---
..snip..
Toggle quote (2 lines)
> --8<---------------cut here---------------end--------------->8---

I somehow missed that when I was testing it before. It builds fine
natively on riscv64-linux and I haven't tested cross-building from
riscv64-linux to another architecture. I think for now we can tag it as
(target-riscv64?) and (%current-target-system) so it only takes effect
when needed.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmJFoAgACgkQQarn3Mo9
g1H93g//edLAeCpCtFeziUbaQZeCSmK4jwK1d9VL4koOJg6uK+TEWMHkrLJxAZ7A
Q3ShizTjmjVeJaMv/EqFZNO7FZprcVj72H6+6F+D1R0YEy89NSRvdUPMssA9ng1b
rbSLLv+8KYhKUP8lTHhxhhesylZMZD6aQrT/4njgxV4WN7LMaOM6pEkvMPQ+GOG0
UdcetnlZdsulbCXpqRnjjJMqXZjisZHSKVd+b17ajCMtgxE5ywHj/lWrbhNkjnsw
mCYgCBbnx7cxZM8/gRP09WcANcfVZWlPE3r+g2+PI7hjDJ4W+dKkh8EeTyecyvZq
c+jJU+kmjSEfKuLsiRUTgh1F286kGtZREyMVjzuLbIsAR+WI03IUCQAls7pjliod
GmJkJwe9sLX9O1qAyTNuoPOVj+VUF3F9If+eeYpQlJS3GCPluBHK3wz78+4Jhn62
4abHy/3LNAPxNXLH7VtMQcv39rFz3gPkHyV0Rikm0TiJiiVhXcWCGVJEle+YAUYN
VKvOnBfPnC1rxAVvbWyD6ie/v8dp+xNjU3hZsRl1p8FbSyORqaqnW4HeJIe1pNys
fvJ6EXIqWiSTGf+Dhn45QuFF2zUjSWZf8y+wxsm69Hew0wJrfjx0Wy0fvAwH7HhM
WJ99UMHcopoU4LsL2QfBPVySsg+iK26RCR6g/qq1NkpzBEyEHDw=
=4Unz
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 31 Mar 2022 15:07
Re: [PATCH v2 5/5] gnu: Add wfmash.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
c9c69a2a0f95a78fc594d449b461c8d7118b1138.camel@telenet.be
Efraim Flashner schreef op do 31-03-2022 om 15:18 [+0300]:
Toggle quote (11 lines)
> > Arun Isaac schreef op do 31-03-2022 om 12:58 [+0530]:
> > > +                       (("-march=native") ""))
> >
> > This is also wrong for x86 systems because it makes the build non-
> > reproducible.  Also, has upstream been informed about some of the
> > compiler flags being architecture-specific?
>
> I'm pretty sure upstream is aware of it, and the -mcx16 flag. That
> whole phase doesn't need to be non-x86_64 only, upstream prefers it
> that way to get fater results

wfmash could be written to detect CPU features at runtime and there is
also --tune. Also, upstream preferring march=native does not make the
build reproducible.

Toggle quote (2 lines)
> but IMO it would be fine to move it into a snippet.

It does not have to be in a snippet, it just needs to be reproducible
(so no march=native, whether on x86 or not).

Upstream seems to be aware of the non-x86
aware of the problems with march=native.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkWnpRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7o9bAQCFIikxPU4bS66nUKdMf5I3qQhE
Rccbyx7CaBeKu1zE2AD+OZ1+U6noeMuJSVbWfGDLE18eP8vPt3P0pQbwJa9vfA4=
=Bsnw
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 31 Mar 2022 15:09
(name . Maxime Devos)(address . maximedevos@telenet.be)
YkWn87K5ONk5vUwq@3900XT
On Thu, Mar 31, 2022 at 03:07:49PM +0200, Maxime Devos wrote:
Toggle quote (25 lines)
> Efraim Flashner schreef op do 31-03-2022 om 15:18 [+0300]:
> > > Arun Isaac schreef op do 31-03-2022 om 12:58 [+0530]:
> > > > +                       (("-march=native") ""))
> > >
> > > This is also wrong for x86 systems because it makes the build non-
> > > reproducible.  Also, has upstream been informed about some of the
> > > compiler flags being architecture-specific?
> >
> > I'm pretty sure upstream is aware of it, and the -mcx16 flag. That
> > whole phase doesn't need to be non-x86_64 only, upstream prefers it
> > that way to get fater results
>
> wfmash could be written to detect CPU features at runtime and there is
> also --tune. Also, upstream preferring march=native does not make the
> build reproducible.
>
> > but IMO it would be fine to move it into a snippet.
>
> It does not have to be in a snippet, it just needs to be reproducible
> (so no march=native, whether on x86 or not).
>
> Upstream seems to be aware of the non-x86
> (https://github.com/ekg/wfmash/issues/125) but they do not seem to be
> aware of the problems with march=native.

I will let them know. I also added a patch which runs a test suite based
on the github action.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmJFp/AACgkQQarn3Mo9
g1GpxRAAv4oOo35KZ44eyNjoojyQUkjO/b6KuG4RsaLdz71p5aoThFVCPDcz5tWf
l9r4hdCj3Dbg78lqeY3o7NZ1o9yiSFftMZDd5NDlwUAb6W2SROWGLttx00GyWpcR
eqi1wnUQzLyUBPnzyxnesUivfZuQ2NvfklnX/yzKKJpD5AEuzMw3aqgXLOqhog/m
ELMv2SjyPnllr7GKAx0hDEnq1L6tnf43aPCBDTGONwBnUP15nk5vfc609557zIQx
gfMkAE4L1wOCxp1nhaqddt2KopNMO3Vi8V8YcTANhrM8ouRmKPTy1Mgfp8enmXy4
8uqRlURS861npqM0QvNIj9gJiKpOUi6x2jOmlFTV6tFWV3lc8PtvkEz5FwoXwT3h
9iI3O1ID5LpqjYbdMUkG+JVXY/Ctxg6FkcSx4bM5r6EYJSOWyAxz9ax4EGcJ9JVS
AK7Id30v23AfVOA48qUHNuHdTgTRMT5gi5NLOV2I9NLpM2seGIcOGEiRL+J/0nez
hOFDrtUQObm6HuNS1wcaP0RhaxCigse6jB5C5BiYLGVR1UUwgP4A29Gj2ZmFydw8
emTHdK2IjnNguDIdkjDYe0VeejplJRiEN/pft6+sTzWBA3gxk6PPhrG8tO4E8dRG
GCIvlv6yRuAG++CGwtvmyoQT5vSP6chBYHmGuyvlf/yw3WfnLlw=
=Evhb
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 31 Mar 2022 15:31
(name . Maxime Devos)(address . maximedevos@telenet.be)
YkWtMAFXeRTuXVfQ@3900XT
On Thu, Mar 31, 2022 at 03:07:49PM +0200, Maxime Devos wrote:
Toggle quote (21 lines)
> Efraim Flashner schreef op do 31-03-2022 om 15:18 [+0300]:
> > > Arun Isaac schreef op do 31-03-2022 om 12:58 [+0530]:
> > > > +                       (("-march=native") ""))
> > >
> > > This is also wrong for x86 systems because it makes the build non-
> > > reproducible.  Also, has upstream been informed about some of the
> > > compiler flags being architecture-specific?
> >
> > I'm pretty sure upstream is aware of it, and the -mcx16 flag. That
> > whole phase doesn't need to be non-x86_64 only, upstream prefers it
> > that way to get fater results
>
> wfmash could be written to detect CPU features at runtime and there is
> also --tune. Also, upstream preferring march=native does not make the
> build reproducible.
>
> > but IMO it would be fine to move it into a snippet.
>
> It does not have to be in a snippet, it just needs to be reproducible
> (so no march=native, whether on x86 or not).

I suppose not, but the -mcx16 should be in the snippet, since it adds
compiler flags which only work on some architectures. And while we're at
it we can do the -march=native one too.

Toggle quote (5 lines)
> Upstream seems to be aware of the non-x86
> (https://github.com/ekg/wfmash/issues/125) but they do not seem to be
> aware of the problems with march=native.
>

I've pushed these patches with a few tweaks and an additional patch to
run a test suite based on the github workflow in the repository. The
entire check phase takes ~2 minutes on my pinebook pro, so aarch64
doesn't seem to need to skip some tests like riscv64 does.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmJFrTAACgkQQarn3Mo9
g1FBcA/+JvClmkerJJIax/JXybHhlAdV+382r9jJLJMovjB4RGTc/2ayjF0Bm297
ojDI5OIZB7FlqsyTaXtFvdL3AIMfOmWgaK+YywiHWoIGiNF6zbKwqqIv0pjrcoN9
lawO46TUe0jQD7mYvAFO814/8H7w7KDUv9YhZL7KC+dmNrK5nDtohDRIddxZkM9L
xy6eTuzM00uMBP42sttkEpS30BEjQhutsuyhQGZDdWTBtEvoXymFnu5O1X60qx/l
Vo/w/sQgW3/g3H+zrux4wVix5+p6kYzWiU5vgdcn0Q9VuU4/ByS2zw/FHtpmyvxM
yw7508y664YDD3PVP5XadHYdJ954twRpnByXvaKME46PwCb8HxRfgTVUW/65gov3
m8bt7jrR5eQBLA2eAQ/AmHGCfjfOjaZogXkR8qUmXYVU1Gq6R9vmh1IK+MuR/fZ6
vzsBbNNlDRuZF1/vznezpTZsjmZI0IkmYHErE9T+en/L83Auu1F/eR/NgOy4wsDI
OmwzDChQDBdZBj55r1H4lYgbXhCiariVp3UIQKUrlDdO2cS1XXkDHNcVyvv91VsX
bAUFgUO9LKcXJgy7ncjqOaLnXmW94Mq2sjgEGB6fevBvZUVXHnYjhZ4F75FbphLJ
TDi0Dj9uPM365hCH031WHhjsug2IL+vsAYBEcnxCyCf0Oi7FPCM=
=zO0z
-----END PGP SIGNATURE-----


Closed
A
A
Arun Isaac wrote on 1 Apr 2022 09:40
(address . 54635-done@debbugs.gnu.org)
87lewp8d5w.fsf@systemreboot.net
Thanks for reviewing and merging this patchset!

Toggle quote (3 lines)
>> wfmash could be written to detect CPU features at runtime and there is
>> also --tune.

wfmash's speed is one of the critical features it brings to the
table. We might have rendered the package more or less unusable by
disabling CPU optimizations.

I could try talking to upstream about detecting and using CPU features
at runtime. But, I don't know too much about the topic. Any quick links
I can share with them?

Toggle quote (5 lines)
> I've pushed these patches with a few tweaks and an additional patch to
> run a test suite based on the github workflow in the repository. The
> entire check phase takes ~2 minutes on my pinebook pro, so aarch64
> doesn't seem to need to skip some tests like riscv64 does.

I think it is better if upstream provides us a `make check' target to
run these tests. I have asked them:
makes the package fragile. In the future, upstream could change the
tests they run.
Closed
M
M
Maxime Devos wrote on 1 Apr 2022 11:39
(address . 54635-done@debbugs.gnu.org)
85579601b4391c964a2dcfe7bdf2ef67c24b3409.camel@telenet.be
Arun Isaac schreef op vr 01-04-2022 om 13:10 [+0530]:
Toggle quote (8 lines)
> wfmash's speed is one of the critical features it brings to the
> table. We might have rendered the package more or less unusable by
> disabling CPU optimizations.
>
> I could try talking to upstream about detecting and using CPU features
> at runtime. But, I don't know too much about the topic. Any quick links
> I can share with them?

For the concept, maybe
, which is about combining high performance with reproducibility using
the (Guix-specific) --tune package transformation.  To implement run-
time detection, the following could be useful:

* Guix article:

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkbIRBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kHRAP922KpPIa/XnBT902BEwiLlrQsv
NsGKkYtWeTv62bIwLgD/a19oid5QxetNyWMYRPOEUqqXJoG3OK0dHVQiE+IK7gU=
=5FkS
-----END PGP SIGNATURE-----


Closed
A
A
Arun Isaac wrote on 4 Apr 2022 20:01
(address . 54635-done@debbugs.gnu.org)
87fsms7mo8.fsf@systemreboot.net
Hi Maxime,

Toggle quote (10 lines)
> For the concept, maybe
> <https://hpc.guix.info/blog/2022/01/tuning-packages-for-a-cpu-micro-architecture/>
> , which is about combining high performance with reproducibility using
> the (Guix-specific) --tune package transformation.  To implement run-
> time detection, the following could be useful:
>
> * Guix article:
> <https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/>
> * LWN article: <https://lwn.net/Articles/691932/>.

This is helpful. I will read and pass it on to wfmash upstream.

Thanks,
Arun
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54635@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54635
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch