nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Error installing x86-64 Arch in OrbStack on Apple Silicon

Open evanrelf opened this issue 1 year ago • 6 comments

Fresh x86-64 Arch Linux VM created in OrbStack on a 2021 M1 Pro MacBook Pro. First thing I did was run the DetSys Nix installer and got this error:

Error

Error: 
   0: Install failure
   1: Error executing action
   2: Action `configure_nix` errored
   3: Action `setup_default_profile` errored
   4: Failed to execute command with status 1 `HOME="/root" NIX_SSL_CERT_FILE="/nix/store/47h1qcdfp2gp7qlzpa41zgmg6drvmrkz-nss-cacert-3.95/etc/ssl/certs/ca-bundle.crt" "/nix/store/00dc6iygj63mjcmixki1vwg7m1jbdi9p-nix-2.21.2/bin/nix-env" "-i" "/nix/store/00dc6iygj63mjcmixki1vwg7m1jbdi9p-nix-2.21.2"`, stdout: 
      stderr: installing 'nix-2.21.2'
      error:
             … while setting up the build environment

             error: unable to load seccomp BPF program: Invalid argument


Metadata

key value
version 0.19.0
os linux
arch x86_64

Here's some more system info:

[evanrelf@arch-x86 ~]$ uname -a
Linux arch-x86 6.9.8-orbstack-00170-g7b4100b7ced4 #1 SMP Thu Jul 11 03:32:20 UTC 2024 x86_64 GNU/Linux

Using OrbStack version 1.6.4 (17192).

evanrelf avatar Jul 12 '24 00:07 evanrelf

Just verified the install works perfect when using the aarch64 Arch Linux in OrbStack, and fails in the exact same way with x86-64 Ubuntu 24.04. So probably something to do with x86-64, maybe related to Rosetta?

evanrelf avatar Jul 12 '24 00:07 evanrelf

You might try this suggestion in a similar issue: https://github.com/DeterminateSystems/nix-installer/issues/955#issuecomment-2099655058

cole-h avatar Jul 12 '24 14:07 cole-h

Oops, sorry for the dupe! Thanks, will try that later today 👍

evanrelf avatar Jul 12 '24 16:07 evanrelf

Didn't get around to it until now, but I'm happy to confirm that adding --extra-conf='filter-syscalls = false' as suggested here worked!

Would be awesome if this was detected automatically.

evanrelf avatar Aug 07 '24 02:08 evanrelf

If you know of a way to detect running under OrbStack, I'm all ears!

cole-h avatar Aug 07 '24 14:08 cole-h

I don't know of any official guidance for how best to detect that you're running under OrbStack, but there are lots of signs inside the Linux VM!

  • The orb and orbctl executables are in the PATH, and located under /opt/orbstack-guest/bin.
  • The kernel release (uname -r) has the string orbstack in it.
  • The host filesystem is mounted at /mnt/mac.

evanrelf avatar Aug 07 '24 16:08 evanrelf