| 5 Jan 2025 |
Tristan Ross | --- stderr
thread 'main' panicked at /build/cosmic-settings-1.0.0-alpha.4-unstable-2024-12-17-vendor/bindgen-0.69.5/lib.rs:622:31:
Unable to find libclang: "the `libclang` shared library at /nix/store/pcs60p9pghggp5ycs47kk53cddvgym86-clang-riscv64-unknown-linux-gnu-18.1.8-lib/lib/libclang.so.18.1.8 could not be opened: /nix/store/pcs60p9pghggp5ycs47kk53cddvgym86-clang-riscv64-unknown-linux-gnu-18.1.8-lib/lib/libclang.so.18.1.8: cannot open shared object file: No such file or directory"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish..
Rip
| 05:02:38 |
| bitestring joined the room. | 08:24:02 |
Tristan Ross | I've discovered that using pkgs in nixosSystem vs nixpkgs.{cross,local}System options has different behaviors regarding nativeBuildInputs. | 18:07:05 |
Tristan Ross | So cross compiling isn't likely to go right with the options. | 18:07:27 |
Artturin | How so? | 18:07:33 |
Tristan Ross | I'm not entirely sure. | 18:07:43 |
Tristan Ross | https://github.com/NixOS/nixpkgs/pull/371049 this issue is where it was discovered | 18:07:55 |
Tristan Ross | let
someRevOnMaster = "742e83951eefc0a0a74dd95a6523300dacfb4238";
inherit
(import (builtins.getFlake "github:nixos/nixpkgs/${someRevOnMaster}") {
system = "aarch64-linux";
})
pkgsCross
;
in
builtins.head (
builtins.filter (drv: drv.name == "X11-fonts")
(pkgsCross.riscv64.nixos {
fonts.fontDir.enable = true;
boot.isContainer = true;
}).config.environment.systemPackages
)
This builds
| 18:08:13 |
Tristan Ross | let
nixpkgs = builtins.getFlake "github:nixos/nixpkgs/d29ab98cd4a70a387b8ceea3e930b3340d41ac5a";
in
builtins.head (
builtins.filter (drv: drv.name == "X11-fonts")
(import "${nixpkgs}/nixos/lib/eval-config.nix" {
modules = [
{
fonts.fontDir.enable = true;
boot.isContainer = true;
nixpkgs.crossSystem = { system = "riscv64-linux"; };
nixpkgs.localSystem = { system = "aarch64-linux"; };
}
];
}).config.environment.systemPackages
)
This throws an exec format error
| 18:08:28 |
Tristan Ross | I though they'd have the exact same behavior but it seems they don't | 18:09:27 |
Artturin | Both build on 89019580b73ddd7d4b05fa5f6952a4676538c031 (Changed them to my local master so I don't have to rebuild things) | 18:19:15 |
Tristan Ross | Both build? | 18:19:41 |
Tristan Ross | Do you have binfmt? | 18:19:51 |
Artturin | Nope | 18:20:32 |
Artturin | Also I'm on x86_64 linux lol | 18:20:44 |
Tristan Ross | Oh lol | 18:20:49 |
Tristan Ross | That makes this even stranger | 18:20:57 |
Tristan Ross | So it's only an issue on aarch64 with the local/cross system nixpkgs options then? | 18:21:24 |
Artturin | $ nix eval --file test.nix drvPath
"/nix/store/0gp81b50wg2bf2dbqswkbhvy21i8x552-X11-fonts.drv"
$ nix eval --file test-fail.nix drvPath
"/nix/store/0gp81b50wg2bf2dbqswkbhvy21i8x552-X11-fonts.drv"
| 18:24:07 |
Artturin | Same for you? | 18:25:15 |
Artturin | $ nix build --file test.nix --rebuild
evaluation warning: system.stateVersion is not set, defaulting to 25.05. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
error: a 'aarch64-linux' with features {} is required to build '/nix/store/0gp81b50wg2bf2dbqswkbhvy21i8x552-X11-fonts.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, ca-derivations, kvm, nixos-test}
I got the drv from cache it seems
| 18:26:04 |
Tristan Ross |
- /nix/store/0gp81b50wg2bf2dbqswkbhvy21i8x552-X11-fonts.drv
- /nix/store/1xfdmcvvjc1s57lp4yfq5x5cl9zva9bk-X11-fonts.drv
| 18:26:06 |
Artturin | nix-diff those | 18:26:17 |
Tristan Ross | https://termbin.com/2ipd | 18:27:01 |
Tristan Ross | If I use the same rev from the 2nd in the 1st one then the 1st fails | 18:28:33 |
Tristan Ross | So something post 24.11 fixed it | 18:29:27 |
Artturin | https://github.com/nixos/nixpkgs/commit/e9e1d145f6e6da36d743619704aa8e1eed14704b | 18:30:00 |
Artturin | hahaha | 18:30:07 |
Tristan Ross | lol | 18:30:20 |
Tristan Ross | I just faceplamed | 18:30:24 |