Closed 20kano closed 5 months ago
Building sokol-zig for Android is pretty much untested, so not sure how much I can help.
The problem seems to be that the linker can't find libraries from the Android NDK anymore. Don't know how that was supposed to work before, I guess via lib.setLibCFile(.{.path="android-libc.conf"});
?
Are the paths in that android-libc.conf
file still pointing to the right directories? But as I said, that's all just guessing from my side since I didn't investigate how to build sokol-zig for Android so far.
Thank you for your reply.
The path exists, so I don't think it is a problem. This worked before.
https://github.com/ziglang/zig/pull/16058
Since the last compilation was before the commit, I thought maybe additional configuration was needed.
Hmm, not sure tbh, as I said, I haven't tried building sokol-zig for Android before.
OK, thanks!
It was solved by
....
lib.setLibCFile(.{.path="android-libc.conf"});
lib.libc_file.?.addStepDependencies(&lib.step);
lib.addLibraryPath(.{.path="/opt/android-sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/33"});
lib.linkSystemLibrary("GLESv3");
lib.linkSystemLibrary("EGL");
lib.linkSystemLibrary("android");
lib.linkSystemLibrary("log");
....
Hmm, I would expect that this information (the library path) is defined inside android-libc.conf
.
Could this be a bug?
Might be a regression in the Zig build system, not sure.
When I compiled it after a long time, the zig specification seems to have changed and the following code returned an error. (0.12.0-dev.3154+0b744da84)
Any advice on how to resolve this would be appreciated.
android-libc.conf