* [bug#54165] [PATCH] gnu: guile-bytestructures: Update to 2.0.1.
@ 2022-02-25 20:51 Taylan Kammer
2022-03-01 11:38 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Taylan Kammer @ 2022-02-25 20:51 UTC (permalink / raw)
To: 54165
* gnu/packages/guile.scm (guile-bytestructures): Update to 2.0.1.
Although the major version number is increased due to a small API-breaking
change, all packages that depend on guile-bytestructures still build fine and
pass their test suite if they have one, so it should not be necessary to
create a bytestructures-2.0 package.
The breaking change is that bs:pointer would previously implicitly dereference
the pointer when any index other than '* was provided, whereas in this version
the dereference must be explicit, and can be '* or an integer that represents
an offset from the pointer address a la *(ptr + i) in C.
---
gnu/packages/guile.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f74a389da5..1ac1690455 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -746,7 +746,7 @@ Guile's foreign function interface.")
(define-public guile-bytestructures
(package
(name "guile-bytestructures")
- (version "1.0.10")
+ (version "2.0.1")
(home-page "https://github.com/TaylanUB/scheme-bytestructures")
(source (origin
(method git-fetch)
@@ -756,7 +756,7 @@ Guile's foreign function interface.")
(file-name (git-file-name name version))
(sha256
(base32
- "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk"))))
+ "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#54165] [PATCH] gnu: guile-bytestructures: Update to 2.0.1.
2022-02-25 20:51 [bug#54165] [PATCH] gnu: guile-bytestructures: Update to 2.0.1 Taylan Kammer
@ 2022-03-01 11:38 ` Ludovic Courtès
2024-06-07 13:44 ` [bug#54165] [PATCH v2 1/2] " Felix Lechner via Guix-patches via
2024-06-07 13:44 ` [bug#54165] [PATCH v2 2/2] gnu: guile-bytestructures: add patch. (Closes: #54165) Felix Lechner via Guix-patches via
0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2022-03-01 11:38 UTC (permalink / raw)
To: Taylan Kammer; +Cc: 54165
Hi,
Taylan Kammer <taylan.kammer@gmail.com> skribis:
> * gnu/packages/guile.scm (guile-bytestructures): Update to 2.0.1.
>
> Although the major version number is increased due to a small API-breaking
> change, all packages that depend on guile-bytestructures still build fine and
> pass their test suite if they have one, so it should not be necessary to
> create a bytestructures-2.0 package.
>
> The breaking change is that bs:pointer would previously implicitly dereference
> the pointer when any index other than '* was provided, whereas in this version
> the dereference must be explicit, and can be '* or an integer that represents
> an offset from the pointer address a la *(ptr + i) in C.
Since it’s an indirect dependency of Guix, I tested a bit more
thoroughly than for other packages.
While running this:
./pre-inst-env guix build guile-git -s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux
I got this test failure on i686-linux:
--8<---------------cut here---------------start------------->8---
starting phase `check'
./pre-inst-env \
/gnu/store/pihshjqc5x3k8yhdp1nvkgwiifyxin4v-guile-3.0.7/bin/guile --no-auto-compile \
./run-tests.guile.scm
Backtrace:
7 (primitive-load "/tmp/guix-build-guile-bytestructures-2…")
In ice-9/eval.scm:
619:8 6 (_ #f)
In ice-9/boot-9.scm:
142:2 5 (dynamic-wind #<procedure 8fca850 at ice-9/eval.scm:33…> …)
142:2 4 (dynamic-wind #<procedure 883d3b0 at ice-9/eval.scm:33…> …)
In ice-9/eval.scm:
619:8 3 (_ #(#(#<directory (guile-user) 8194690>)))
In ice-9/boot-9.scm:
142:2 2 (dynamic-wind #<procedure 8845110 at ice-9/eval.scm:33…> …)
In ice-9/eval.scm:
619:8 1 (_ #(#(#(#<directory (guile-user) 8194690>)) #<variab…>))
In unknown file:
0 (bytevector-u64-native-set! #vu8(0 0 0 0 0 0 0 0 65 1 …) …)
ERROR: In procedure bytevector-u64-native-set!:
In procedure bytevector-u64-native-set!: Value out of range: 8
%%%% Starting test bytestructures (Writing full log to "bytestructures.log")
run-tests.body.scm:194: FAIL ref1
make: *** [Makefile:779: check] Error 1
Test suite failed, dumping logs.
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("check" "-j" "8" "GUILE_AUTO_COMPILE=0") exit-status: 2 term-signal: #f stop-signal: #f>
phase `check' failed after 1.1 seconds
command "make" "check" "-j" "8" "GUILE_AUTO_COMPILE=0" failed with status 2
builder for `/gnu/store/xkbc6a6jlg9r1lkma6zw8lfmprfsfkqw-guile-bytestructures-2.0.1.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---
With:
./pre-inst-env guix build -v1 guile-drmaa nyacc nyacc@1.00 guile-lzma
I got this nyacc test failure:
--8<---------------cut here---------------start------------->8---
GUILE_LOAD_PATH=/tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/module GUILE_LOAD_COMPILED_PATH=/tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/module \
/tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/etc/guild compile -o system/ffi-help-rt.go system/ffi-help-rt.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/etc/guild
;;; WARNING: compilation of /tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/etc/guild failed:
;;; failed to create path for auto-compiled file "/tmp/guix-build-nyacc-1.00.2.drv-0/nyacc-1.00.2/etc/guild"
Backtrace:
In system/base/target.scm:
65:6 19 (with-target _ _)
In system/base/compile.scm:
187:6 18 (compile-file "system/ffi-help-rt.scm" #:output-file _ # …)
53:4 17 (call-with-output-file/atomic _ _ _)
In ice-9/boot-9.scm:
1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
In system/base/compile.scm:
69:11 15 (_)
190:11 14 (_ #<closed: file 7fffedfe4150>)
331:39 13 (read-and-compile #<input: system/ffi-help-rt.scm 15> # …)
261:27 12 (_ _ _)
In ice-9/boot-9.scm:
2835:4 11 (save-module-excursion #<procedure 7fffee7e3c00 at lang…>)
In language/scheme/compile-tree-il.scm:
31:15 10 (_)
In ice-9/psyntax.scm:
1230:36 9 (expand-top-sequence (#<syntax:ffi-help-rt.scm:20:0 (…>) …)
1222:19 8 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
259:10 7 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #)
In ice-9/eval.scm:
293:34 6 (_ #<module (#{ g100}#) 7fffee85c280>)
In ice-9/boot-9.scm:
3409:4 5 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
2594:24 4 (call-with-deferred-observers #<procedure 7fffefc7b1e0 …>)
3422:24 3 (_)
222:17 2 (map1 (((bytestructures guile)) ((bytestructures # …)) …))
3329:6 1 (resolve-interface (bytestructures guile) #:select _ # _ …)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
no code for module (bytestructures guile)
make[1]: *** [Makefile:93: system/ffi-help-rt.go] Error 1
[…]
@ build-failed /gnu/store/qsnsix75inib689w6yr7a335xch13wk0-nyacc-1.00.2.drv - 1 builder for `/gnu/store/qsnsix75inib689w6yr7a335xch13wk0-nyacc-1.00.2.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---
Could you take a look?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#54165] [PATCH v2 1/2] gnu: guile-bytestructures: Update to 2.0.1.
2022-03-01 11:38 ` Ludovic Courtès
@ 2024-06-07 13:44 ` Felix Lechner via Guix-patches via
2024-08-20 19:11 ` [bug#54165] Update guile-bytestructures to 2.0.2 Vagrant Cascadian
2024-06-07 13:44 ` [bug#54165] [PATCH v2 2/2] gnu: guile-bytestructures: add patch. (Closes: #54165) Felix Lechner via Guix-patches via
1 sibling, 1 reply; 5+ messages in thread
From: Felix Lechner via Guix-patches via @ 2024-06-07 13:44 UTC (permalink / raw)
To: 54165; +Cc: Ludovic Courtès, Taylan Kammer, Ludovic Courtès
From: Taylan Kammer <taylan.kammer@gmail.com>
* gnu/packages/guile.scm (guile-bytestructures): Update to 2.0.1.
Although the major version number is increased due to a small API-breaking
change, all packages that depend on guile-bytestructures still build fine and
pass their test suite if they have one, so it should not be necessary to
create a bytestructures-2.0 package.
The breaking change is that bs:pointer would previously implicitly dereference
the pointer when any index other than '* was provided, whereas in this version
the dereference must be explicit, and can be '* or an integer that represents
an offset from the pointer address a la *(ptr + i) in C.
---
gnu/packages/guile.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index e8705dc7d2..0bbd4a12ad 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -786,7 +786,7 @@ (define-public guile2.2-sqlite3
(define-public guile-bytestructures
(package
(name "guile-bytestructures")
- (version "1.0.10")
+ (version "2.0.1")
(home-page "https://github.com/TaylanUB/scheme-bytestructures")
(source (origin
(method git-fetch)
@@ -796,7 +796,7 @@ (define-public guile-bytestructures
(file-name (git-file-name name version))
(sha256
(base32
- "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk"))))
+ "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
base-commit: 580d77d0fb12448ef1621699cc0c56e787e2aadb
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#54165] [PATCH v2 2/2] gnu: guile-bytestructures: add patch. (Closes: #54165)
2022-03-01 11:38 ` Ludovic Courtès
2024-06-07 13:44 ` [bug#54165] [PATCH v2 1/2] " Felix Lechner via Guix-patches via
@ 2024-06-07 13:44 ` Felix Lechner via Guix-patches via
1 sibling, 0 replies; 5+ messages in thread
From: Felix Lechner via Guix-patches via @ 2024-06-07 13:44 UTC (permalink / raw)
To: 54165
Cc: Ludovic Courtès, Taylan Kammer, Felix Lechner,
Ludovic Courtès
Adds the patch from a pull request recently submitted upstream. [1] The
maintainer has not responded yet, so there could be further updates as time
goes on.
With this commit, nyacc 1.08.1 builds successfully..
[1] https://github.com/TaylanUB/scheme-bytestructures/pull/48
Change-Id: I8cd248e6e33efd36f54ca3b31c17badf54a863c5
---
gnu/packages/guile.scm | 3 +-
.../guile-bytestructures-fix-54165.patch | 92 +++++++++++++++++++
2 files changed, 94 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/guile-bytestructures-fix-54165.patch
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 0bbd4a12ad..f7ef0dceff 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -796,7 +796,8 @@ (define-public guile-bytestructures
(file-name (git-file-name name version))
(sha256
(base32
- "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss"))))
+ "1gnh3p2042cch1nkapl0p4pv20q7qs8cxvvbp7a5h1dwqbrkdyss"))
+ (patches (search-patches "guile-bytestructures-fix-54165.patch"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
diff --git a/gnu/packages/patches/guile-bytestructures-fix-54165.patch b/gnu/packages/patches/guile-bytestructures-fix-54165.patch
new file mode 100644
index 0000000000..b91ca36df4
--- /dev/null
+++ b/gnu/packages/patches/guile-bytestructures-fix-54165.patch
@@ -0,0 +1,92 @@
+From 5082cdd2529f13286509a525a28f9d9917456fc1 Mon Sep 17 00:00:00 2001
+From: Felix Lechner <felix.lechner@lease-up.com>
+Date: Fri, 7 Jun 2024 04:51:17 -0700
+Subject: [PATCH] Fix alignment in unpacked structs containing unions. (Closes:
+ #47)
+
+The 2.0.1 release suffered from a test failure [1] that caused some
+distributions to disable the test [2] but the underlying cause had yet
+to be identified.
+
+Based on a preliminary review of the code, the author of this commit
+believes there was a surplus line in the code [3] which is deleted
+here. This is the proposed evidence: The line shadowed the
+'alignment' variable in line immediately above it. [4] Then, the same
+expression was used two lines down below. [5] In combination, the line
+being removed here seems to have been left over from editing under
+time pressure. It may also have been added inadvertently.
+
+On GNU Guix, this commit fixes the 'ref1' test for aligned struct
+bytestructures containing union members, which was referenced via
+"run-tests.body.scm:194: FAIL ref1" in Ludo's original report. [6] The
+test output can be found at the bottom of this message.
+
+This commit closes Github issue #47. [7]
+
+[1] https://issues.guix.gnu.org/54165#1
+[2] https://github.com/alpinelinux/aports/commit/2d8604645ca38552343c61fbc65728a2881e6ddd
+[3] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L110
+[4] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L109
+[5] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/bytestructures/body/struct.scm#L112
+[6] https://github.com/TaylanUB/scheme-bytestructures/blob/a6d5d25b26c0c5ef1f5fa38e2472fbf6a32cdf89/run-tests.body.scm#L194
+[7] https://github.com/TaylanUB/scheme-bytestructures/issues/47
+
+* * *
+
+Group begin: aligned
+Test begin:
+ test-name: "ref1"
+ source-file: "run-tests.body.scm"
+ source-line: 194
+ source-form: (test-eqv "ref1" 321 (bytestructure-ref bs (quote a)))
+Test end:
+ result-kind: pass
+ actual-value: 321
+ expected-value: 321
+Test begin:
+ test-name: "ref2"
+ source-file: "run-tests.body.scm"
+ source-line: 196
+ source-form: (test-eqv "ref2" 456 (bytestructure-ref bs (quote b)))
+Test end:
+ result-kind: pass
+ actual-value: 456
+ expected-value: 456
+Test begin:
+ test-name: "set1"
+ source-file: "run-tests.body.scm"
+ source-line: 197
+ source-form: (test-eqv "set1" 789 (begin (bytestructure-set! bs (quote a) 789) (bytestructure-ref bs (quote a))))
+Test end:
+ result-kind: pass
+ actual-value: 789
+ expected-value: 789
+Test begin:
+ test-name: "set2"
+ source-file: "run-tests.body.scm"
+ source-line: 199
+ source-form: (test-eqv "set2" 987 (begin (bytestructure-set! bs (quote b) 987) (bytestructure-ref bs (quote b))))
+Test end:
+ result-kind: pass
+ actual-value: 987
+ expected-value: 987
+Group end: aligned
+---
+ bytestructures/body/struct.scm | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/bytestructures/body/struct.scm b/bytestructures/body/struct.scm
+index 07797b5..0113a17 100644
+--- a/bytestructures/body/struct.scm
++++ b/bytestructures/body/struct.scm
+@@ -107,7 +107,6 @@
+ (let ((descriptor (cadr field-spec)))
+ (bytestructure-descriptor-size descriptor)))
+ (let* ((alignment (apply max (map field-spec-alignment field-specs)))
+- (alignment (pack-alignment pack alignment))
+ (size (apply max (map field-spec-size field-specs)))
+ (position (align position size (pack-alignment pack alignment))))
+ (let loop ((field-specs field-specs)
+--
+2.41.0
+
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#54165] Update guile-bytestructures to 2.0.2.
2024-06-07 13:44 ` [bug#54165] [PATCH v2 1/2] " Felix Lechner via Guix-patches via
@ 2024-08-20 19:11 ` Vagrant Cascadian
0 siblings, 0 replies; 5+ messages in thread
From: Vagrant Cascadian @ 2024-08-20 19:11 UTC (permalink / raw)
To: 54165; +Cc: Ludovic Courtès, Taylan Kammer, Felix Lechner
[-- Attachment #1.1: Type: text/plain, Size: 435 bytes --]
The attached patch updates to guile-bytestructures 2.0.2.
I am not sure if the other previously suggested changes are still
needed; I did successfully build most of the packages listed by "guix
refresh --list-dependent" other than guix-jupyter... though I only
tested on x86_64. Hopefully QA picks this up and gives us better
information.
FWIW, the updated guile-bytestructures seems to work fine in Debian. :)
live well,
vagrant
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-guile-bytestructures-Update-to-2.0.2.patch --]
[-- Type: text/x-diff, Size: 1548 bytes --]
From 56dd4f2f1635c450bd62138c9c0e92f77427576f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 20 Aug 2024 11:57:29 -0700
Subject: [PATCH] gnu: guile-bytestructures: Update to 2.0.2.
* gnu/packages/guile.scm (guile-bytestructures): Update to 2.0.2.
[source]: Adjust tag used to fetch git commit.
---
gnu/packages/guile.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index e8705dc7d2..581f188dbe 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -786,17 +786,17 @@ (define-public guile2.2-sqlite3
(define-public guile-bytestructures
(package
(name "guile-bytestructures")
- (version "1.0.10")
+ (version "2.0.2")
(home-page "https://github.com/TaylanUB/scheme-bytestructures")
(source (origin
(method git-fetch)
(uri (git-reference
(url home-page)
- (commit version)))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk"))))
+ "1dyhf39s16q3fvps0mfb65xrlcb8rk8m5kc82ngkwhzmf1svalpc"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
base-commit: bef48dd553aef3c8fb3bc48143739debb629c825
--
2.39.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-20 19:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-25 20:51 [bug#54165] [PATCH] gnu: guile-bytestructures: Update to 2.0.1 Taylan Kammer
2022-03-01 11:38 ` Ludovic Courtès
2024-06-07 13:44 ` [bug#54165] [PATCH v2 1/2] " Felix Lechner via Guix-patches via
2024-08-20 19:11 ` [bug#54165] Update guile-bytestructures to 2.0.2 Vagrant Cascadian
2024-06-07 13:44 ` [bug#54165] [PATCH v2 2/2] gnu: guile-bytestructures: add patch. (Closes: #54165) Felix Lechner via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.