-
Notifications
You must be signed in to change notification settings - Fork 534
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
Zig Binding doesn't work with static libopendal_c #2471
Comments
Do you mean statically link glibc? |
Static build of glibc on the Zig toolchain is problematic. Note: the error is libunwind missing (eql to gcc_s) exception library (C++) Using Only, musl, libcxx and (custom)compiler-rt are static libraries. |
change the crate-type of libopendal_c like this will break CI: - crate-type = ["cdylib"]
+ crate-type = ["cdylib", "staticlib"] |
Thanks, I will give it a try! |
cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
make: Saindo do diretório '/home/kassane/Documentos/incubator-opendal/bindings/c'
Build Summary: 4/4 steps succeeded; 2/2 tests passed
test success
├─ run make success 142ms MaxRSS:54M
└─ run test 2 passed 1ms MaxRSS:10M
└─ zig test Debug native success 1s MaxRSS:814M
[kassane@Catarino zig]$ ls ../../target/debug/
build deps examples incremental libopendal_c.a libopendal_c.d -- Edit (Optional) My suggestion: |
@kassane Thanks a lot! |
Zig binding's test will fail if
libopendal_c
is build in static:https://github.com/apache/incubator-opendal/actions/runs/5287703769/jobs/9568516765?pr=2470
error: ld.lld: undefined symbol: _Unwind_SetIP note: referenced by gcc.rs:217 (library/std/src/personality/gcc.rs:217) note: std-8389830094602f5a.std.fd8b77e9-cgu.0.rcgu.o:(rust_eh_personality) in archive /home/runner/work/incubator-opendal/incubator-opendal/target/debug/libopendal_c.a
The text was updated successfully, but these errors were encountered: