!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

552 Members
116 Servers

Load older messages


SenderMessageTime
13 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)looks like somehow the gcc-wrapper needs it14:03:02
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) pkgsStatic.pkgsLLVM.musl builds just fine 14:06:19
@rosssmyth:matrix.orgrosssmyth

While the APIs that are being used for ${program}.withPackages pattern is very nice and egronomic, it does have a downside of not using a spliced package. So for example recently I needed Python with a package in nativeBuildInputs, but then when cross-compiled it only has Python from pkgsHostTarget, leading to an invalid executable being used at build time and then either manually using pkgsBuildBuild.python or using the spliced Python and package separately.

I wonder if there is a good way to solve this? Meaning a way to use the spliced package, as for folks not in the know of splicing it is probably confusing to see a package operate differently based upon whether you use the helpers or not. But many of these helpers are implemented with finalAttrs.finalPackage, which isn't spliced.

18:00:49
@sandro:supersandro.deSandro 🐧Can someone look at https://github.com/NixOS/nixpkgs/pull/447492 for the correct splice setup?22:31:54
@hexa:lossy.networkhexa also #windows:nixos.org maybe 23:11:28
14 Oct 2025
@sandro:supersandro.deSandro 🐧I did not know we had a room for that13:36:20
@ulysseszhan:matrix.orgUlyssesZhan joined the room.23:34:39
15 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I haven't had any reviews on my musl/llvm PRs yet17:15:14
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
  • https://github.com/NixOS/nixpkgs/pull/451665
  • https://github.com/NixOS/nixpkgs/pull/451147
  • https://github.com/NixOS/nixpkgs/pull/447166
  • https://github.com/NixOS/nixpkgs/pull/445833
17:15:37
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Any takers?17:15:40
@stas:mainframe.lvStashey! I am cross-compiling armv7 systems, and wondered are there any caches with armv7 stuff in them? Or a cache that is willing to accept uploads from me on the armv7 base system?17:33:30
@stas:mainframe.lvStasi am using mine for Olimex Lime to act as a restic backup server17:34:02
@k900:0upti.meK900No official ones17:42:23
@k900:0upti.meK900 @misuzu had something 17:42:27
@k900:0upti.meK900But generally armv7 is not an interesting target17:42:33
@stas:mainframe.lvStasyeah, it is drying off17:42:41
@stas:mainframe.lvStasi am using it just cause that board has native SATA, and is very compact :D17:42:54
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)

ElvishJerricco:

❯ /nix/store/d5xywf1k4cmmr2jlxmsc5qa6zcwn3myd-nixos-vm/bin/run-nixos-vm -nographic
[    0.582586] (udev-worker)[90]: mtd0ro: Failed to find and pin callout binary "/nix/store/p9vl1dd3qjafk36wsb49q79a2rhjrpbi-systemd-258/lib/udev/mtd_probe": No such file or directory
[    0.880121] (udev-worker)[94]: hidraw0: Failed to find and pin callout binary "/nix/store/p9vl1dd3qjafk36wsb49q79a2rhjrpbi-systemd-258/lib/udev/fido_id": No such file or directory
[    0.886137] (udev-worker)[97]: hidraw1: Failed to find and pin callout binary "/nix/store/p9vl1dd3qjafk36wsb49q79a2rhjrpbi-systemd-258/lib/udev/fido_id": No such file or directory
[    3.416831] systemd[1]: Failed to preset unit: Unit autovt@.service does not exist
21:17:33
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)interesting thing that happens on musl native 21:17:50
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Ah maybe not.. that might just be because of something I'm stubbing 21:25:24
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
user: matthew nixos-musl on  refactor [!] 
✦ ❯ nix path-info -Sh `readlink ./result`
/nix/store/gzv6h1zjghv7mph64wwfzcqvywmhqfpz-nixos-system-nixos-25.11.20251015.ac6f169	444.6 MiB

user: matthew nixos-musl on  refactor [!] 
✦ ❯ nix build .#nixosConfigurations.gnu-musl-llvm.config.system.build.toplevel --keep-going 
warning: Git tree '/home/matthew/git/nixos-musl' is dirty
evaluation warning: system.stateVersion is not set, defaulting to 25.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
Finished at 22:26:13 after 3s

user: matthew nixos-musl on  refactor [!] took 3s 
✦ ❯ nix path-info -Sh `readlink ./result`
/nix/store/29ic0hjnydm8w7g172jfz72484bwd75s-nixos-system-nixos-25.11.20251015.ac6f169	413.7 MiB
21:26:21
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)interesting though 21:26:24
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)the llvm cross compiled closure is much smaller 21:26:30
16 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
DBI-aarch64-linux> /nix/store/bvp4jwn1ibkjh7yhr2mlcxxd908y4x4v-perl-5.40.0/lib/perl5/5.40.0/aarch64-linux-thread-multi/CORE/perl.h:3358:22: error: unknown type name 'off64_t'; did you mean 'off_t'?
DBI-aarch64-linux>  3358 | #       define Off_t off64_t
DBI-aarch64-linux>       |                      ^~~~~~~
DBI-aarch64-linux> /nix/store/bvp4jwn1ibkjh7yhr2mlcxxd908y4x4v-perl-5.40.0/lib/perl5/5.40.0/aarch64-linux-thread-multi/CORE/perlio.h:252:15: note: in expansion of macro 'Off_t'
DBI-aarch64-linux>   252 | PERL_CALLCONV Off_t PerlIO_tell(PerlIO *);
01:20:58
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)So much perl in nix 01:21:24
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
FAILED: [code=1] libnixutil.so.p/unix_file-descriptor.cc.o 
aarch64-unknown-linux-musl-clang++ -Ilibnixutil.so.p -I. -I.. -Iinclude -I../include -I../widecharwidth -Ilinux/include -I../linux/include -Iunix -I../unix -Iunix/include -I../unix/include -I/nix/store/2kq21fj8mcqbb2dk078kdkz0a4slp9y9-libarchive-aarch64-unknown-linux-musl-3.8.1-dev/include -I/nix/store/15nrd5ki3mn2wky0879jq6p8v3nl3ins-nlohmann_json-aarch64-unknown-linux-musl-3.12.>
../unix/file-descriptor.cc:174:20: error: use of undeclared identifier 'SYS_close_range'; did you mean 'unix_close_range'?
  174 |     return syscall(SYS_close_range, first, last, (unsigned int) flags);
      |                    ^~~~~~~~~~~~~~~
      |                    unix_close_range
../unix/file-descriptor.cc:171:12: note: 'unix_close_range' declared here
  171 | static int unix_close_range(unsigned int first, unsigned int last, int flags)
      |            ^
../unix/file-descriptor.cc:174:12: error: no matching function for call to 'syscall'
  174 |     return syscall(SYS_close_range, first, last, (unsigned int) flags);
      |            ^~~~~~~
/nix/store/4w3bhgsi1al9v1jwgk9vc6ch20l7ynba-musl-aarch64-unknown-linux-musl-1.2.5-dev/include/unistd.h:180:6: note: candidate function not viable: no known conversion from 'int (unsigned int, unsigned int, int)' to 'long' for 1st argument
  180 | long syscall(long, ...);
      |      ^       ~~~~
2 errors generated.
02:31:03
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Seems like an easy fix 02:31:08
@dramforever:matrix.orgdramforever matthewcroughan: do you want to give this a try? https://github.com/bminor/musl/compare/master...dramforever:musl:dlopen-use-rpath-of-caller-dso 04:54:21
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)for kmod stuff?04:54:39
@dramforever:matrix.orgdramforeveryeah04:54:55

Show newer messages


Back to Room ListRoom Version: 6