Package: guix-patches;
Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Date: Thu, 3 Mar 2022 13:54:01 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54235 in the body.
You can then email your comments to 54235 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 13:54:01 GMT) Full text and rfc822 format available.Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:guix-patches <at> gnu.org
.
(Thu, 03 Mar 2022 13:54:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: guix-patches <at> gnu.org Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 0/3] Add sysbench. Date: Thu, 3 Mar 2022 08:53:26 -0500
Hello Guix! This small series adds sysbench, which is supposed to be a simpler alternative to fio. You can try it like so: --8<---------------cut here---------------start------------->8--- $ 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 --8<---------------cut here---------------end--------------->8--- 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 14:07:02 GMT) Full text and rfc822 format available.Message #8 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file. Date: Thu, 3 Mar 2022 09:05:56 -0500
* 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(-) 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 <at> gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr> ;;; Copyright © 2020 Marius Bakke <marius <at> gnu.org> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> ;;; Copyright © 2021 Mark H Weaver <mhw <at> netris.org> ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il> ;;; Copyright © 2021 Andrew Whatson <whatson <at> 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 14:07:02 GMT) Full text and rfc822 format available.Message #11 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 2/3] gnu: Add ck. Date: Thu, 3 Mar 2022 09:05:57 -0500
* gnu/packages/c.scm (ck): New variable. --- gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 14:07:03 GMT) Full text and rfc822 format available.Message #14 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 3/3] gnu: Add sysbench. Date: Thu, 3 Mar 2022 09:05:58 -0500
* gnu/packages/benchmark.scm (sysbench): New variable. --- gnu/packages/benchmark.scm | 140 ++++++++++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) 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 <at> gnu.org> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com> ;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes <at> gmail.com> -;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> ;;; Copyright © 2020 Greg Hogan <code <at> greghogan.com> ;;; Copyright © 2021 Arun Isaac <arunisaac <at> 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 16:43:02 GMT) Full text and rfc822 format available.Message #17 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 3/3] gnu: Add sysbench. Date: Thu, 03 Mar 2022 17:42:31 +0100
[Message part 1 (text/plain, inline)]
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. Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Thu, 03 Mar 2022 16:56:01 GMT) Full text and rfc822 format available.Message #20 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck. Date: Thu, 03 Mar 2022 17:55:26 +0100
[Message part 1 (text/plain, inline)]
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). 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.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Mon, 07 Mar 2022 18:58:01 GMT) Full text and rfc822 format available.Message #23 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck. Date: Mon, 07 Mar 2022 13:57:33 -0500
Hi Maxime, Maxime Devos <maximedevos <at> telenet.be> writes: > 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 > 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). > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Mon, 07 Mar 2022 19:00:02 GMT) Full text and rfc822 format available.Message #26 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 3/3] gnu: Add sysbench. Date: Mon, 07 Mar 2022 13:59:08 -0500
Hi Maxime, Maxime Devos <maximedevos <at> telenet.be> writes: > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Mon, 07 Mar 2022 20:58:01 GMT) Full text and rfc822 format available.Message #29 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck. Date: Mon, 07 Mar 2022 21:57:35 +0100
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 01:48:02 GMT) Full text and rfc822 format available.Message #32 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck. Date: Mon, 07 Mar 2022 20:47:08 -0500
Hi Maxime, Maxime Devos <maximedevos <at> telenet.be> writes: > 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: --8<---------------cut here---------------start------------->8--- $ 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 --8<---------------cut here---------------end--------------->8--- I'll be sending a V2 once I've fixed cross-compilation. Another -1 for custom/borked configure script, eh! Thanks, Maxim
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 04:08:02 GMT) Full text and rfc822 format available.Message #35 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck. Date: Mon, 07 Mar 2022 23:06:52 -0500
Hi Maxime, Maxime Devos <maximedevos <at> telenet.be> writes: > 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: --8<---------------cut here---------------start------------->8--- 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, --8<---------------cut here---------------end--------------->8--- But due to the test setting COMPILER failing, it doesn't set any ALL_LIBS and thus doesn't build anything (see: https://github.com/concurrencykit/ck/issues/191). 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 04:39:01 GMT) Full text and rfc822 format available.Message #38 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v2 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file. Date: Mon, 7 Mar 2022 23:38:07 -0500
* 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(-) 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 <at> gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr> ;;; Copyright © 2020 Marius Bakke <marius <at> gnu.org> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> ;;; Copyright © 2021 Mark H Weaver <mhw <at> netris.org> ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il> ;;; Copyright © 2021 Andrew Whatson <whatson <at> 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 04:39:02 GMT) Full text and rfc822 format available.Message #41 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v2 2/3] gnu: Add ck. Date: Mon, 7 Mar 2022 23:38:08 -0500
* gnu/packages/c.scm (ck): New variable. --- gnu/packages/c.scm | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 04:39:02 GMT) Full text and rfc822 format available.Message #44 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v2 3/3] gnu: Add sysbench. Date: Mon, 7 Mar 2022 23:38:09 -0500
* gnu/packages/benchmark.scm (sysbench): New variable. --- gnu/packages/benchmark.scm | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 09:40:01 GMT) Full text and rfc822 format available.Message #47 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 10:39:19 +0100
[Message part 1 (text/plain, inline)]
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. Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 09:43:01 GMT) Full text and rfc822 format available.Message #50 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 3/3] gnu: Add sysbench. Date: Tue, 08 Mar 2022 10:42:00 +0100
[Message part 1 (text/plain, inline)]
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. Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 09:46:02 GMT) Full text and rfc822 format available.Message #53 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 10:45:12 +0100
[Message part 1 (text/plain, inline)]
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. 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.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 09:50:02 GMT) Full text and rfc822 format available.Message #56 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 10:49:22 +0100
[Message part 1 (text/plain, inline)]
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")) Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:37:02 GMT) Full text and rfc822 format available.Message #59 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v3 1/4] gnu: docbook-xml-4.1.2: Install an XML catalog file. Date: Tue, 8 Mar 2022 09:36:04 -0500
* 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(-) 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 <at> gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr> ;;; Copyright © 2020 Marius Bakke <marius <at> gnu.org> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> ;;; Copyright © 2021 Mark H Weaver <mhw <at> netris.org> ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il> ;;; Copyright © 2021 Andrew Whatson <whatson <at> 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:37:02 GMT) Full text and rfc822 format available.Message #62 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v3 2/4] utils: Add ar-for-target and ld-for-target procedures. Date: Tue, 8 Mar 2022 09:36:05 -0500
* guix/utils.scm (ar-for-target, ld-for-target): New procedures. --- guix/utils.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:37:03 GMT) Full text and rfc822 format available.Message #65 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v3 3/4] gnu: Add ck. Date: Tue, 8 Mar 2022 09:36:06 -0500
* gnu/packages/c.scm (ck): New variable. --- gnu/packages/c.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:37:03 GMT) Full text and rfc822 format available.Message #68 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: 54235 <at> debbugs.gnu.org Cc: maximedevos <at> telenet.be, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH v3 4/4] gnu: Add sysbench. Date: Tue, 8 Mar 2022 09:36:07 -0500
* gnu/packages/benchmark.scm (sysbench): New variable. --- gnu/packages/benchmark.scm | 139 +++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:38:01 GMT) Full text and rfc822 format available.Message #71 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 09:36:57 -0500
Hi Maxime, Maxime Devos <maximedevos <at> telenet.be> writes: > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:39:02 GMT) Full text and rfc822 format available.Message #74 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 09:38:02 -0500
Hi, Maxime Devos <maximedevos <at> telenet.be> writes: > 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! > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:39:02 GMT) Full text and rfc822 format available.Message #77 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 2/3] gnu: Add ck. Date: Tue, 08 Mar 2022 09:38:22 -0500
Hi, Maxime Devos <maximedevos <at> telenet.be> writes: > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 14:40:02 GMT) Full text and rfc822 format available.Message #80 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 3/3] gnu: Add sysbench. Date: Tue, 08 Mar 2022 09:39:37 -0500
Hi, Maxime Devos <maximedevos <at> telenet.be> writes: > 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
guix-patches <at> gnu.org
:bug#54235
; Package guix-patches
.
(Tue, 08 Mar 2022 17:28:01 GMT) Full text and rfc822 format available.Message #83 received at 54235 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 54235 <at> debbugs.gnu.org Subject: Re: [PATCH v2 3/3] gnu: Add sysbench. Date: Tue, 08 Mar 2022 18:27:14 +0100
[Message part 1 (text/plain, inline)]
Maxim Cournoyer schreef op di 08-03-2022 om 09:39 [-0500]: > > 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
[signature.asc (application/pgp-signature, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:Message #88 received at 54235-done <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 54235-done <at> debbugs.gnu.org Subject: Re: bug#54235: [PATCH 0/3] Add sysbench. Date: Fri, 18 Mar 2022 01:38:41 -0400
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
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Fri, 15 Apr 2022 11:24:07 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.