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: darwin/linux fix dlopen("libjansson.so.4") #45324
Conversation
Success on x86_64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
@pikajude what do you think ? |
@LnL7 Does that mean replace |
I don't understand what the problem is, the previous thread wasn't exactly productive. But if you look at the build output (FYI. you don't need darwin for this) you'll see that there's a dylib instead of so, which is pretty common.
So what's wrong with this? patchShebangs . # fixes /usr/bin/python references'
+ substituteInPlace src/util/virjsoncompat.c --replace \
+ '"libjansson.so.4"' '"${jansson}/lib/libjansson${targetPlatform.extensions.sharedLibrary}"'
''; |
The commit #44900 was purely reverted so I assumed libjansson was not mandatory for darwin else I don't see the point in the revert it just broke libvirt on both platforms. Also don't assume everyone is familiar with every bit of nixpkgs it's the first time I come across ${targetPlatform.extensions.sharedLibrary} hence my question, I am just trying to help here (as you are). |
Commit 59027e2 broke libvirt broke libvirt/nixops on linux. Use ${targetPlatform.extensions.sharedLibrary} to accomodate both linux and darwin.
Success on x86_64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
I pushed your fix, it is fine on linux. Hope some macos user can test it too |
Success on aarch64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
@teto was able to build it on darwin, start libvirtd, and it kept running. Note: I could connect to the locally started libvirtd as well, but wasn't able to define any domains - libvirt kept complaining it couldn't find capabilities for domaintype=qemu - unsure if running qemu with darwin as host ever worked, so this should be fine for now. |
@teto I wasn't talking about the sharedLibrary helper specifically, Just disabling the fix on darwin wouldn't break nixops anymore, but I assume (since it builds on darwin) you could run into the same problem there. |
@GrahamcOfBorg build libvirt |
Success on aarch64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libvirt Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libvirt Partial log (click to expand)
|
Motivation for this change
Commit 59027e2 broke libvirt
Revert "libvirt: fix dlopen("libjansson.so.4")"
broke libvirt/nixops on linux :/ I am not sure what's the proper fix but meanwhile could we wrap the change in an if darwin ?
cf
#44900
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)