meson-build-system's shrink-path phase can fail

  • Open
  • quality assurance status badge
Details
One participant
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 30 Aug 2022 03:22
(name . bug-guix)(address . bug-guix@gnu.org)
87y1v6a5kz.fsf@gmail.com
Hi,

While updating Mutter to version 42.4, I encountered this:

Toggle snippet (34 lines)
starting phase `shrink-runpath'
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/l5ri9gc942zpr8hqags8gl66ck0…")
In guix/build/gnu-build-system.scm:
906: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 7fffeebdb2a0 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:
927:23 5 (_)
In guix/build/meson-build-system.scm:
105: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)> ("/gnu/s…" …))
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
builder for `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed with exit code 1
@ build-failed /gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv - 1 builder for `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed with exit code 1
derivation '/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' offloaded to 'localhost' failed: build of `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed
build of /gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv failed
View build log at '/var/log/guix/drvs/r5/w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv'.

I do not have the head clear enough to pursue investigating this now,
but it should be reproducible by undeleting the shrink-path phase of the
mutter 42.4 update that I should push soon.

Thanks,

Maxim
M
M
Maxim Cournoyer wrote on 30 Aug 2022 04:36
(address . 57478@debbugs.gnu.org)
87tu5ua24e.fsf@gmail.com
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (45 lines)
> Hi,
>
> While updating Mutter to version 42.4, I encountered this:
>
> starting phase `shrink-runpath'
> 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/l5ri9gc942zpr8hqags8gl66ck0…")
> In guix/build/gnu-build-system.scm:
> 906: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 7fffeebdb2a0 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:
> 927:23 5 (_)
> In guix/build/meson-build-system.scm:
> 105: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)> ("/gnu/s…" …))
> 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
> builder for `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed with exit code 1
> @ build-failed /gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv - 1 builder for `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed with exit code 1
> derivation '/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' offloaded to 'localhost' failed: build of `/gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv' failed
> build of /gnu/store/r5w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv failed
> View build log at '/var/log/guix/drvs/r5/w8fl87b1ps7rdj9cn6w198qik5i9x5-mutter-42.4.drv'.
>
> I do not have the head clear enough to pursue investigating this now,
> but it should be reproducible by undeleting the shrink-path phase of the
> mutter 42.4 update that I should push soon.
>
> Thanks,
>
> Maxim

It seems this was caused by Mutter using '-Wl,--disable-new-dtags' as a
linker flag, which was causing no runpath to be registered by our linker
script.

That's a pathological case, but perhaps we could fail more gracefully
and provide a hint.

Thanks,

Maxim
?