Skip to content

Can't build main branch for macOS EFI=1 due to Nitro errors #357

Closed
@afbjorklund

Description

@afbjorklund

Running make EFI=1 fails:

   Compiling nitro v0.1.0 (/Users/afb/libkrun/src/nitro)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nitro_enclaves`
 --> src/nitro/src/lib.rs:6:5
  |
6 | use nitro_enclaves::{
  |     ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `nitro_enclaves`
  |
  = help: if you wanted to use a crate named `nitro_enclaves`, use `cargo add nitro_enclaves` to add it to your `Cargo.toml`

error[E0432]: unresolved import `nitro_enclaves`
 --> src/nitro/src/lib.rs:6:5
  |
6 | use nitro_enclaves::{
  |     ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `nitro_enclaves`
  |
  = help: if you wanted to use a crate named `nitro_enclaves`, use `cargo add nitro_enclaves` to add it to your `Cargo.toml`

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nitro_enclaves`
 --> src/nitro/src/error.rs:3:5
  |
3 | use nitro_enclaves::launch::LaunchError;
  |     ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `nitro_enclaves`
  |
  = help: if you wanted to use a crate named `nitro_enclaves`, use `cargo add nitro_enclaves` to add it to your `Cargo.toml`

error[E0432]: unresolved import `nix::sys::socket::VsockAddr`
  --> src/nitro/src/lib.rs:13:70
   |
13 |         socket::{connect, socket, AddressFamily, SockFlag, SockType, VsockAddr as NixVsockAddr},
   |                                                                      ---------^^^^^^^^^^^^^^^^
   |                                                                      |
   |                                                                      no `VsockAddr` in `sys::socket`
   |                                                                      help: a similar name exists in the module: `SockAddr`
   |
   = help: consider importing this struct instead:
           vsock::VsockAddr
note: found an item that was configured out
  --> /Users/afb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.26.4/src/sys/socket/mod.rs:70:42
   |
70 | pub use crate::sys::socket::addr::vsock::VsockAddr;
   |                                          ^^^^^^^^^
note: the item is gated here
  --> /Users/afb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.26.4/src/sys/socket/mod.rs:69:1
   |
69 | #[cfg(any(target_os = "android", target_os = "linux"))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no variant or associated item named `Vsock` found for enum `AddressFamily` in the current scope
  --> src/nitro/src/lib.rs:90:28
   |
90 |             AddressFamily::Vsock,
   |                            ^^^^^ variant or associated item not found in `AddressFamily`

Some errors have detailed explanations: E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `nitro` (lib) due to 5 previous errors
$ rustc --version
rustc 1.87.0 (17067e9ac 2025-05-09) (Homebrew)
$ sw_vers
ProductName:		macOS
ProductVersion:		15.5
BuildVersion:		24F74

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions