Skip to content
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

Android runtime linker missing symbol __emutls_get_address #49

Closed
Tereius opened this issue Feb 9, 2022 · 4 comments
Closed

Android runtime linker missing symbol __emutls_get_address #49

Tereius opened this issue Feb 9, 2022 · 4 comments

Comments

@Tereius
Copy link

Tereius commented Feb 9, 2022

Hi,

I want to use mdk-sdk v0.14.0 in a Qt5 App on Android. I compiled Qt 5.15.2 with the Android NDK r21e. As soon as I start the App I can see a UnsatisfiedLinkError exception in Logcat:

2022-02-09 19:36:43.477 5606-5639/org.qtproject.example E/AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
    Process: org.qtproject.example, PID: 5606
    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~E81EpQdeZGcLIpBfGIRNgQ==/org.qtproject.example-SDpDHEObWK1YiOGa1ak5-A==/lib/arm/libmdk.so"...
        at java.lang.Runtime.load0(Runtime.java:939)
        at java.lang.System.load(System.java:1628)
        at org.qtproject.qt5.android.QtNative$3.run(QtNative.java:473)
        at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87)
        at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
        at java.lang.Thread.run(Thread.java:923)

I suspect that it is because the App is bundled with an older libc++_shared from the NDK r21e than mdk-sdk (NDK r23b). Can you provide a release of mdk-sdk compiled with NDK r21e? Qt5 and 6 can't be compiled with a NDK greater r22.

Thank you

@wang-bin
Copy link
Owner

wang-bin commented Feb 10, 2022

ndk23 libc++ is correct, but no benifit for me (and most libraries i guess). I will disable c++ thread_local and use my own implementation to fix the error

wang-bin added a commit to wang-bin/JMI that referenced this issue Feb 11, 2022
@wang-bin wang-bin reopened this Feb 11, 2022
@wang-bin
Copy link
Owner

try the latest build

@wang-bin
Copy link
Owner

this is a bug in llvm, it breaks the compatibility. see llvm/llvm-project#51839

@Tereius
Copy link
Author

Tereius commented Feb 11, 2022

The latest mdk-sdk build works.

Thank you very much

@Tereius Tereius closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants