Skip to content
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

Error when running darwin.builder #15

Open
3Rafal opened this issue Jun 24, 2023 · 1 comment
Open

Error when running darwin.builder #15

3Rafal opened this issue Jun 24, 2023 · 1 comment

Comments

@3Rafal
Copy link

3Rafal commented Jun 24, 2023

Hello,
I'm working through the examples in the book, and I found a problem with running a macOS builder. For some reason, the mkfs binary is compiled for linux:

rafal@memebook> nix run 'nixpkgs#darwin.builder'
Disk image do not exist, creating the virtualisation disk image...
Formatting '/tmp/tmp.Xq3GkwCrEL', fmt=raw size=21474836480
/nix/store/4mx7h23lbrf1csjmnf5fcd9nvzgrya2n-nixos-vm/bin/run-nixos-vm: line 14: /nix/store/sh0plpi3ddar4g7ws7ww37r5kv0rg51j-e2fsprogs-1.47.0-bin/bin/mkfs.ext4: cannot execute binary file: Exec format error

rafal@memebook> file /nix/store/sh0plpi3ddar4g7ws7ww37r5kv0rg51j-e2fsprogs-1.47.0-bin/bin/mkfs.ext4
/nix/store/sh0plpi3ddar4g7ws7ww37r5kv0rg51j-e2fsprogs-1.47.0-bin/bin/mkfs.ext4: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /nix/store/n8hgw8lja68x3zhv2ww9a7b6npbkvh21-glibc-2.37-8/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.10.0, not stripped

I had nix already installed, so I didn't follow your setup. Here is my nix.conf for reference:

# WARNING: this file is generated from the nix.* options in
# your nix-darwin configuration. Do not edit it!
allowed-users = *
auto-optimise-store = false
build-users-group = nixbld
builders = 
cores = 0
extra-sandbox-paths = 
extra-trusted-users = rafal
max-jobs = auto
require-sigs = true
sandbox = false
sandbox-fallback = false
substituters = https://cache.nixos.org/ https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters = 
trusted-users = rafal
experimental-features = nix-command flakes

I tried to troubleshoot it on my own, but I can't find any clue. Maybe you have an idea of what may be the issue?

@Gabriella439
Copy link
Owner

Yeah, this is a known issue which was reported here: NixOS/nixpkgs#236656 (comment)

… and this pull request will fix it once it is merged: NixOS/nixpkgs#238596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants