[PATCH 0/3] Add sysbench.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Maxime Devos
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 3 Mar 2022 14:53
(address . guix-patches@gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20220303135326.28867-1-maxim.cournoyer@gmail.com
Hello Guix! This small series adds sysbench, which is supposed to be a
simpler alternative to fio. You can try it like so:

Toggle snippet (51 lines)
$ mkdir /tmp/sysbench-test && cd /tmp/sysbench-test
$ sysbench fileio prepare
[...]
$ sysbench fileio --file-test-mode=rndrw run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
reads/s: 11.51
writes/s: 7.67
fsyncs/s: 36.64

Throughput:
read, MiB/s: 0.18
written, MiB/s: 0.12

General statistics:
total time: 10.4215s
total number of events: 454

Latency (ms):
min: 0.00
avg: 22.11
max: 333.26
95th percentile: 70.55
sum: 10040.07

Threads fairness:
events (avg/stddev): 454.0000/0.00
execution time (avg/stddev): 10.0401/0.00

Thanks,

Maxim Cournoyer (3):
gnu: docbook-xml-4.1.2: Install an XML catalog file.
gnu: Add ck.
gnu: Add sysbench.

gnu/packages/benchmark.scm | 140 ++++++++++++++++++++++++++++++++++++-
gnu/packages/c.scm | 39 +++++++++++
gnu/packages/docbook.scm | 26 ++++---
3 files changed, 196 insertions(+), 9 deletions(-)

--
2.34.0
M
M
Maxim Cournoyer wrote on 3 Mar 2022 15:05
[PATCH 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file.
(address . 54235@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20220303140558.29261-1-maxim.cournoyer@gmail.com
* gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog
file.
[native-inputs]: Add libxml2.
---
gnu/packages/docbook.scm | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index cb1a0d4d5e..6b1c533609 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
@@ -153,7 +153,8 @@ (define-public docbook-xml-4.2
"18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
(define-public docbook-xml-4.1.2
- (package (inherit docbook-xml)
+ (package
+ (inherit docbook-xml)
(version "4.1.2")
(source (origin
(method url-fetch)
@@ -167,13 +168,22 @@ (define-public docbook-xml-4.1.2
#:builder
(begin
(use-modules (guix build utils))
- (let ((source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
- (dtd (string-append (assoc-ref %outputs "out")
- "/xml/dtd/docbook")))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+ (xmlcatalog (string-append (assoc-ref %build-inputs "libxml2")
+ "/bin/xmlcatalog"))
+ (dtd (string-append (assoc-ref %outputs "out")
+ "/xml/dtd/docbook"))
+ (catalog.xml (string-append dtd "/catalog.xml")))
(mkdir-p dtd)
- (invoke unzip source "-d" dtd)))))))
+ (invoke unzip source "-d" dtd)
+ ;; Create a minimal XML catalog, to use with libxml2 tools.
+ (invoke xmlcatalog "--noout" "--create" catalog.xml)
+ (invoke xmlcatalog "--noout" "--add" "public"
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ (string-append dtd "/docbookx.dtd") catalog.xml)))))
+ (native-inputs (list libxml2 unzip))))
(define-public docbook-xsl
(package
--
2.34.0
M
M
Maxim Cournoyer wrote on 3 Mar 2022 15:05
[PATCH 2/3] gnu: Add ck.
(address . 54235@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20220303140558.29261-2-maxim.cournoyer@gmail.com
* gnu/packages/c.scm (ck): New variable.
---
gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index e53a7c865f..613f3c504e 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -896,6 +896,45 @@ (define-public aws-c-mqtt
(home-page "https://github.com/awslabs/aws-c-mqtt")
(license license:asl2.0)))
+(define-public ck
+ (package
+ (name "ck")
+ (version "0.7.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/concurrencykit/ck")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ ;; ck uses a custom configure script that stumbles on
+ ;; '--enable-fast-install'.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (invoke "./configure"
+ (string-append "--prefix=" #$output)
+ (string-append "--mandir=" #$output "/share/man")
+ "--use-cc-builtins"
+ (string-append "--cores="
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))))))
+ (home-page "https://github.com/concurrencykit/ck")
+ (synopsis "C library for concurrent systems")
+ (description "Concurrency Kit (@code{ck}) provides concurrency primitives,
+safe memory reclamation mechanisms and non-blocking (including lock-free) data
+structures designed to aid in the research, design and implementation of high
+performance concurrent systems developed in C99+.")
+ (license (list license:bsd-2 ;everything except...
+ license:asl2.0)))) ;src/ck_hp.c
+
(define-public utf8-h
;; The latest tag is used as there is no release.
(let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734")
--
2.34.0
M
M
Maxim Cournoyer wrote on 3 Mar 2022 15:05
[PATCH 3/3] gnu: Add sysbench.
(address . 54235@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20220303140558.29261-3-maxim.cournoyer@gmail.com
* gnu/packages/benchmark.scm (sysbench): New variable.
---
gnu/packages/benchmark.scm | 140 ++++++++++++++++++++++++++++++++++++-
1 file changed, 139 insertions(+), 1 deletion(-)

Toggle diff (180 lines)
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 537f6262c4..69de11d998 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes@gmail.com>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
;;;
@@ -31,22 +31,31 @@ (define-module (gnu packages benchmark)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages xml)
#:use-module (ice-9 match))
(define-public fio
@@ -383,3 +392,132 @@ (define-public clpeak
devices. It only measures the peak metrics that can be achieved using
vector operations and does not represent a real-world use case.")
(license license:unlicense))))
+
+(define-public sysbench
+ (package
+ (name "sysbench")
+ (version "1.0.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/akopytov/sysbench")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Ensure no bundled libraries get used.
+ (delete-file-recursively "third_party")
+ (substitute* "configure.ac"
+ (("^third_party/.*")
+ ""))
+ (substitute* "Makefile.am"
+ ((".*(LUAJIT|CK)_DIR =.*")
+ ""))))
+ (sha256
+ (base32
+ "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "--with-pgsql"
+ ;; Explicitly specify the library directory of
+ ;; MySQL, otherwise `mysql_config` gets
+ ;; consulted and adds unnecessary link
+ ;; directives.
+ (string-append "--with-mysql-libs="
+ #$(this-package-input "mysql")
+ "/lib")
+ "--with-system-luajit"
+ "--with-system-ck"
+ ;; If we let the build tool select the most
+ ;; optimal compiler architecture flag, the
+ ;; build is not reproducible.
+ "--without-gcc-arch")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-runner
+ (lambda _
+ (substitute* "tests/test_run.sh"
+ (("/bin/bash")
+ (which "bash"))
+ ;; Do not attempt to invoke the cram command via
+ ;; Python, as on Guix it is a shell script (wrapper).
+ (("\\$\\(command -v cram\\)")
+ "-m cram"))))
+ (add-after 'unpack 'disable-test-installation
+ (lambda _
+ (substitute* "tests/Makefile.am"
+ (("install-data-local")
+ "do-not-install-data-local")
+ (("^test_SCRIPTS.*")
+ ""))))
+ (add-after 'unpack 'fix-docbook
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "m4/ax_check_docbook.m4"
+ (("DOCBOOK_ROOT=.*" all)
+ (string-append
+ all "XML_CATALOG="
+ (search-input-file inputs
+ "xml/dtd/docbook/catalog.xml")
+ "\n")))
+ (substitute* "doc/xsl/xhtml.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/docbook.xsl")
+ (search-input-file
+ inputs (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/docbook.xsl"))))
+ (substitute* "doc/xsl/xhtml-chunk.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/chunk.xsl")
+ (search-input-file
+ inputs (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/chunk.xsl")))))))))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ pkg-config
+ python-cram
+ python-wrapper
+ which
+ ;; For documentation
+ libxml2 ;for XML_CATALOG_FILES
+ libxslt
+ docbook-xml-4.1.2
+ docbook-xsl))
+ (inputs (list ck libaio luajit mysql postgresql))
+ (home-page "https://github.com/akopytov/sysbench/")
+ (synopsis "Scriptable database and system performance benchmark")
+ (description "@command{sysbench} is a scriptable multi-threaded benchmark
+tool based on LuaJIT. It is most frequently used for database benchmarks, but
+can also be used to create arbitrarily complex workloads that do not involve a
+database server. @command{sysbench} comes with the following bundled
+benchmarks:
+@table @file
+@item oltp_*.lua
+A collection of OLTP-like database benchmarks.
+@item fileio
+A filesystem-level benchmark.
+@item cpu
+A simple CPU benchmark.
+@item memory
+A memory access benchmark.
+@item threads
+A thread-based scheduler benchmark.
+@item mutex
+A POSIX mutex benchmark.
+@end table
+It includes features such as:
+@itemize
+@item
+Extensive statistics about rate and latency is available, including latency
+percentiles and histograms.
+@item
+Low overhead even with thousands of concurrent threads. @command{sysbench} is
+capable of generating and tracking hundreds of millions of events per second.
+@item
+New benchmarks can be easily created by implementing pre-defined hooks in
+user-provided Lua scripts.
+@item
+@end itemize")
+ (license license:gpl2+)))
--
2.34.0
M
M
Maxime Devos wrote on 3 Mar 2022 17:42
e18d980074b78cf1ee462785424857a925500ae9.camel@telenet.be
Maxim Cournoyer schreef op do 03-03-2022 om 09:05 [-0500]:
Toggle quote (10 lines)
> +              (snippet '(begin
> +                          ;; Ensure no bundled libraries get used.
> +                          (delete-file-recursively "third_party")
> +                          (substitute* "configure.ac"
> +                            (("^third_party/.*")
> +                             ""))
> +                          (substitute* "Makefile.am"
> +                            ((".*(LUAJIT|CK)_DIR =.*")
> +                             ""))))

For consistency with the code below, I would make this a gexp, YMMV.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiDv9xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7n6CAQDufQmTxJKDMFGrpSAMfrVEMwqm
tpZEofr5BL/kRsk31AD+JyH4RwqgFUOPZL1Wqv6RG4bJkzWUsTyPRD4kA626PAs=
=ons1
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 3 Mar 2022 17:55
Re: [bug#54235] [PATCH 2/3] gnu: Add ck.
a4e56d1529a5a1cb0ad058abf3925185a24a61a7.camel@telenet.be
Maxim Cournoyer schreef op do 03-03-2022 om 09:05 [-0500]:
Toggle quote (13 lines)
> +          (replace 'configure
> +            ;; ck uses a custom configure script that stumbles on
> +            ;; '--enable-fast-install'.
> +            (lambda* (#:key parallel-build? #:allow-other-keys)
> +              (invoke "./configure"
> +                      (string-append "--prefix=" #$output)
> +                      (string-append "--mandir=" #$output "/share/man")
> +                      "--use-cc-builtins"
> +                      (string-append "--cores="
> +                                     (if parallel-build?
> +                                         (number->string (parallel-job-count))
> +                                         "1"))))))))

For cross-compilation support, it seems that the CC environment
variable needs to be set (and possibly AR and LD as well).

Also, the configure script looks in /proc/cpuinfo for ‘address sizes’
and ‘VMA bits’, there might be some reproducibility and cross-
compilation concerns there.

The configure script enables SSE things by default (on x86-32). I
don't know if that can be assumed in Guix.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiDy/hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oBjAQCGwQhbLhVeHqHPo9VaBX6FiWTx
wGs2kdlNof0UbiDqqgEA+iGL44uKEF2Z463JV9MoSF2Z8kx1+ZDyRUXR58r0gAo=
=MT+F
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 7 Mar 2022 19:57
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87bkyhvbdu.fsf@gmail.com
Hi Maxime,
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (16 lines)
> Maxim Cournoyer schreef op do 03-03-2022 om 09:05 [-0500]:
>> +          (replace 'configure
>> +            ;; ck uses a custom configure script that stumbles on
>> +            ;; '--enable-fast-install'.
>> +            (lambda* (#:key parallel-build? #:allow-other-keys)
>> +              (invoke "./configure"
>> +                      (string-append "--prefix=" #$output)
>> +                      (string-append "--mandir=" #$output "/share/man")
>> +                      "--use-cc-builtins"
>> +                      (string-append "--cores="
>> +                                     (if parallel-build?
>> +                                         (number->string (parallel-job-count))
>> +                                         "1"))))))))
>
> For cross-compilation support, it seems that the CC environment
> variable needs to be set (and possibly AR and LD as well).
It seems to be handled alright as it is; at least I was able to build
with:
./pre-inst-env guix build --target=arm-linux-gnueabihf ck
[...]
done with offloaded '/gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv'
successfully built /gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv
/gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1
Toggle quote (3 lines)
> Also, the configure script looks in /proc/cpuinfo for ‘address sizes’
> and ‘VMA bits’, there might be some reproducibility and cross-
> compilation concerns there.
I haven't seen nondetermism in the builds between x86_64 host of very
different architecture (Core 2 Duo from 2007 vs a recent Ryzen).
Toggle quote (2 lines)
> The configure script enables SSE things by default (on x86-32). I
> don't know if that can be assumed in Guix.
SSE was introduced with the Pentium III line in 1999. I'd think that's
old enough to assume it's available for x86 machines.
Thanks for taking a look and paying attention to these tricky issues.
With my observations above, does it look good to you?
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 7 Mar 2022 19:59
Re: [bug#54235] [PATCH 3/3] gnu: Add sysbench.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
877d95vbb7.fsf@gmail.com
Hi Maxime,
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (12 lines)
> Maxim Cournoyer schreef op do 03-03-2022 om 09:05 [-0500]:
>> +              (snippet '(begin
>> +                          ;; Ensure no bundled libraries get used.
>> +                          (delete-file-recursively "third_party")
>> +                          (substitute* "configure.ac"
>> +                            (("^third_party/.*")
>> +                             ""))
>> +                          (substitute* "Makefile.am"
>> +                            ((".*(LUAJIT|CK)_DIR =.*")
>> +                             ""))))
>
> For consistency with the code below, I would make this a gexp, YMMV.
I think I prefer to leave it as is, to readily convey that no G-Exp
features were used.
Thank you!
Maxim
M
M
Maxime Devos wrote on 7 Mar 2022 21:57
Re: [bug#54235] [PATCH 2/3] gnu: Add ck.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 54235@debbugs.gnu.org)
285844ee246d8678ab563af9372d3245303dbb28.camel@telenet.be
Maxim Cournoyer schreef op ma 07-03-2022 om 13:57 [-0500]:
Toggle quote (9 lines)
> It seems to be handled alright as it is; at least I was able to build
> with:
>
> ./pre-inst-env guix build --target=arm-linux-gnueabihf ck
> [...]
> done with offloaded '/gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv'
> successfully built /gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv
> /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1

Unfortunately, that is a rather unreliable check.
This only checks that 'ck' could be compiled, but it does not check
that 'ck' was actually compiled for arm-linux-gnueabihf instead of
(%current-system). It might still be the case that 'gcc' is used
instead of '$TARGET-gcc'

Could you run 'file' against /gnu/store/[...]/bin/* to verify things?
On my x86-64-linux-gnu system, for a native binary, I get:

a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-
2.33/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

I'm not sure what you would get for an arm-linux-gnueabihf but it
probably should not include '64-bit' or 'x86-64'.

Assuming you have QEMU emulation _disabled_, you can also try running
the binary on your (presumably non-arm) system and verify that it fails
to start.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiZxwBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ivyAQDHIwocbFfx1MyOdPMLut77aIxx
eTLw6/eR7oQzTZ+B0gEA/UvnExqXIgfmryIAcxMk3lb7mIlboR7VRSRiAcspKws=
=9V67
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 8 Mar 2022 02:47
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
8735jtusf7.fsf@gmail.com
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (26 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 13:57 [-0500]:
>> It seems to be handled alright as it is; at least I was able to build
>> with:
>>
>> ./pre-inst-env guix build --target=arm-linux-gnueabihf ck
>> [...]
>> done with offloaded '/gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv'
>> successfully built /gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv
>> /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1
>
> Unfortunately, that is a rather unreliable check.
> This only checks that 'ck' could be compiled, but it does not check
> that 'ck' was actually compiled for arm-linux-gnueabihf instead of
> (%current-system). It might still be the case that 'gcc' is used
> instead of '$TARGET-gcc'
>
> Could you run 'file' against /gnu/store/[...]/bin/* to verify things?
> On my x86-64-linux-gnu system, for a native binary, I get:
>
> a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> linked, interpreter /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-
> 2.33/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped
>
> I'm not sure what you would get for an arm-linux-gnueabihf but it
> probably should not include '64-bit' or 'x86-64'.

Good catch, you are right:

Toggle snippet (4 lines)
$ file /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1/lib/libck.so.0.7.1
/gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1/lib/libck.so.0.7.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

I'll be sending a V2 once I've fixed cross-compilation. Another -1 for
custom/borked configure script, eh!

Thanks,

Maxim
M
M
Maxim Cournoyer wrote on 8 Mar 2022 05:06
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87y21lt7dv.fsf@gmail.com
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (33 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 13:57 [-0500]:
>> It seems to be handled alright as it is; at least I was able to build
>> with:
>>
>> ./pre-inst-env guix build --target=arm-linux-gnueabihf ck
>> [...]
>> done with offloaded '/gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv'
>> successfully built /gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv
>> /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1
>
> Unfortunately, that is a rather unreliable check.
> This only checks that 'ck' could be compiled, but it does not check
> that 'ck' was actually compiled for arm-linux-gnueabihf instead of
> (%current-system). It might still be the case that 'gcc' is used
> instead of '$TARGET-gcc'
>
> Could you run 'file' against /gnu/store/[...]/bin/* to verify things?
> On my x86-64-linux-gnu system, for a native binary, I get:
>
> a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> linked, interpreter /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-
> 2.33/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped
>
> I'm not sure what you would get for an arm-linux-gnueabihf but it
> probably should not include '64-bit' or 'x86-64'.
>
> Assuming you have QEMU emulation _disabled_, you can also try running
> the binary on your (presumably non-arm) system and verify that it fails
> to start.
>
> Greetings,
> Maxime.

I tried hard to have the custom configure script collaborating, but in
the end, it appears critically broken. This is what I tried:

Toggle snippet (82 lines)
1 file changed, 52 insertions(+), 9 deletions(-)
gnu/packages/c.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------

modified gnu/packages/c.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages c)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix store)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootstrap)
@@ -916,16 +917,58 @@ (define-public ck
#~(modify-phases %standard-phases
(replace 'configure
;; ck uses a custom configure script that stumbles on
- ;; '--enable-fast-install'.
+ ;; '--enable-fast-install', among other things.
(lambda* (#:key parallel-build? #:allow-other-keys)
- (invoke "./configure"
- (string-append "--prefix=" #$output)
- (string-append "--mandir=" #$output "/share/man")
- "--use-cc-builtins"
- (string-append "--cores="
- (if parallel-build?
- (number->string (parallel-job-count))
- "1"))))))))
+ ;; TODO: Move AR-FOR-TARGET and LD-FOR-TARGET to (guix utils).
+ (define* (ar-for-target #:optional (target #$(%current-target-system)))
+ (if target
+ (string-append target "-ar")
+ "ar"))
+ (define* (ld-for-target #:optional (target #$(%current-target-system)))
+ (if target
+ (string-append target "-ld")
+ "ld"))
+ (define (gnu-triplet->machine target)
+ (letrec-syntax
+ ((matches (syntax-rules (=>)
+ ((_ (target-prefix => machine) rest ...)
+ (if (string-prefix? target-prefix target)
+ machine
+ (matches rest ...)))
+ ((_)
+ (error "unsupported target" target)))))
+ ;; This basically reproduces the logic handling the
+ ;; PLATFORM variable in the configure script.
+ (matches ("x86_64" => "x86_64")
+ ("i586" => "x86")
+ ("i686" => "x86")
+ ("aarch64" => "aarch64")
+ ("arm" => "arm")
+ ("ppc64" => "ppc64")
+ ("ppc" => "ppc")
+ ("s390x" => "s390x")
+ ("sparc64" => "sparcv9"))))
+ (define target-machine (and=> #$(%current-target-system)
+ gnu-triplet->machine))
+ ;; The custom configure script doesn't make cross-compilation
+ ;; adjustments itself, so manually set the archiver, compiler
+ ;; and linker. Even then, it is still broken and doesn't
+ ;; actually build any binary (see:
+ ;; https://github.com/concurrencykit/ck/issues/191).
+ (setenv "AR" (ar-for-target))
+ (setenv "CC" #$(cc-for-target))
+ (setenv "LD" (ld-for-target))
+ (setenv "LDFLAGS" "")
+ (apply invoke "./configure"
+ `(,@(if target-machine
+ (list (string-append "--profile=" target-machine))
+ '())
+ ,(string-append "--prefix=" #$output)
+ ,(string-append "--mandir=" #$output "/share/man")
+ ,(string-append "--cores="
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")))))))))
(home-page "https://github.com/concurrencykit/ck")
(synopsis "C library for concurrent systems")
(description "Concurrency Kit (@code{ck}) provides concurrency primitives,

But due to the test setting COMPILER failing, it doesn't set any
ALL_LIBS and thus doesn't build anything (see:

I also tried patching COMPILER to hard-code it to gcc and export
COMPILER to gcc, but that doesn't work too; it seems the ordering of the
logic in script is wrong.

I'd still keep the changes in, which will make life easier if/when
upstream fixes their script.

Thanks,

Maxim
M
M
Maxim Cournoyer wrote on 8 Mar 2022 05:38
[PATCH v2 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file.
(address . 54235@debbugs.gnu.org)
20220308043809.31394-1-maxim.cournoyer@gmail.com
* gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog
file.
[native-inputs]: Add libxml2.
---
gnu/packages/docbook.scm | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6575bf2d75..0a8d2e2aed 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
@@ -153,7 +153,8 @@ (define-public docbook-xml-4.2
"18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
(define-public docbook-xml-4.1.2
- (package (inherit docbook-xml)
+ (package
+ (inherit docbook-xml)
(version "4.1.2")
(source (origin
(method url-fetch)
@@ -167,13 +168,22 @@ (define-public docbook-xml-4.1.2
#:builder
(begin
(use-modules (guix build utils))
- (let ((source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
- (dtd (string-append (assoc-ref %outputs "out")
- "/xml/dtd/docbook")))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+ (xmlcatalog (string-append (assoc-ref %build-inputs "libxml2")
+ "/bin/xmlcatalog"))
+ (dtd (string-append (assoc-ref %outputs "out")
+ "/xml/dtd/docbook"))
+ (catalog.xml (string-append dtd "/catalog.xml")))
(mkdir-p dtd)
- (invoke unzip source "-d" dtd)))))))
+ (invoke unzip source "-d" dtd)
+ ;; Create a minimal XML catalog, to use with libxml2 tools.
+ (invoke xmlcatalog "--noout" "--create" catalog.xml)
+ (invoke xmlcatalog "--noout" "--add" "public"
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ (string-append dtd "/docbookx.dtd") catalog.xml)))))
+ (native-inputs (list libxml2 unzip))))
(define-public docbook-xsl
(package
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 05:38
[PATCH v2 2/3] gnu: Add ck.
(address . 54235@debbugs.gnu.org)
20220308043809.31394-2-maxim.cournoyer@gmail.com
* gnu/packages/c.scm (ck): New variable.
---
gnu/packages/c.scm | 81 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)

Toggle diff (101 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index e53a7c865f..5fc923790a 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages c)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix store)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootstrap)
@@ -896,6 +897,86 @@ (define-public aws-c-mqtt
(home-page "https://github.com/awslabs/aws-c-mqtt")
(license license:asl2.0)))
+(define-public ck
+ (package
+ (name "ck")
+ (version "0.7.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/concurrencykit/ck")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ ;; ck uses a custom configure script that stumbles on
+ ;; '--enable-fast-install', among other things.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ ;; TODO: Move AR-FOR-TARGET and LD-FOR-TARGET to (guix utils).
+ (define* (ar-for-target #:optional (target #$(%current-target-system)))
+ (if target
+ (string-append target "-ar")
+ "ar"))
+ (define* (ld-for-target #:optional (target #$(%current-target-system)))
+ (if target
+ (string-append target "-ld")
+ "ld"))
+ (define (gnu-triplet->machine target)
+ (letrec-syntax
+ ((matches (syntax-rules (=>)
+ ((_ (target-prefix => machine) rest ...)
+ (if (string-prefix? target-prefix target)
+ machine
+ (matches rest ...)))
+ ((_)
+ (error "unsupported target" target)))))
+ ;; This basically reproduces the logic handling the
+ ;; PLATFORM variable in the configure script.
+ (matches ("x86_64" => "x86_64")
+ ("i586" => "x86")
+ ("i686" => "x86")
+ ("aarch64" => "aarch64")
+ ("arm" => "arm")
+ ("ppc64" => "ppc64")
+ ("ppc" => "ppc")
+ ("s390x" => "s390x")
+ ("sparc64" => "sparcv9"))))
+ (define target-machine (and=> #$(%current-target-system)
+ gnu-triplet->machine))
+ ;; The custom configure script doesn't make cross-compilation
+ ;; adjustments itself, so manually set the archiver, compiler
+ ;; and linker. Even then, it is still broken and doesn't
+ ;; actually build any binary (see:
+ ;; https://github.com/concurrencykit/ck/issues/191).
+ (setenv "AR" (ar-for-target))
+ (setenv "CC" #$(cc-for-target))
+ (setenv "LD" (ld-for-target))
+ (apply invoke "./configure"
+ `(,@(if target-machine
+ (list (string-append "--profile=" target-machine))
+ '())
+ ,(string-append "--prefix=" #$output)
+ ,(string-append "--mandir=" #$output "/share/man")
+ ,(string-append "--cores="
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")))))))))
+ (home-page "https://github.com/concurrencykit/ck")
+ (synopsis "C library for concurrent systems")
+ (description "Concurrency Kit (@code{ck}) provides concurrency primitives,
+safe memory reclamation mechanisms and non-blocking (including lock-free) data
+structures designed to aid in the research, design and implementation of high
+performance concurrent systems developed in C99+.")
+ (license (list license:bsd-2 ;everything except...
+ license:asl2.0)))) ;src/ck_hp.c
+
(define-public utf8-h
;; The latest tag is used as there is no release.
(let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734")
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 05:38
[PATCH v2 3/3] gnu: Add sysbench.
(address . 54235@debbugs.gnu.org)
20220308043809.31394-3-maxim.cournoyer@gmail.com
* gnu/packages/benchmark.scm (sysbench): New variable.
---
gnu/packages/benchmark.scm | 137 +++++++++++++++++++++++++++++++++++++
1 file changed, 137 insertions(+)

Toggle diff (167 lines)
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index eb5df3d4c3..87c39aac8c 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -37,19 +37,27 @@ (define-module (gnu packages benchmark)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages xml)
#:use-module (ice-9 match))
(define-public fio
@@ -430,3 +438,132 @@ (define-public kdiskmark
@item Report generation.
@end itemize")
(license license:gpl3+)))
+
+(define-public sysbench
+ (package
+ (name "sysbench")
+ (version "1.0.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/akopytov/sysbench")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Ensure no bundled libraries get used.
+ (delete-file-recursively "third_party")
+ (substitute* "configure.ac"
+ (("^third_party/.*")
+ ""))
+ (substitute* "Makefile.am"
+ ((".*(LUAJIT|CK)_DIR =.*")
+ ""))))
+ (sha256
+ (base32
+ "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "--with-pgsql"
+ ;; Explicitly specify the library directory of
+ ;; MySQL, otherwise `mysql_config` gets
+ ;; consulted and adds unnecessary link
+ ;; directives.
+ (string-append "--with-mysql-libs="
+ #$(this-package-input "mysql")
+ "/lib")
+ "--with-system-luajit"
+ "--with-system-ck"
+ ;; If we let the build tool select the most
+ ;; optimal compiler architecture flag, the
+ ;; build is not reproducible.
+ "--without-gcc-arch")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-runner
+ (lambda _
+ (substitute* "tests/test_run.sh"
+ (("/bin/bash")
+ (which "bash"))
+ ;; Do not attempt to invoke the cram command via
+ ;; Python, as on Guix it is a shell script (wrapper).
+ (("\\$\\(command -v cram\\)")
+ "-m cram"))))
+ (add-after 'unpack 'disable-test-installation
+ (lambda _
+ (substitute* "tests/Makefile.am"
+ (("install-data-local")
+ "do-not-install-data-local")
+ (("^test_SCRIPTS.*")
+ ""))))
+ (add-after 'unpack 'fix-docbook
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "m4/ax_check_docbook.m4"
+ (("DOCBOOK_ROOT=.*" all)
+ (string-append
+ all "XML_CATALOG="
+ (search-input-file inputs
+ "xml/dtd/docbook/catalog.xml")
+ "\n")))
+ (substitute* "doc/xsl/xhtml.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/docbook.xsl")
+ (search-input-file
+ inputs (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/docbook.xsl"))))
+ (substitute* "doc/xsl/xhtml-chunk.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/chunk.xsl")
+ (search-input-file
+ inputs (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/chunk.xsl")))))))))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ pkg-config
+ python-cram
+ python-wrapper
+ which
+ ;; For documentation
+ libxml2 ;for XML_CATALOG_FILES
+ libxslt
+ docbook-xml-4.1.2
+ docbook-xsl))
+ (inputs (list ck libaio luajit mysql postgresql))
+ (home-page "https://github.com/akopytov/sysbench/")
+ (synopsis "Scriptable database and system performance benchmark")
+ (description "@command{sysbench} is a scriptable multi-threaded benchmark
+tool based on LuaJIT. It is most frequently used for database benchmarks, but
+can also be used to create arbitrarily complex workloads that do not involve a
+database server. @command{sysbench} comes with the following bundled
+benchmarks:
+@table @file
+@item oltp_*.lua
+A collection of OLTP-like database benchmarks.
+@item fileio
+A filesystem-level benchmark.
+@item cpu
+A simple CPU benchmark.
+@item memory
+A memory access benchmark.
+@item threads
+A thread-based scheduler benchmark.
+@item mutex
+A POSIX mutex benchmark.
+@end table
+It includes features such as:
+@itemize
+@item
+Extensive statistics about rate and latency is available, including latency
+percentiles and histograms.
+@item
+Low overhead even with thousands of concurrent threads. @command{sysbench} is
+capable of generating and tracking hundreds of millions of events per second.
+@item
+New benchmarks can be easily created by implementing pre-defined hooks in
+user-provided Lua scripts.
+@item
+@end itemize")
+ (license license:gpl2+)))
--
2.34.0
M
M
Maxime Devos wrote on 8 Mar 2022 10:39
Re: [PATCH v2 2/3] gnu: Add ck.
f51f67ec3a0c28d749586f1de483530ff1161438.camel@telenet.be
Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
Toggle quote (6 lines)
> +              ;; TODO: Move AR-FOR-TARGET and LD-FOR-TARGET to (guix utils).
> +              (define* (ar-for-target #:optional (target #$(%current-target-system)))
> +                (if target
> +                    (string-append target "-ar")
> +                    "ar"))

I'm wondering, why not just do this now (in a separate patch)?
(guix utils) isn't (guix build utils), there are no rebuilding
concerns.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYickRxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7igcAP4oLJC8gNC2D+ShOsxBSVDUI3y8
HC1lqECz1YOnX+1flwD9F1/W+xDLTVkus1BNHPGC/5lslgxD4TZl86F3kstgews=
=w0q6
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 8 Mar 2022 10:42
Re: [PATCH v2 3/3] gnu: Add sysbench.
ec46dddfa7f5cb4aba5e5c47ccf26cc0a7464682.camel@telenet.be
Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
Toggle quote (5 lines)
> +                           (search-input-file inputs
> +                                              "xml/dtd/docbook/catalog.xml")
> +                           "\n")))


docbook-xml-4.1.2 is in native-inputs, not inputs, so this needs to be
(search-input-file (or native-inputs inputs) ...) such that 'search-
input-file' succeeds even when compiling natively.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYick6BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ik1AQCiviq37mICerYnWdK9taPB9wz+
6mZ6COOs08DphotUewD/cLcvtM56SlmRtNevKte291dv4Rp5xa2TmoGjWfy+5gM=
=G96z
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 8 Mar 2022 10:45
Re: [PATCH v2 2/3] gnu: Add ck.
5c45c324b79db0a56403c0e42787b28f61ebe02a.camel@telenet.be
Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
Toggle quote (21 lines)
> +              (define (gnu-triplet->machine target)
> +                (letrec-syntax
> +                    ((matches (syntax-rules (=>)
> +                                ((_ (target-prefix => machine) rest ...)
> +                                 (if (string-prefix? target-prefix target)
> +                                     machine
> +                                     (matches rest ...)))
> +                                ((_)
> +                                 (error "unsupported target" target)))))
> +                  ;; This basically reproduces the logic handling the
> +                  ;; PLATFORM variable in the configure script.
> +                  (matches ("x86_64"      => "x86_64")
> +                           ("i586"        => "x86")
> +                           ("i686"        => "x86")
> +                           ("aarch64"     => "aarch64")
> +                           ("arm"         => "arm")
> +                           ("ppc64"       => "ppc64")
> +                           ("ppc"         => "ppc")
> +                           ("s390x"       => "s390x")
> +                           ("sparc64"     => "sparcv9"))))

I would move this outside the build code, such that new targets can be
added without having to rebuild ck and dependents. Also, there are a
few 'target-foo?' procedures in (guix utils) that can be used here (if
it were moved outisde the build code).


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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiclqBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kNAAQDFg4aGUQhuHbvfn0vGIKtBQRh4
ZL9YpoI67rAeOO+0kwEA8AM+L6xH6+HUElZEN8m1in6W8sVFiklpKubJQVts5A8=
=39WQ
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 8 Mar 2022 10:49
712dcbb8d7b959015fed286ee65bb38c192af122.camel@telenet.be
Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
Toggle quote (6 lines)
> +              ;; The custom configure script doesn't make cross-compilation
> +              ;; adjustments itself, so manually set the archiver, compiler
> +              ;; and linker.  Even then, it is still broken and doesn't
> +              ;; actually build any binary (see:
> +              ;; https://github.com/concurrencykit/ck/issues/191).

Since cross-compilation is currently broken, I think it would be
acceptable to not attempt it in Guix, though I would like a nice
comment and error instead of silently producing the wrong binaries:

(when target
(error "ck is currently not cross-compilable"))

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYicmohccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kceAP9JzTYMlUEKkdFWq6oo3yNP/qz7
j/7eyBvLwpshscMNuwEA9oYAL2CksPZ6seyWitEcyv39IA+UqRemY7wSSCJAYwQ=
=TTyJ
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:36
[PATCH v3 1/4] gnu: docbook-xml-4.1.2: Install an XML catalog file.
(address . 54235@debbugs.gnu.org)
20220308143607.7449-1-maxim.cournoyer@gmail.com
* gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog
file.
[native-inputs]: Add libxml2.
---
gnu/packages/docbook.scm | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6575bf2d75..0a8d2e2aed 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
@@ -153,7 +153,8 @@ (define-public docbook-xml-4.2
"18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
(define-public docbook-xml-4.1.2
- (package (inherit docbook-xml)
+ (package
+ (inherit docbook-xml)
(version "4.1.2")
(source (origin
(method url-fetch)
@@ -167,13 +168,22 @@ (define-public docbook-xml-4.1.2
#:builder
(begin
(use-modules (guix build utils))
- (let ((source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
- (dtd (string-append (assoc-ref %outputs "out")
- "/xml/dtd/docbook")))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+ (xmlcatalog (string-append (assoc-ref %build-inputs "libxml2")
+ "/bin/xmlcatalog"))
+ (dtd (string-append (assoc-ref %outputs "out")
+ "/xml/dtd/docbook"))
+ (catalog.xml (string-append dtd "/catalog.xml")))
(mkdir-p dtd)
- (invoke unzip source "-d" dtd)))))))
+ (invoke unzip source "-d" dtd)
+ ;; Create a minimal XML catalog, to use with libxml2 tools.
+ (invoke xmlcatalog "--noout" "--create" catalog.xml)
+ (invoke xmlcatalog "--noout" "--add" "public"
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ (string-append dtd "/docbookx.dtd") catalog.xml)))))
+ (native-inputs (list libxml2 unzip))))
(define-public docbook-xsl
(package
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:36
[PATCH v3 2/4] utils: Add ar-for-target and ld-for-target procedures.
(address . 54235@debbugs.gnu.org)
20220308143607.7449-2-maxim.cournoyer@gmail.com
* guix/utils.scm (ar-for-target, ld-for-target): New procedures.
---
guix/utils.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (41 lines)
diff --git a/guix/utils.scm b/guix/utils.scm
index a0ca9b9070..44c46cb4a9 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -99,8 +99,10 @@ (define-module (guix utils)
target-powerpc?
target-riscv64?
target-64bit?
+ ar-for-target
cc-for-target
cxx-for-target
+ ld-for-target
pkg-config-for-target
version-compare
@@ -715,6 +717,11 @@ (define* (target-64bit? #:optional (system (or (%current-target-system)
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64"
"powerpc64" "riscv64")))
+(define* (ar-for-target #:optional (target (%current-target-system)))
+ (if target
+ (string-append target "-ar")
+ "ar"))
+
(define* (cc-for-target #:optional (target (%current-target-system)))
(if target
(string-append target "-gcc")
@@ -725,6 +732,11 @@ (define* (cxx-for-target #:optional (target (%current-target-system)))
(string-append target "-g++")
"g++"))
+(define* (ld-for-target #:optional (target (%current-target-system)))
+ (if target
+ (string-append target "-ld")
+ "ld"))
+
(define* (pkg-config-for-target #:optional (target (%current-target-system)))
(if target
(string-append target "-pkg-config")
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:36
[PATCH v3 3/4] gnu: Add ck.
(address . 54235@debbugs.gnu.org)
20220308143607.7449-3-maxim.cournoyer@gmail.com
* gnu/packages/c.scm (ck): New variable.
---
gnu/packages/c.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)

Toggle diff (98 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index e53a7c865f..d545d98938 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages c)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix store)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootstrap)
@@ -896,6 +897,83 @@ (define-public aws-c-mqtt
(home-page "https://github.com/awslabs/aws-c-mqtt")
(license license:asl2.0)))
+;;; Factored out of the ck package so that it can be adjusted and called on
+;;; the host side easily, without impacting the package definition.
+(define (gnu-triplet->ck-machine target)
+ (letrec-syntax
+ ((matches (syntax-rules (=>)
+ ((_ (target-prefix => machine) rest ...)
+ (if (string-prefix? target-prefix target)
+ machine
+ (matches rest ...)))
+ ((_)
+ (error "unsupported target" target)))))
+ ;; This basically reproduces the logic handling the
+ ;; PLATFORM variable in the configure script of ck.
+ (matches ("x86_64" => "x86_64")
+ ("i586" => "x86")
+ ("i686" => "x86")
+ ("aarch64" => "aarch64")
+ ("arm" => "arm")
+ ("ppc64" => "ppc64")
+ ("ppc" => "ppc")
+ ("s390x" => "s390x")
+ ("sparc64" => "sparcv9"))))
+
+(define-public ck
+ (package
+ (name "ck")
+ (version "0.7.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/concurrencykit/ck")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ ;; ck uses a custom configure script that stumbles on
+ ;; '--enable-fast-install', among other things.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (define target-machine #$(and=> (%current-target-system)
+ gnu-triplet->ck-machine))
+ (when target-machine
+ ;; The configure script doesn't currently work for
+ ;; cross-compiling (see:
+ ;; https://github.com/concurrencykit/ck/issues/191).
+ (error "ck cannot currently be cross-compiled"))
+ ;; The custom configure script doesn't make cross-compilation
+ ;; adjustments itself, so manually set the archiver, compiler
+ ;; and linker.
+ (setenv "AR" #$(ar-for-target))
+ (setenv "CC" #$(cc-for-target))
+ (setenv "LD" #$(ld-for-target))
+ (apply invoke "./configure"
+ `(,@(if target-machine
+ (list (string-append "--profile=" target-machine))
+ '())
+ ,(string-append "--prefix=" #$output)
+ ,(string-append "--mandir=" #$output "/share/man")
+ ,(string-append "--cores="
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")))))))))
+ (home-page "https://github.com/concurrencykit/ck")
+ (synopsis "C library for concurrent systems")
+ (description "Concurrency Kit (@code{ck}) provides concurrency primitives,
+safe memory reclamation mechanisms and non-blocking (including lock-free) data
+structures designed to aid in the research, design and implementation of high
+performance concurrent systems developed in C99+.")
+ (license (list license:bsd-2 ;everything except...
+ license:asl2.0)))) ;src/ck_hp.c
+
(define-public utf8-h
;; The latest tag is used as there is no release.
(let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734")
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:36
[PATCH v3 4/4] gnu: Add sysbench.
(address . 54235@debbugs.gnu.org)
20220308143607.7449-4-maxim.cournoyer@gmail.com
* gnu/packages/benchmark.scm (sysbench): New variable.
---
gnu/packages/benchmark.scm | 139 +++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)

Toggle diff (169 lines)
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index eb5df3d4c3..0277c9e7b9 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -37,19 +37,27 @@ (define-module (gnu packages benchmark)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages xml)
#:use-module (ice-9 match))
(define-public fio
@@ -430,3 +438,134 @@ (define-public kdiskmark
@item Report generation.
@end itemize")
(license license:gpl3+)))
+
+(define-public sysbench
+ (package
+ (name "sysbench")
+ (version "1.0.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/akopytov/sysbench")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Ensure no bundled libraries get used.
+ (delete-file-recursively "third_party")
+ (substitute* "configure.ac"
+ (("^third_party/.*")
+ ""))
+ (substitute* "Makefile.am"
+ ((".*(LUAJIT|CK)_DIR =.*")
+ ""))))
+ (sha256
+ (base32
+ "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "--with-pgsql"
+ ;; Explicitly specify the library directory of
+ ;; MySQL, otherwise `mysql_config` gets
+ ;; consulted and adds unnecessary link
+ ;; directives.
+ (string-append "--with-mysql-libs="
+ #$(this-package-input "mysql")
+ "/lib")
+ "--with-system-luajit"
+ "--with-system-ck"
+ ;; If we let the build tool select the most
+ ;; optimal compiler architecture flag, the
+ ;; build is not reproducible.
+ "--without-gcc-arch")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-test-runner
+ (lambda _
+ (substitute* "tests/test_run.sh"
+ (("/bin/bash")
+ (which "bash"))
+ ;; Do not attempt to invoke the cram command via
+ ;; Python, as on Guix it is a shell script (wrapper).
+ (("\\$\\(command -v cram\\)")
+ "-m cram"))))
+ (add-after 'unpack 'disable-test-installation
+ (lambda _
+ (substitute* "tests/Makefile.am"
+ (("install-data-local")
+ "do-not-install-data-local")
+ (("^test_SCRIPTS.*")
+ ""))))
+ (add-after 'unpack 'fix-docbook
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (substitute* "m4/ax_check_docbook.m4"
+ (("DOCBOOK_ROOT=.*" all)
+ (string-append
+ all "XML_CATALOG="
+ (search-input-file (or native-inputs inputs)
+ "xml/dtd/docbook/catalog.xml")
+ "\n")))
+ (substitute* "doc/xsl/xhtml.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/docbook.xsl")
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/docbook.xsl"))))
+ (substitute* "doc/xsl/xhtml-chunk.xsl"
+ (("http://docbook.sourceforge.net/release/xsl\
+/current/xhtml/chunk.xsl")
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version docbook-xsl)
+ "/xhtml/chunk.xsl")))))))))
+ (native-inputs (list autoconf
+ automake
+ libtool
+ pkg-config
+ python-cram
+ python-wrapper
+ which
+ ;; For documentation
+ libxml2 ;for XML_CATALOG_FILES
+ libxslt
+ docbook-xml-4.1.2
+ docbook-xsl))
+ (inputs (list ck libaio luajit mysql postgresql))
+ (home-page "https://github.com/akopytov/sysbench/")
+ (synopsis "Scriptable database and system performance benchmark")
+ (description "@command{sysbench} is a scriptable multi-threaded benchmark
+tool based on LuaJIT. It is most frequently used for database benchmarks, but
+can also be used to create arbitrarily complex workloads that do not involve a
+database server. @command{sysbench} comes with the following bundled
+benchmarks:
+@table @file
+@item oltp_*.lua
+A collection of OLTP-like database benchmarks.
+@item fileio
+A filesystem-level benchmark.
+@item cpu
+A simple CPU benchmark.
+@item memory
+A memory access benchmark.
+@item threads
+A thread-based scheduler benchmark.
+@item mutex
+A POSIX mutex benchmark.
+@end table
+It includes features such as:
+@itemize
+@item
+Extensive statistics about rate and latency is available, including latency
+percentiles and histograms.
+@item
+Low overhead even with thousands of concurrent threads. @command{sysbench} is
+capable of generating and tracking hundreds of millions of events per second.
+@item
+New benchmarks can be easily created by implementing pre-defined hooks in
+user-provided Lua scripts.
+@item
+@end itemize")
+ (license license:gpl2+)))
--
2.34.0
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:36
Re: [PATCH v2 2/3] gnu: Add ck.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87pmmwtss6.fsf@gmail.com
Hi Maxime,
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (10 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
>> +              ;; TODO: Move AR-FOR-TARGET and LD-FOR-TARGET to (guix utils).
>> +              (define* (ar-for-target #:optional (target #$(%current-target-system)))
>> +                (if target
>> +                    (string-append target "-ar")
>> +                    "ar"))
>
> I'm wondering, why not just do this now (in a separate patch)?
> (guix utils) isn't (guix build utils), there are no rebuilding
> concerns.
Indeed. Done in v3.
Thanks!
Maxim
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:38
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87lexktsqd.fsf@gmail.com
Hi,
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (24 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
>> +              (define (gnu-triplet->machine target)
>> +                (letrec-syntax
>> +                    ((matches (syntax-rules (=>)
>> +                                ((_ (target-prefix => machine) rest ...)
>> +                                 (if (string-prefix? target-prefix target)
>> +                                     machine
>> +                                     (matches rest ...)))
>> +                                ((_)
>> +                                 (error "unsupported target" target)))))
>> +                  ;; This basically reproduces the logic handling the
>> +                  ;; PLATFORM variable in the configure script.
>> +                  (matches ("x86_64"      => "x86_64")
>> +                           ("i586"        => "x86")
>> +                           ("i686"        => "x86")
>> +                           ("aarch64"     => "aarch64")
>> +                           ("arm"         => "arm")
>> +                           ("ppc64"       => "ppc64")
>> +                           ("ppc"         => "ppc")
>> +                           ("s390x"       => "s390x")
>> +                           ("sparc64"     => "sparcv9"))))
>
> I would move this outside the build code, such that new targets can be
> added without having to rebuild ck and dependents.
Done!
Toggle quote (2 lines)
> Also, there are a few 'target-foo?' procedures in (guix utils) that can be used here (if
> it were moved outisde the build code).
I left the code as-is, as it seemed more uniform this way.
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:38
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87h788tspt.fsf@gmail.com
Hi,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (16 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
>> +              ;; The custom configure script doesn't make cross-compilation
>> +              ;; adjustments itself, so manually set the archiver, compiler
>> +              ;; and linker.  Even then, it is still broken and doesn't
>> +              ;; actually build any binary (see:
>> +              ;; https://github.com/concurrencykit/ck/issues/191).
>
> Since cross-compilation is currently broken, I think it would be
> acceptable to not attempt it in Guix, though I would like a nice
> comment and error instead of silently producing the wrong binaries:
>
> (when target
> ;; See <https://github.com/concurrencykit/ck/issues/191>
> ;; and <https://issues.guix.gnu.org/54235>.
> (error "ck is currently not cross-compilable"))

I agree. Done!

Maxim
M
M
Maxim Cournoyer wrote on 8 Mar 2022 15:39
Re: [PATCH v2 3/3] gnu: Add sysbench.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235@debbugs.gnu.org)
87cziwtsnq.fsf@gmail.com
Hi,
Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (9 lines)
> Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
>> +                           (search-input-file inputs
>> +                                              "xml/dtd/docbook/catalog.xml")
>> +                           "\n")))
>
>
> docbook-xml-4.1.2 is in native-inputs, not inputs, so this needs to be
> (search-input-file (or native-inputs inputs) ...) such that 'search-
> input-file' succeeds even when compiling natively.
Oops! Good catch. I'd be nice to have all this cross-compilation
gotchas and knowledge captured in a node under 'Contributing'; I keep
forgetting, and I'm sure I'm not alone :-).
Maxim
M
M
Maxime Devos wrote on 8 Mar 2022 18:27
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 54235@debbugs.gnu.org)
fdfada804d260120d344035deab64328fe5360ee.camel@telenet.be
Maxim Cournoyer schreef op di 08-03-2022 om 09:39 [-0500]:
Toggle quote (17 lines)
> > Maxim Cournoyer schreef op ma 07-03-2022 om 23:38 [-0500]:
> > > +                           (search-input-file inputs
> > > +                                             
> > > "xml/dtd/docbook/catalog.xml")
> > > +                           "\n")))
> >
> >
> > docbook-xml-4.1.2 is in native-inputs, not inputs, so this needs to
> > be
> > (search-input-file (or native-inputs inputs) ...) such that
> > 'search-
> > input-file' succeeds even when compiling natively.
>
> Oops!  Good catch.  I'd be nice to have all this cross-compilation
> gotchas and knowledge captured in a node under 'Contributing'; I keep
> forgetting, and I'm sure I'm not alone :-).

FWIW, I've seen a few similar issues with docbook in the past (*)
and it should be feasible to write a linter for these kind of
inputs/native-inputs+docbook issues -- the 'wrapper-inputs' linter
(which checks that 'bash/bash-minimal' is in the inputs whenever
'wrap-program' is used) might be a good starting point.

This also seems like something (guix scripts style) could be taught to
automatically correct but I'm not familiar with that part of Guix.

(*) If I do 'git grep -F xml/dtd/docbook' and select a few cases, I see
quite a few suspicious uses ...

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYieR8hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ldZAQC7EYrx2CxZb6iBtv1/vvJAyUz5
cDFBeLgUCYAkucBjXAD/XA6jEJYTi+2wHyYml4yTIkuUT9ktBUKXz1PyqcFWvQQ=
=CrkR
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 18 Mar 2022 06:38
Re: bug#54235: [PATCH 0/3] Add sysbench.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54235-done@debbugs.gnu.org)
871qyz6cri.fsf_-_@gmail.com
Hello!

As discussed some time ago on #guix, you were OK with this series with
in its last revision.

I've pushed the change to docbook-xml-4.1.2 to core-updates, and the
rest to master, after noting that it would build with 'docbook-xml' just
fine.

Thanks for the review!

Closing.

Maxim
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 54235
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