libkrun icon indicating copy to clipboard operation
libkrun copied to clipboard

fails to build with `EFI=1`

Open cgwalters opened this issue 11 months ago • 1 comments

cargo build --release --features efi,gpu
   Compiling vmm v0.1.0 (/var/srv/walters/src/github/containers/libkrun/src/vmm)
error[E0425]: cannot find value `kernel_bundle` in this scope
   --> src/vmm/src/builder.rs:475:46
    |
475 |     let boot_ip: GuestAddress = GuestAddress(kernel_bundle.entry_addr);
    |                                              ^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `MmapRegion` in this scope
   --> src/vmm/src/builder.rs:678:20
    |
678 |     kernel_region: MmapRegion,
    |                    ^^^^^^^^^^ not found in this scope
    |
help: consider importing this struct
    |
8   + use vm_memory::MmapRegion;
    |

error[E0061]: this function takes 4 arguments but 1 argument was supplied
   --> src/vmm/src/builder.rs:331:44
    |
331 |       let (guest_memory, arch_memory_info) = create_guest_memory(
    |  ____________________________________________^^^^^^^^^^^^^^^^^^^-
332 | |         vm_resources
333 | |             .vm_config()
334 | |             .mem_size_mib
...   |
345 | |         initrd_bundle,
346 | |     )?;
    | |_____- three arguments are missing
    |
note: function defined here
   --> src/vmm/src/builder.rs:676:8
    |
676 | pub fn create_guest_memory(
    |        ^^^^^^^^^^^^^^^^^^^
677 |     mem_size_mib: usize,
    |     -------------------
678 |     kernel_region: MmapRegion,
    |     -------------------------
679 |     kernel_load_addr: u64,
    |     ---------------------
680 |     kernel_size: usize,
    |     ------------------
help: provide the arguments
    |
331 ~     let (guest_memory, arch_memory_info) = create_guest_memory(vm_resources
332 +             .vm_config()
333 +             .mem_size_mib
334 ~             .ok_or(StartMicrovmError::MissingMemSizeConfig)?, /* kernel_region */, /* u64 */, /* usize */)?;
    |

Some errors have detailed explanations: E0061, E0412, E0425.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `vmm` (lib) due to 3 previous errors

cgwalters avatar Feb 28 '24 21:02 cgwalters

Ah I guess this is known since

At present, libkrun-efi is only available on macOS

Switching to developing on the Mac for the moment then...

cgwalters avatar Feb 28 '24 21:02 cgwalters