GNU bug report logs -
#78445
meson-build-system's 'shrink-runpath phase fails for guile go files
Previous Next
To reply to this bug, email your comments to 78445 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#78445
; Package
guix
.
(Thu, 15 May 2025 19:54:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dariqq <dariqq <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 15 May 2025 19:54:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
I have been experimenting with using meson to manage some guile projects
instead of autotools.
When I try to build it with guix it fails during 'shrink-runpath phase
on .go files:
error: in phase 'shrink-runpath': uncaught exception:
wrong-type-arg "struct-vtable" "Wrong type argument in position ~A
(expecting ~A): ~S" (1 "struct" #f) (#f)
phase `shrink-runpath' failed after 0.0 seconds
Backtrace:
10 (primitive-load "/gnu/store/9547znabbsf3iy7z9frhkxq7cgf…")
In guix/build/gnu-build-system.scm:
966:2 9 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
1752:10 8 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
634:9 7 (for-each #<procedure 7ffff3f30680 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
1752:10 6 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
987:23 5 (_)
In guix/build/meson-build-system.scm:
123:2 4 (shrink-runpath #:elf-directories _ #:outputs _)
In srfi/srfi-1.scm:
634:9 3 (for-each #<procedure handle-output (expr)> (("out" . #)))
634:9 2 (for-each #<procedure strip-runpath (file)> _)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting
struct): #f
build process 8 exited with status 256
A test repository is at https://codeberg.org/Dariqq/guile-meson-example.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#78445
; Package
guix
.
(Thu, 15 May 2025 21:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 78445 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Dariqq <dariqq <at> posteo.net> writes:
> I have been experimenting with using meson to manage some guile
> projects instead of autotools.
>
> When I try to build it with guix it fails during 'shrink-runpath phase
> on .go files:
>
> error: in phase 'shrink-runpath': uncaught exception:
> wrong-type-arg "struct-vtable" "Wrong type argument in position ~A
> (expecting ~A): ~S" (1 "struct" #f) (#f)
[...]
> 634:9 2 (for-each #<procedure strip-runpath (file)> _)
This is because ‘strip-runpath’ expects FILE to contain a DT_RUNPATH
section. Failing that, the ‘runpath’ variable at gremlin.scm:417 is #f
and the (dynamic-entry-type runpath) calls right below fails with a
wrong-type-arg error.
A solution would be to fix ‘strip-runpath’ (patch below), though that
involves a world rebuild.
Another solution is to arrange so that ‘meson-build-system’ does not
touch .go files for this package, for instance by skipping the
‘shrink-runpath’ phase.
HTH,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm
index 2a74d51dd9..ceb1c7bcf5 100644
--- a/guix/build/gremlin.scm
+++ b/guix/build/gremlin.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2015, 2018, 2020, 2025 Ludovic Courtès <ludo <at> gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -417,10 +417,11 @@ (define (strip-runpath file)
(runpath (find (lambda (entry)
(= DT_RUNPATH (dynamic-entry-type entry)))
entries))
- (old (search-path->list
- (dynamic-entry-value runpath)))
- (new (minimal-runpath needed old)))
- (unless (equal? old new)
+ (old (and runpath
+ (search-path->list
+ (dynamic-entry-value runpath))))
+ (new (and old (minimal-runpath needed old))))
+ (unless (and old new (equal? old new))
(format (current-error-port)
"~a: stripping RUNPATH to ~s (removed ~s)~%"
file new
Information forwarded
to
bug-guix <at> gnu.org
:
bug#78445
; Package
guix
.
(Fri, 16 May 2025 07:54:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78445 <at> debbugs.gnu.org (full text, mbox):
Hello,
On 15.05.25 22:59, Ludovic Courtès wrote:
> Hi,
>
>
>
> This is because ‘strip-runpath’ expects FILE to contain a DT_RUNPATH
> section. Failing that, the ‘runpath’ variable at gremlin.scm:417 is #f
> and the (dynamic-entry-type runpath) calls right below fails with a
> wrong-type-arg error.
>
> A solution would be to fix ‘strip-runpath’ (patch below), though that
> involves a world rebuild.
>
At first I thought it be 'only' a rebuild of the meson world, but I see
now that (guix build gremlin) is also imported in gnu-build-system :(.
> Another solution is to arrange so that ‘meson-build-system’ does not
> touch .go files for this package, for instance by skipping the
> ‘shrink-runpath’ phase.
>
Yeah, that's what I have been doing but I think 'strip-runpath' could
handle this case more gracefully. Also when there is both a guile c
extension and go files I'd need to do custom things to apply
shrink-runpath only for the .so files. This is of course doable but
feels like a workaround until a proper fix is available.
> HTH,
> Ludo’.
>
>
Information forwarded
to
bug-guix <at> gnu.org
:
bug#78445
; Package
guix
.
(Fri, 16 May 2025 13:41:05 GMT)
Full text and
rfc822 format available.
Message #14 received at 78445 <at> debbugs.gnu.org (full text, mbox):
Hi Dariqq,
Dariqq <dariqq <at> posteo.net> writes:
>> Another solution is to arrange so that ‘meson-build-system’ does not
>> touch .go files for this package, for instance by skipping the
>> ‘shrink-runpath’ phase.
>>
>
> Yeah, that's what I have been doing but I think 'strip-runpath' could
> handle this case more gracefully. Also when there is both a guile c
> extension and go files I'd need to do custom things to apply
> shrink-runpath only for the .so files. This is of course doable but
> feels like a workaround until a proper fix is available.
Yes, it’s definitely a workaround, probably unavoidable until we land
the gremlin.scm fix.
Ludo’.
This bug report was last modified 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.