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

errors when targeting uefi #12993

Closed
llogick opened this issue Sep 28, 2022 · 11 comments
Closed

errors when targeting uefi #12993

llogick opened this issue Sep 28, 2022 · 11 comments

Comments

@llogick
Copy link
Contributor

llogick commented Sep 28, 2022

zig version 0.10.0-dev.4192+c75e8f361

target

    const target = CrossTarget{
        .cpu_arch = Target.Cpu.Arch.x86_64,
        .os_tag = Target.Os.Tag.uefi,
        .abi = Target.Abi.msvc,
    };
stage2
$ zig build 
error: sub-compilation of zig_libc failed
    /home/mike/opt/zig/lib/std/os/uefi.zig:21:23: error: variable of type '*os.uefi.tables.system_table.SystemTable' must be const or comptime
pub var system_table: *tables.SystemTable = undefined;
                      ^~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/system_table.zig:25:13: note: struct requires comptime because of this field
    con_in: ?*SimpleTextInputProtocol,
            ^~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_input_protocol.zig:9:13: note: struct requires comptime because of this field
    _reset: fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_input_protocol.zig:9:13: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_input_protocol.SimpleTextInputProtocol, bool) callconv(.C) os.uefi.status.Status' for a function pointer type
    _reset: fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_input_protocol.zig:10:23: note: struct requires comptime because of this field
    _read_key_stroke: fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_input_protocol.zig:10:23: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_input_protocol.SimpleTextInputProtocol, *os.uefi.protocols.simple_text_input_ex_protocol.InputKey) callconv(.C) os.uefi.status.Status' for a function pointer type
    _read_key_stroke: fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/system_table.zig:27:14: note: struct requires comptime because of this field
    con_out: ?*SimpleTextOutputProtocol,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:7:13: note: struct requires comptime because of this field
    _reset: fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:7:13: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, bool) callconv(.C) os.uefi.status.Status' for a function pointer type
    _reset: fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:8:21: note: struct requires comptime because of this field
    _output_string: fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:8:21: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) os.uefi.status.Status' for a function pointer type
    _output_string: fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:9:19: note: struct requires comptime because of this field
    _test_string: fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:9:19: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) os.uefi.status.Status' for a function pointer type
    _test_string: fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:10:18: note: struct requires comptime because of this field
    _query_mode: fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:10:18: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    _query_mode: fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:11:16: note: struct requires comptime because of this field
    _set_mode: fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:11:16: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    _set_mode: fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:12:21: note: struct requires comptime because of this field
    _set_attribute: fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:12:21: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    _set_attribute: fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:13:20: note: struct requires comptime because of this field
    _clear_screen: fn (*const SimpleTextOutputProtocol) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:13:20: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol) callconv(.C) os.uefi.status.Status' for a function pointer type
    _clear_screen: fn (*const SimpleTextOutputProtocol) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:14:27: note: struct requires comptime because of this field
    _set_cursor_position: fn (*const SimpleTextOutputProtocol, usize, usize) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:14:27: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, usize, usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    _set_cursor_position: fn (*const SimpleTextOutputProtocol, usize, usize) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:15:21: note: struct requires comptime because of this field
    _enable_cursor: fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/protocols/simple_text_output_protocol.zig:15:21: note: use '*const fn(comptime *const os.uefi.protocols.simple_text_output_protocol.SimpleTextOutputProtocol, bool) callconv(.C) os.uefi.status.Status' for a function pointer type
    _enable_cursor: fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/system_table.zig:29:14: note: struct requires comptime because of this field
    std_err: ?*SimpleTextOutputProtocol,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/system_table.zig:30:23: note: struct requires comptime because of this field
    runtime_services: *RuntimeServices,
                      ^~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:21:14: note: struct requires comptime because of this field
    getTime: fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(.C) Status,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:21:14: note: use '*const fn(*os.uefi.Time, ?*os.uefi.TimeCapabilities) callconv(.C) os.uefi.status.Status' for a function pointer type
    getTime: fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(.C) Status,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:24:14: note: struct requires comptime because of this field
    setTime: fn (time: *uefi.Time) callconv(.C) Status,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:24:14: note: use '*const fn(*os.uefi.Time) callconv(.C) os.uefi.status.Status' for a function pointer type
    setTime: fn (time: *uefi.Time) callconv(.C) Status,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:27:20: note: struct requires comptime because of this field
    getWakeupTime: fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:27:20: note: use '*const fn(*bool, *bool, *os.uefi.Time) callconv(.C) os.uefi.status.Status' for a function pointer type
    getWakeupTime: fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:30:20: note: struct requires comptime because of this field
    setWakeupTime: fn (enable: *bool, time: ?*uefi.Time) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:30:20: note: use '*const fn(*bool, ?*os.uefi.Time) callconv(.C) os.uefi.status.Status' for a function pointer type
    setWakeupTime: fn (enable: *bool, time: ?*uefi.Time) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:33:27: note: struct requires comptime because of this field
    setVirtualAddressMap: fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:33:27: note: use '*const fn(usize, usize, u32, [*]os.uefi.tables.boot_services.MemoryDescriptor) callconv(.C) os.uefi.status.Status' for a function pointer type
    setVirtualAddressMap: fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:36:21: note: struct requires comptime because of this field
    convertPointer: fn (debug_disposition: usize, address: **anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:36:21: note: use '*const fn(usize, **anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    convertPointer: fn (debug_disposition: usize, address: **anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:39:18: note: struct requires comptime because of this field
    getVariable: fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:39:18: note: use '*const fn([*:0]const u16, *align(8) const os.uefi.Guid, ?*u32, *usize, ?*anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    getVariable: fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:42:26: note: struct requires comptime because of this field
    getNextVariableName: fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(.C) Status,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:42:26: note: use '*const fn(*usize, [*:0]u16, *align(8) os.uefi.Guid) callconv(.C) os.uefi.status.Status' for a function pointer type
    getNextVariableName: fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(.C) Status,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:45:18: note: struct requires comptime because of this field
    setVariable: fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:45:18: note: use '*const fn([*:0]const u16, *align(8) const os.uefi.Guid, u32, usize, *anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    setVariable: fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:48:32: note: struct requires comptime because of this field
    getNextHighMonotonicCount: fn (high_count: *u32) callconv(.C) Status,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:48:32: note: use '*const fn(*u32) callconv(.C) os.uefi.status.Status' for a function pointer type
    getNextHighMonotonicCount: fn (high_count: *u32) callconv(.C) Status,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:51:18: note: struct requires comptime because of this field
    resetSystem: fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(.C) noreturn,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:51:18: note: use '*const fn(os.uefi.tables.runtime_services.ResetType, os.uefi.status.Status, usize, ?*const anyopaque) callconv(.C) noreturn' for a function pointer type
    resetSystem: fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(.C) noreturn,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:58:20: note: struct requires comptime because of this field
    updateCapsule: fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:58:20: note: use '*const fn(**os.uefi.tables.runtime_services.CapsuleHeader, usize, u64) callconv(.C) os.uefi.status.Status' for a function pointer type
    updateCapsule: fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:61:31: note: struct requires comptime because of this field
    queryCapsuleCapabilities: fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(.C) Status,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:61:31: note: use '*const fn(**os.uefi.tables.runtime_services.CapsuleHeader, usize, *usize, os.uefi.tables.runtime_services.ResetType) callconv(.C) os.uefi.status.Status' for a function pointer type
    queryCapsuleCapabilities: fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(.C) Status,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:64:24: note: struct requires comptime because of this field
    queryVariableInfo: fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(.C) Status,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/runtime_services.zig:64:24: note: use '*const fn(*u32, *u64, *u64, *u64) callconv(.C) os.uefi.status.Status' for a function pointer type
    queryVariableInfo: fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(.C) Status,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/system_table.zig:31:20: note: struct requires comptime because of this field
    boot_services: ?*BootServices,
                   ^~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:24:15: note: struct requires comptime because of this field
    raiseTpl: fn (new_tpl: usize) callconv(.C) usize,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:24:15: note: use '*const fn(usize) callconv(.C) usize' for a function pointer type
    raiseTpl: fn (new_tpl: usize) callconv(.C) usize,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:27:17: note: struct requires comptime because of this field
    restoreTpl: fn (old_tpl: usize) callconv(.C) void,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:27:17: note: use '*const fn(usize) callconv(.C) void' for a function pointer type
    restoreTpl: fn (old_tpl: usize) callconv(.C) void,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:30:20: note: struct requires comptime because of this field
    allocatePages: fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:30:20: note: use '*const fn(os.uefi.tables.boot_services.AllocateType, os.uefi.tables.boot_services.MemoryType, usize, *[*]align(4096) u8) callconv(.C) os.uefi.status.Status' for a function pointer type
    allocatePages: fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:33:16: note: struct requires comptime because of this field
    freePages: fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:33:16: note: use '*const fn([*]align(4096) u8, usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    freePages: fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:36:19: note: struct requires comptime because of this field
    getMemoryMap: fn (mmap_size: *usize, mmap: [*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:36:19: note: use '*const fn(*usize, [*]os.uefi.tables.boot_services.MemoryDescriptor, *usize, *usize, *u32) callconv(.C) os.uefi.status.Status' for a function pointer type
    getMemoryMap: fn (mmap_size: *usize, mmap: [*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:39:19: note: struct requires comptime because of this field
    allocatePool: fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:39:19: note: use '*const fn(os.uefi.tables.boot_services.MemoryType, usize, *[*]align(8) u8) callconv(.C) os.uefi.status.Status' for a function pointer type
    allocatePool: fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:42:15: note: struct requires comptime because of this field
    freePool: fn (buffer: [*]align(8) u8) callconv(.C) Status,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:42:15: note: use '*const fn([*]align(8) u8) callconv(.C) os.uefi.status.Status' for a function pointer type
    freePool: fn (buffer: [*]align(8) u8) callconv(.C) Status,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:49:15: note: struct requires comptime because of this field
    setTimer: fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(.C) Status,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:49:15: note: use '*const fn(*os.uefi.Event__opaque_1405, os.uefi.tables.boot_services.TimerDelay, u64) callconv(.C) os.uefi.status.Status' for a function pointer type
    setTimer: fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(.C) Status,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:52:19: note: struct requires comptime because of this field
    waitForEvent: fn (event_len: usize, events: [*]const Event, index: *usize) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:52:19: note: use '*const fn(usize, [*]const *os.uefi.Event__opaque_1405, *usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    waitForEvent: fn (event_len: usize, events: [*]const Event, index: *usize) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:55:18: note: struct requires comptime because of this field
    signalEvent: fn (event: Event) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:55:18: note: use '*const fn(*os.uefi.Event__opaque_1405) callconv(.C) os.uefi.status.Status' for a function pointer type
    signalEvent: fn (event: Event) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:58:17: note: struct requires comptime because of this field
    closeEvent: fn (event: Event) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:58:17: note: use '*const fn(*os.uefi.Event__opaque_1405) callconv(.C) os.uefi.status.Status' for a function pointer type
    closeEvent: fn (event: Event) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:61:17: note: struct requires comptime because of this field
    checkEvent: fn (event: Event) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:61:17: note: use '*const fn(*os.uefi.Event__opaque_1405) callconv(.C) os.uefi.status.Status' for a function pointer type
    checkEvent: fn (event: Event) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:66:31: note: struct requires comptime because of this field
    installProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(.C) Status,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:66:31: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, os.uefi.tables.boot_services.EfiInterfaceType, *anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    installProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(.C) Status,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:69:33: note: struct requires comptime because of this field
    reinstallProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(.C) Status,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:69:33: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *anyopaque, *anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    reinstallProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(.C) Status,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:73:33: note: struct requires comptime because of this field
    uninstallProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(.C) Status,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:73:33: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    uninstallProtocolInterface: fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(.C) Status,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:76:21: note: struct requires comptime because of this field
    handleProtocol: fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:76:21: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *?*anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    handleProtocol: fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:81:29: note: struct requires comptime because of this field
    registerProtocolNotify: fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(.C) Status,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:81:29: note: use '*const fn(*align(8) const os.uefi.Guid, *os.uefi.Event__opaque_1405, **anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    registerProtocolNotify: fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(.C) Status,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:84:19: note: struct requires comptime because of this field
    locateHandle: fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:84:19: note: use '*const fn(os.uefi.tables.boot_services.LocateSearchType, ?*align(8) const os.uefi.Guid, ?*const anyopaque, *usize, [*]*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    locateHandle: fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:87:23: note: struct requires comptime because of this field
    locateDevicePath: fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:87:23: note: use '*const fn(*align(8) const os.uefi.Guid, **const os.uefi.protocols.device_path_protocol.DevicePathProtocol, *?*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    locateDevicePath: fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:90:32: note: struct requires comptime because of this field
    installConfigurationTable: fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(.C) Status,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:90:32: note: use '*const fn(*align(8) const os.uefi.Guid, ?*anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    installConfigurationTable: fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(.C) Status,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:93:16: note: struct requires comptime because of this field
    loadImage: fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:93:16: note: use '*const fn(bool, *os.uefi.Handle__opaque_979, ?*const os.uefi.protocols.device_path_protocol.DevicePathProtocol, ?[*]const u8, usize, *?*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    loadImage: fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(.C) Status,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:96:17: note: struct requires comptime because of this field
    startImage: fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:96:17: note: use '*const fn(*os.uefi.Handle__opaque_979, ?*usize, ?*[*]u16) callconv(.C) os.uefi.status.Status' for a function pointer type
    startImage: fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(.C) Status,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:99:11: note: struct requires comptime because of this field
    exit: fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(.C) Status,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:99:11: note: use '*const fn(*os.uefi.Handle__opaque_979, os.uefi.status.Status, usize, ?*const anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    exit: fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(.C) Status,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:102:18: note: struct requires comptime because of this field
    unloadImage: fn (image_handle: Handle) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:102:18: note: use '*const fn(*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    unloadImage: fn (image_handle: Handle) callconv(.C) Status,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:105:23: note: struct requires comptime because of this field
    exitBootServices: fn (image_handle: Handle, map_key: usize) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:105:23: note: use '*const fn(*os.uefi.Handle__opaque_979, usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    exitBootServices: fn (image_handle: Handle, map_key: usize) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:108:28: note: struct requires comptime because of this field
    getNextMonotonicCount: fn (count: *u64) callconv(.C) Status,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:108:28: note: use '*const fn(*u64) callconv(.C) os.uefi.status.Status' for a function pointer type
    getNextMonotonicCount: fn (count: *u64) callconv(.C) Status,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:111:12: note: struct requires comptime because of this field
    stall: fn (microseconds: usize) callconv(.C) Status,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:111:12: note: use '*const fn(usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    stall: fn (microseconds: usize) callconv(.C) Status,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:114:23: note: struct requires comptime because of this field
    setWatchdogTimer: fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:114:23: note: use '*const fn(usize, u64, usize, ?[*]const u16) callconv(.C) os.uefi.status.Status' for a function pointer type
    setWatchdogTimer: fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(.C) Status,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:117:24: note: struct requires comptime because of this field
    connectController: fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(.C) Status,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:117:24: note: use '*const fn(*os.uefi.Handle__opaque_979, ?*os.uefi.Handle__opaque_979, ?*os.uefi.protocols.device_path_protocol.DevicePathProtocol, bool) callconv(.C) os.uefi.status.Status' for a function pointer type
    connectController: fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(.C) Status,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:120:27: note: struct requires comptime because of this field
    disconnectController: fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:120:27: note: use '*const fn(*os.uefi.Handle__opaque_979, ?*os.uefi.Handle__opaque_979, ?*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    disconnectController: fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(.C) Status,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:123:19: note: struct requires comptime because of this field
    openProtocol: fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:123:19: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *?*anyopaque, ?*os.uefi.Handle__opaque_979, ?*os.uefi.Handle__opaque_979, os.uefi.tables.boot_services.OpenProtocolAttributes) callconv(.C) os.uefi.status.Status' for a function pointer type
    openProtocol: fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(.C) Status,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:126:20: note: struct requires comptime because of this field
    closeProtocol: fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:126:20: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *os.uefi.Handle__opaque_979, ?*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    closeProtocol: fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:129:30: note: struct requires comptime because of this field
    openProtocolInformation: fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(.C) Status,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:129:30: note: use '*const fn(*os.uefi.Handle__opaque_979, *align(8) const os.uefi.Guid, *[*]os.uefi.tables.boot_services.ProtocolInformationEntry, *usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    openProtocolInformation: fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(.C) Status,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:132:25: note: struct requires comptime because of this field
    protocolsPerHandle: fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(.C) Status,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:132:25: note: use '*const fn(*os.uefi.Handle__opaque_979, *[*]*align(8) const os.uefi.Guid, *usize) callconv(.C) os.uefi.status.Status' for a function pointer type
    protocolsPerHandle: fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(.C) Status,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:135:25: note: struct requires comptime because of this field
    locateHandleBuffer: fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(.C) Status,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:135:25: note: use '*const fn(os.uefi.tables.boot_services.LocateSearchType, ?*align(8) const os.uefi.Guid, ?*const anyopaque, *usize, *[*]*os.uefi.Handle__opaque_979) callconv(.C) os.uefi.status.Status' for a function pointer type
    locateHandleBuffer: fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(.C) Status,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:138:21: note: struct requires comptime because of this field
    locateProtocol: fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:138:21: note: use '*const fn(*align(8) const os.uefi.Guid, ?*const anyopaque, *?*anyopaque) callconv(.C) os.uefi.status.Status' for a function pointer type
    locateProtocol: fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:141:40: note: struct requires comptime because of this field
    installMultipleProtocolInterfaces: fn (handle: *Handle, ...) callconv(.C) Status,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:141:40: note: use '*const fn(**os.uefi.Handle__opaque_979, ...) callconv(.C) os.uefi.status.Status' for a function pointer type
    installMultipleProtocolInterfaces: fn (handle: *Handle, ...) callconv(.C) Status,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:144:42: note: struct requires comptime because of this field
    uninstallMultipleProtocolInterfaces: fn (handle: *Handle, ...) callconv(.C) Status,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:144:42: note: use '*const fn(**os.uefi.Handle__opaque_979, ...) callconv(.C) os.uefi.status.Status' for a function pointer type
    uninstallMultipleProtocolInterfaces: fn (handle: *Handle, ...) callconv(.C) Status,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:147:21: note: struct requires comptime because of this field
    calculateCrc32: fn (data: [*]const u8, data_size: usize, *u32) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:147:21: note: use '*const fn([*]const u8, usize, *u32) callconv(.C) os.uefi.status.Status' for a function pointer type
    calculateCrc32: fn (data: [*]const u8, data_size: usize, *u32) callconv(.C) Status,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:150:14: note: struct requires comptime because of this field
    copyMem: fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(.C) void,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:150:14: note: use '*const fn([*]u8, [*]const u8, usize) callconv(.C) void' for a function pointer type
    copyMem: fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(.C) void,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:153:13: note: struct requires comptime because of this field
    setMem: fn (buffer: [*]u8, size: usize, value: u8) callconv(.C) void,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:153:13: note: use '*const fn([*]u8, usize, u8) callconv(.C) void' for a function pointer type
    setMem: fn (buffer: [*]u8, size: usize, value: u8) callconv(.C) void,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:156:20: note: struct requires comptime because of this field
    createEventEx: fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/mike/opt/zig/lib/std/os/uefi/tables/boot_services.zig:156:20: note: use '*const fn(u32, usize, comptime fn(*os.uefi.Event__opaque_1405, *anyopaque) callconv(.C) void, *const anyopaque, *align(8) const os.uefi.Guid, **os.uefi.Event__opaque_1405) callconv(.C) os.uefi.status.Status' for a function pointer type
    createEventEx: fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@llogick
Copy link
Contributor Author

llogick commented Sep 28, 2022

stage1

code:

    const LoadedImageProtocol = zig.std.os.uefi.protocols.LoadedImageProtocol;
    var this_image: ?*LoadedImageProtocol align(8) = null;
    var uefi_status = zig.uefi.system_table.boot_services.?.openProtocol(zig.uefi.handle, &LoadedImageProtocol.guid, @ptrCast(*?*anyopaque, &this_image), zig.uefi.handle, null, zig.uefi.tables.OpenProtocolAttributes{ .by_handle_protocol = true });
    if (uefi_status == .Success) {
        print("image base: {*}, image size: {}\r\n", .{ this_image.?.image_base, this_image.?.image_size });
    } else {
        print("Could not obtain current image's info (base, size, etc..): {}", .{uefi_status});
    }
$ zig build -fstage1
LLD Link... lld-link: warning: /align specified without /driver; image may not run
lld-link: error: undefined symbol: __chkstk
>>> referenced by /home/mike/Work/uefibm/zig-cache/o/a2f300aa43585fc609b979dec078ccd7/BOOTX64.obj:(__zig_tag_name_std.os.uefi.status.Status)

if uefi_status is ommited in

print("Could not obtain current image's info (base, size, etc..): {}", .{uefi_status});

it compiles fine

@Luukdegram
Copy link
Member

This is due to the change of function pointers in stage2. Solved by #12761

@llogick
Copy link
Contributor Author

llogick commented Sep 28, 2022

This is due to the change of function pointers in stage2. Solved by #12761

that still leaves stage1, it's how i last compiled it successfully ~Aug 15 with a compiler that couldn't have been older than mid June (kicking myself for not being able to provide more specifics)

i'll just wait for 12761, feel free to close this one

PS, any way to pass -fno-stack-protector to stage1 ?

@Luukdegram
Copy link
Member

No, that PR uses std.meta.FnPtr which allows std to work for both stage1 and stage2.

@wooster0
Copy link
Contributor

Also see #12897 and #12899 which are also in effort to fix this.

@llogick
Copy link
Contributor Author

llogick commented Sep 28, 2022

i hear you both on stage2, but can you state with certainty that the lack of std.meta.FnPtr is the reason for

lld-link: error: undefined symbol: __chkstk
>>> referenced by /home/mike/Work/uefibm/zig-cache/o/a2f300aa43585fc609b979dec078ccd7/BOOTX64.obj:(__zig_tag_name_std.os.uefi.status.Status)
``

@Luukdegram
Copy link
Member

Luukdegram commented Sep 28, 2022

Apologies, I missed your second post containing that linker error.
It's a symbol that's emitted by the compiler. It's part of compiler-rt, but doesn't seem to be exported as currently it's only exported for Windows: https://github.com/ziglang/zig/blob/master/lib/compiler_rt/stack_probe.zig#L16-L30

That needs to be fixed also, meaning the lack of std.meta.FnPtr does not fix this issue.

@llogick
Copy link
Contributor Author

llogick commented Oct 1, 2022

edit:
stage2 are caused by

pub const EfiEventNotify = fn (event: Event, ctx: *anyopaque) callconv(.C) void;

and after a simple edit
pub const EfiEventNotify = std.meta.FnPtr(fn (event: Event, ctx: *anyopaque) callconv(.C) void);
it runs ! ❤️

original comment:
update

> zig version
0.10.0-dev.4212+34835bbbc
stage2, verbatim
> zig build
error: sub-compilation of zig_libc failed
    c:\opt\local\lib\zig\std\os\uefi.zig:21:23: error: variable of type '*os.uefi.tables.system_table.SystemTable' must be const or comptime
pub var system_table: *tables.SystemTable = undefined;
                      ^~~~~~~~~~~~~~~~~~~
    c:\opt\local\lib\zig\std\os\uefi\tables\system_table.zig:31:20: note: struct requires comptime because of this field
    boot_services: ?*BootServices,
                   ^~~~~~~~~~~~~~
    c:\opt\local\lib\zig\std\os\uefi\tables\boot_services.zig:156:34: note: struct requires comptime because of this field
    createEventEx: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status),
                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    c:\opt\local\lib\zig\std\os\uefi\tables\boot_services.zig:156:34: note: function is generic
    createEventEx: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\opt\local\lib\zig\std\start.zig:245:33: error: parameter of type '*os.uefi.tables.system_table.SystemTable' must be declared comptime
fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) callconv(.C) usize {
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\opt\local\lib\zig\std\os\uefi.zig:21:23: error: variable of type '*os.uefi.tables.system_table.SystemTable' must be const or comptime
pub var system_table: *tables.SystemTable = undefined;
                      ^~~~~~~~~~~~~~~~~~~
c:\opt\local\lib\zig\std\os\uefi\tables\system_table.zig:31:20: note: struct requires comptime because of this field
    boot_services: ?*BootServices,
                   ^~~~~~~~~~~~~~
c:\opt\local\lib\zig\std\os\uefi\tables\boot_services.zig:156:34: note: struct requires comptime because of this field
    createEventEx: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status),
                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\opt\local\lib\zig\std\os\uefi\tables\boot_services.zig:156:34: note: function is generic
    createEventEx: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status),
                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: BOOTX64...
stage1
> zig build -fstage1
C:\opt\local\lib\zig\std\os\uefi\protocols\simple_text_input_protocol.zig:9:37: error: struct 'std.os.uefi.protocols.simple_text_input_protocol.SimpleTextInputProtocol' depends on itself
pub const SimpleTextInputProtocol = extern struct {
                                    ^
C:\opt\local\lib\zig\std\os\uefi\tables\system_table.zig:25:5: note: while checking this field
    con_in: ?*SimpleTextInputProtocol,
    ^
error: BOOTX64...

Regards

@wooster0
Copy link
Contributor

wooster0 commented Oct 1, 2022

It looks like that was mistakenly not part of #12761; my PR covers it though: https://github.com/ziglang/zig/pull/12897/files#diff-a9ae709e3361cc62811e553b8ab0bfa1f58d03ad513de4316a65a3ea46141056R194.

@llogick
Copy link
Contributor Author

llogick commented Oct 12, 2022

Given that r00sters91's PR 👍 just landed the fixes to stage2,
and that stage1's error isn't strictly an uefi issue I'm closing this as completed.

Thank Yous

@llogick llogick closed this as completed Oct 12, 2022
@wooster0
Copy link
Contributor

I believe targeting the UEFI is still largely broken because all the structs are still based on old packed struct semantics. Fixing this was originally part of #12897 but it turned out we are more or less missing a language feature now to really fix the UEFI libs, which is what #13009 is for. You can reopen this issue if you want but otherwise I think people will still be aware of the UEFI libs being broken.

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

3 participants