| 14 Jul 2025 |
emily | so I rather suspect we are failing to set the variables it expects and our Rust + pkg-config + cross story is just kind of broken in general right now? | 01:35:42 |
emily | I am not entirely sure how pkg-config cross in Nixpkgs in general is meant to work though. (e.g. do you want a separate pkg-config dep for each platform you need to use it on?) | 01:36:27 |
emily | (use it "for" I suppose I should say) | 01:41:22 |
QuadRadical (Ping) | btw i changed it to use the other on e | 01:41:33 |
QuadRadical (Ping) | * btw i changed it to use the other one | 01:41:44 |
QuadRadical (Ping) | i dont know what the proper solution nis though | 01:42:04 |
colemickens 🏳️🌈 | (the latest version doesn't work for me, native or cross, from what I can tell) | 05:43:18 |
QuadRadical (Ping) | You're talking about my PR or? | 13:26:45 |
QuadRadical (Ping) | It builds fine for me | 13:26:50 |
QuadRadical (Ping) | Unless you mean it doesn't work properly but does build | 13:27:03 |
QuadRadical (Ping) | oh wait youre right | 13:30:26 |
QuadRadical (Ping) | setting PKG_CONFIG_PATH appears to make it only build with cross | 13:30:52 |
QuadRadical (Ping) | yeah it fails about udev otherwise | 13:35:10 |
QuadRadical (Ping) | i think the other way was better then | 13:35:15 |
emily | that is probably because of our dodgy PKG_CONFIG_ALLOW_CROSS setting | 13:46:49 |
emily | the other way is really not mergeable, we do not want a udev dependency that is not even used | 13:47:15 |
emily | it's just a hack around only having the wrong-platform pkg-config | 13:47:22 |
QuadRadical (Ping) | oh ok | 13:47:35 |
QuadRadical (Ping) | ill undo it th en | 13:47:49 |
emily | probably PKG_CONFIG = lib.getExe pkgsBuildHost.pkg-config; would fix the PKG_CONFIG_PATH_* form | 13:47:58 |
emily | something really dodgy is going on though, I don't understand how more Rust packages aren't broken cross (well maybe they just are…) | 13:48:10 |
QuadRadical (Ping) | the build error was about udev btw | 13:48:39 |
QuadRadical (Ping) | > thread 'main' panicked at /build/thin-provisioning-tools-1.2.0-vendor/libudev-sys-0.1.4/build.rs:38:41:
> called `Result::unwrap()` on an `Err` value: "\npkg-config exited with status code 1\n> PKG_CONFIG_PATH=/nix/store/ia5i9cgajql0rhh38yz2p0qibx66fc8d-lvm2-2.03.32-dev/lib/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libudev\n\nThe system library `libudev` required by crate `libudev-sys` was not found.\nThe file `libudev.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.\nPKG_CONFIG_PATH contains the following:\n - /nix/store/cxy5q3kn7aq9dp3bffznb37gzflanfk5-systemd-minimal-libs-257.6-dev/lib/pkgconfig\n - /nix/store/cxy5q3kn7aq9dp3bffznb37gzflanfk5-systemd-minimal-libs-257.6-dev/share/pkgconfig\n - /nix/store/ia5i9cgajql0rhh38yz2p0qibx66fc8d-lvm2-2.03.32-dev/lib/pkgconfig\n\nHINT: you may need to install a package such as libudev, libudev-dev or libudev-devel.\n"
| 13:48:41 |
emily | I don't have time to test this right now but it is possible that
strictDeps = true;
depsBuildBuild = [ lvm2.dev ];
buildInputs = [ lvm2.dev udev ];
"PKG_CONFIG_${stdenv.buildPlatform.config}" = lib.getExe pkgsBuildBuild.pkg-config;
"PKG_CONFIG_${stdenv.hostPlatform.config}" = lib.getExe pkgsBuildHost.pkg-config;
will work
| 13:49:25 |
K900 | Wait, aren't we setting PKGCONFIGwhatever properly already? | 13:50:43 |
Alyssa Ross | I'm not sure we are for Rust | 13:51:04 |
QuadRadical (Ping) | nope | 13:51:08 |
QuadRadical (Ping) | > = note: some arguments are omitted. use `--verbose` to show all linker arguments
> = note: /nix/store/z3za8hfc24wb117s50p8b10agjkgm039-binutils-2.44/bin/ld: skipping incompatible /nix/store/rfznwwiqgpjrpjd9593c0fz7nbbrvnl5-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
> /nix/store/z3za8hfc24wb117s50p8b10agjkgm039-binutils-2.44/bin/ld: cannot find -ldevmapper: No such file or directory
> /nix/store/z3za8hfc24wb117s50p8b10agjkgm039-binutils-2.44/bin/ld: skipping incompatible /nix/store/rfznwwiqgpjrpjd9593c0fz7nbbrvnl5-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
> collect2: error: ld returned 1 exit status
>
>
> error: could not compile `devicemapper` (build script) due to 1 previous error
For full logs, run 'nix log /nix/store/4b61kifbv62aq1vd95a8kx2m8hz977qp-thin-provisioning-tools-aarch64-unknown-linux-gnu-1.2.0.drv'.
| 13:51:10 |
Alyssa Ross | Rust pkg-config uses some bespoke thing | 13:51:11 |
Alyssa Ross | I wanted to do it | 13:51:47 |