New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libvirt: Avoid patchShebangs in the darwin build #33084
Conversation
@GrahamcOfBorg build libvirt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: aarch64-linux
copying path '/nix/store/cz76yg431fh92i25g6m7qcidnp1k7bal-libpciaccess-0.14' from 'https://cache.nixos.org'...
copying path '/nix/store/685zfm904y82qbzm1srm1qyxya2h1v38-numactl-2.0.10' from 'https://cache.nixos.org'...
copying path '/nix/store/2yj6w4ls43h8miims3if9vvjh9vyhp3a-numad-0.5' from 'https://cache.nixos.org'...
copying path '/nix/store/48qxncwafxwg3b43k38dyijd61yjs3z3-parted-3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/jrd4wi7qg1jrr6lbbwnn67xi68d1fnmr-yajl-2.1.0' from 'https://cache.nixos.org'...
copying path '/nix/store/sr8536mljvjkm429r4mpm58rrxlzynng-zfs-user-0.7.4' from 'https://cache.nixos.org'...
copying path '/nix/store/5ja0x47hza8niddyzxhpan3rihvb3zwc-dbus-1.10.24' from 'https://cache.nixos.org'...
copying path '/nix/store/iws9x1jjfy6b7rhgh63572if7s7sbkz9-pm-utils-1.4.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ly14zsg5703jnxrc5a3m04pv7zzmrirk-libvirt-3.10.0' from 'https://cache.nixos.org'...
/nix/store/ly14zsg5703jnxrc5a3m04pv7zzmrirk-libvirt-3.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-darwin
Removing /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/share/gtk-doc
rmdir: failed to remove '/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/share': Directory not empty
gzipping man pages under /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/share/man/
stripping (with flags -S) in /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/lib /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/libexec /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/bin /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/sbin
patching script interpreter paths in /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0
/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/bin/virt-pki-validate: interpreter directive changed from "/bin/sh" to "/nix/store/hiv85an0qyzj6ps88f5pvkbbdj8238nj-bash-4.4-p12/bin/sh"
/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/bin/virt-xml-validate: interpreter directive changed from "/bin/sh" to "/nix/store/hiv85an0qyzj6ps88f5pvkbbdj8238nj-bash-4.4-p12/bin/sh"
/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/libexec/libvirt-guests.sh: interpreter directive changed from "/bin/sh" to "/nix/store/hiv85an0qyzj6ps88f5pvkbbdj8238nj-bash-4.4-p12/bin/sh"
moving /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/sbin/* to /nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0/bin
/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-linux
cannot build derivation ‘/nix/store/snn1c2g9395apg9m0bnlgmnm0wp77ygg-yaml-0.8.25.drv’: 17 dependencies couldn't be built
cannot build derivation ‘/nix/store/ig7gi36gxa21h2wvfn8kgkh9cjsnmn0c-x509-system-1.6.6.drv’: 6 dependencies couldn't be built
cannot build derivation ‘/nix/store/h8f6mdfmskcl45b5h5hxfpyvqap9piki-x509-validation-1.6.9.drv’: 15 dependencies couldn't be built
cannot build derivation ‘/nix/store/vixjq0z2vncrg818pvklvij763jb40yk-tls-1.4.0.drv’: 14 dependencies couldn't be built
cannot build derivation ‘/nix/store/3hjqfnikz92994zk5nc5rwsv9b310sr1-connection-0.2.8.drv’: 11 dependencies couldn't be built
cannot build derivation ‘/nix/store/79y9yka3nc0hpamc6mv7f6xpv1vmi6v4-http-client-tls-0.3.5.1.drv’: 14 dependencies couldn't be built
cannot build derivation ‘/nix/store/0w7fzaykgyyc6cvwba15m1iwf34qz3jg-pandoc-2.0.5.drv’: 42 dependencies couldn't be built
cannot build derivation ‘/nix/store/faansijryr9m4nwsr4h6h98bhdijxx37-xen-4.5.5.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/dhhm1z5nrs3drcdgbyccv1sxnq1svn2l-libvirt-3.10.0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/dhhm1z5nrs3drcdgbyccv1sxnq1svn2l-libvirt-3.10.0.drv’ failed
@GrahamcOfBorg build libvirt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: aarch64-linux
/nix/store/ly14zsg5703jnxrc5a3m04pv7zzmrirk-libvirt-3.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-darwin
/nix/store/l9pyyrga3zwkka9ik02c88fb6pnw67lj-libvirt-3.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-linux
cannot build derivation ‘/nix/store/snn1c2g9395apg9m0bnlgmnm0wp77ygg-yaml-0.8.25.drv’: 17 dependencies couldn't be built
cannot build derivation ‘/nix/store/ig7gi36gxa21h2wvfn8kgkh9cjsnmn0c-x509-system-1.6.6.drv’: 6 dependencies couldn't be built
cannot build derivation ‘/nix/store/h8f6mdfmskcl45b5h5hxfpyvqap9piki-x509-validation-1.6.9.drv’: 15 dependencies couldn't be built
cannot build derivation ‘/nix/store/vixjq0z2vncrg818pvklvij763jb40yk-tls-1.4.0.drv’: 14 dependencies couldn't be built
cannot build derivation ‘/nix/store/3hjqfnikz92994zk5nc5rwsv9b310sr1-connection-0.2.8.drv’: 11 dependencies couldn't be built
cannot build derivation ‘/nix/store/79y9yka3nc0hpamc6mv7f6xpv1vmi6v4-http-client-tls-0.3.5.1.drv’: 14 dependencies couldn't be built
cannot build derivation ‘/nix/store/0w7fzaykgyyc6cvwba15m1iwf34qz3jg-pandoc-2.0.5.drv’: 42 dependencies couldn't be built
cannot build derivation ‘/nix/store/faansijryr9m4nwsr4h6h98bhdijxx37-xen-4.5.5.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/dhhm1z5nrs3drcdgbyccv1sxnq1svn2l-libvirt-3.10.0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/dhhm1z5nrs3drcdgbyccv1sxnq1svn2l-libvirt-3.10.0.drv’ failed
Hmm @johbo any idea why it is failing on Linux? |
That's odd indeed, "works on my machine" syndrome. Maybe it's because I did try from my mac?
I'll give it a try in a NixOS VM. |
It's actually interesting, I assumed that the linux version would be unchanged by my tweak. Must have missed something. |
@@ -43,7 +43,9 @@ stdenv.mkDerivation rec { | |||
# do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations | |||
substituteInPlace src/lxc/lxc_conf.c \ | |||
--replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",' | |||
'' + '' | |||
'' | |||
# "patchShebangs" causes issues in the Darwin build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What issues? Either explain here or refer to where they are explained (maybe this PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I'll add details into the description and point to the PR. Or if anyone can spot the cause, we could also apply a proper fix ;)
02b3d7d
to
e7004c3
Compare
Noticed that libvirt did not build on darwin. Tracked the problem down to the call to "patchShebangs" in the hook "preConfigure".
e7004c3
to
53405eb
Compare
I did rebase the change. To my surprise the build in the linux vm did work as well. |
I think we should fix |
@yegortimoshenko your comment made me think, I guess I figured out the reason why it fails due to that 😄 By applying
If my conclusions are correct, then there is nothing to fix in Details of how I came to this conclusion:
The Makefile which is generated contains this setting:
Causing this issue:
|
Thanks for thorough debugging! I've made a fix in #33084, but I can't test it right now (only in a few days). |
Cool, now I get your point about "fixing" patchShebangs, that's indeed an approach which should work as well. |
Well, patchShebangs should be fixed now, but Hydra won't confirm fixing the libvirt issue on Darwin, due to missing libintl in a dependency. |
It builds now. |
Motivation for this change
Noticed that libvirt did not build on darwin. Tracked the problem down to the
call to "patchShebangs" in the hook "preConfigure".
libvirt is a new dependency in NixOPS, that's why I found it.
The error during the build looked as follows:
When investigating via
make --trace
I found the following details:I did notice by accident that things were working when I forgot to run the hook
preConfigure
.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)