!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

573 Members
125 Servers

Load older messages


SenderMessageTime
14 Jul 2025
@quadradical:federated.nexusQuadRadical (Ping)ill undo it th en13:47:49
@emilazy:matrix.orgemily probably PKG_CONFIG = lib.getExe pkgsBuildHost.pkg-config; would fix the PKG_CONFIG_PATH_* form 13:47:58
@emilazy:matrix.orgemilysomething 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:federated.nexusQuadRadical (Ping)the build error was about udev btw13:48:39
@quadradical:federated.nexusQuadRadical (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
@emilazy:matrix.orgemily

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:0upti.meK900 Wait, aren't we setting PKGCONFIGwhatever properly already? 13:50:43
@qyliss:fairydust.spaceAlyssa RossI'm not sure we are for Rust13:51:04
@quadradical:federated.nexusQuadRadical (Ping) nope 13:51:08
@quadradical:federated.nexusQuadRadical (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
@qyliss:fairydust.spaceAlyssa RossRust pkg-config uses some bespoke thing13:51:11
@qyliss:fairydust.spaceAlyssa RossI wanted to do it13:51:47
@qyliss:fairydust.spaceAlyssa Rosshttps://github.com/NixOS/nixpkgs/pull/196333/files#r99662289113:51:51
@qyliss:fairydust.spaceAlyssa Ross IIRC John Ericson later told me he'd no longer block it but then I never revisited it. 13:52:13
@emilazy:matrix.orgemilycan't we just set this in the Rust hook13:52:49
@quadradical:federated.nexusQuadRadical (Ping)i can test your pr with this to see if it fixes maybe, alyssa13:53:13
@qyliss:fairydust.spaceAlyssa RossThere is no "Rust hook"13:53:16
@qyliss:fairydust.spaceAlyssa RossIt would have to be the Cargo hook13:53:24
@qyliss:fairydust.spaceAlyssa RossAnd I think that makes less sense than the pkg-config one13:53:32
@k900:0upti.meK900We could add a hook13:53:34
@qyliss:fairydust.spaceAlyssa RossYou might not be using Cargo, but you'll definitely be using pkg-config.13:53:38
@emilazy:matrix.orgemilyis there any convention that non-Rust packages follow13:54:53
@emilazy:matrix.orgemily like HOST_PKG_CONFIG or whatever 13:54:59
@emilazy:matrix.orgemilyeven vaguely13:55:02
@qyliss:fairydust.spaceAlyssa Ross I think it's just to run pkg-config. 13:55:12
@emilazy:matrix.orgemilyI guess they just do target prefixing?13:55:13
@qyliss:fairydust.spaceAlyssa Ross $PKG_CONFIG for host, pkg-config for build. 13:55:24
@emilazy:matrix.orgemilywow, wtf. gross13:56:01
@k900:0upti.meK900 see even pkg-config hates target 13:56:06
@emilazy:matrix.orgemilywe could accommodate this in https://docs.rs/pkg-config/latest/src/pkg_config/lib.rs.html#63813:56:15

Show newer messages


Back to Room ListRoom Version: 6