Closed dvic closed 3 weeks ago
ok this is a macosx issue, are you on intel macos? i'm away from my arm macos dev box until monday, but will be able to take a look then.
No I’m on a M1 Macbook Pro. Thanks for looking into this! Let me know if you need anything else from me.
apologies, but I'm going to punt this to 0.12.0, which should be out soon (there are only 40 issues left)
No worries, no rush 👍
I think I have a clue what might be the issue here: I encountered the same issue with Rustler projects (e.g., ), and putting this config in the Rust crate fixed the issue:
❯ cat .cargo/config.toml
[target.'cfg(target_os = "macos")']
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
Could this be the issue for Zig as well? I haven't tried it because I don't know how to set linker args using the Zig build system, if I have some time left I can look into it :)
this is fixed in 0.12.1. Issue is that I forgot to tell the compiler to ignore unknown references when building a .so file. For some reason doesn't complain in linux.
Using this simple example:
I get all kinds of undefined references:
This is the generated
build.zig
:Does anything stand out here? The include directory exists: