-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/mobile: gomobile bind: Crash on android: dlopen failed: TLS symbol "(null)" in dlopened x86_64/libgojni.so using IE access model #69109
Comments
I have also tried with go version 1.23.0, the exact same problem. |
cc @hyangah |
I have went through all the above links and they do not solve this problem. The exact same crash error messages occurs in this Issue: mjansson/rpmalloc#332 I have checked the symbols from the libgojni.so with
I suspect (without proof or good reasoning) it might be from In the C library I link with CGO, I do not have any mentions of TLS symbols, nor dependencies on it. I use this imports that might produce some of the above symbols in my go project:
|
I have checked the crypto library, and the grpc library, and it doesn't seem to use CGO to load any TLS library, I think the issue is not from there. |
I checked liblog and libandroid with
Where android-ndk-r26b is extracted from the linux archive from here: https://github.com/android/ndk/releases/tag/r26b I think the issue might originate from here: |
In the file using CGO, I have tried passing the following flags:
And in my gomobile bind command this flags:
And it doesn't solve the issue, it is the same crash and error. |
I don't know if this is of any help, but I've also stumbled upon basically the exact same error message (but as user of fyne), and this is the difference I see between a working APK and non-working APK: Working APK
Non-working APK
HypothesisIt seems like UPDATEYes. I've managed to get rid of all those static library dependencies which were introducing the |
Go version
go version go1.21.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I am creating a go library for Android that I use in React Native. The go library uses CGO (and has a as a dependency a static library that is built against android ndk llvm libc++ ), and also uses gRPC for communication with the server (However in the gRPC package I do not rely on TLS - I have a custom connection protocol, nor anywhere in the library I rely on TLS)
And then I load the .aar archive into a react native project in the respective android project, and created the library data bindings in Kotlin. The project compiles.
What did you see happen?
My Android Kotlin binding that loads the library compiles and I can build it from react native, but when loading it into the Android emulator (Pixel 3a API 34 x86_64) I get the following Crash:
(I think a relevant document is this one: https://android.googlesource.com/platform/bionic/+/HEAD/docs/elf-tls.md)
What did you expect to see?
I was expecting for the react native program to not crash.
The text was updated successfully, but these errors were encountered: