Dynamic Library Loading Error

Hello everyone,

I am a fresh user in the forum, even if I have been using Zig for some years now. I am looking for some pointers to file a bug report (if it’s actually a bug). The problem comes from this simple program:

const std = @import("std");

pub fn main() !void {
var vk_lib = try std.DynLib.open("libvulkan.so.1");

const Loader = *fn (?*anyopaque, [*:0]const u8) callconv(.c) ?*anyopaque;
const loader = vk_lib.lookup(Loader, "vkGetInstanceProcAddr")
    orelse return error.SymbolNotFound;

std.debug.print("loader: {}\n", .{ loader });

const res = loader(null, "vkCreateInstance");
std.debug.print("res: {*}", .{ res });

}

const spv align(@alignOf(u32)) = @embedFile("shader").*;
const vk = @import("vulkan");

When I run it compiling without linking to libc I get a runtime error, while if I link libc everything works fine. I would say there is a problem from the elf loading std.

What should I do?