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

Lima not supporting vz in Mac - works when compiled manually #346006

Open
josvazg opened this issue Oct 2, 2024 · 4 comments
Open

Lima not supporting vz in Mac - works when compiled manually #346006

josvazg opened this issue Oct 2, 2024 · 4 comments

Comments

@josvazg
Copy link
Contributor

josvazg commented Oct 2, 2024

Describe the bug

The lima nix package is unable to use vz in Mac due to some build tooling being stale regarding the MacOS SDK version it "sees".

Steps To Reproduce

Steps to reproduce the behavior:

  1. Use nix package lima in a current Mac (Eg a M1) with SDK 15.0
  2. Try to start a VM using vz.
  3. See it fail: FATA[0000] vm driver 'vz' needs macOS 13 or later (Hint: try recompiling Lima if you are seeing this error on macOS 13)
  4. Compile manually on the same machine (repository: https://github.com/lima-vm/lima cmd: make binaries)
  5. See that binary work where the nix one failed.

Expected behavior

I would expect the nix package would work with vz just like the manual compilation does.

Additional context

Was trying to write a flake to reproduce and debug. This is what I found out:

Seems the script itself is dynamic. Does it mean it basically depends on what version of MacOS X is running it?
Is there any easy known workaround to get this nix package working with vz?

Notify maintainers

@r-ryantm
@wegank

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.6.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixpkgs, unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@Frontear
Copy link
Member

Frontear commented Oct 2, 2024

Might this be related to the recent darwin PR improving tooling for building?

I cannot for the life of me remember the PR, but I know its there somewhere

@josvazg
Copy link
Contributor Author

josvazg commented Oct 3, 2024

I am a nix newbie, I can't figure out why the xcbuild package choses an old version of Mac SDK libraries. The way it is written, the wrapper mentioned would work if if was compiled with a version 13 or later of the SDK. But I cannot figure out why it is using older libraries.
There original repo that package is based from is archived in GH, which is problematic, but not sure is fatal.

@wegank
Copy link
Member

wegank commented Oct 4, 2024

Let's recheck after #346043 lands...

@emilazy
Copy link
Member

emilazy commented Oct 4, 2024

After #346043, all that will need to be done is adding apple-sdk_13 (or whatever) to lima’s buildInputs.

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

No branches or pull requests

4 participants