Qt 5.8 deploy fail on android dlopen failed: cannot locate symbol "__page_size"

  • After I made a tutorial here https://bitbucket.org/aykutozdemir/mysql_driver_qt to deploy the application onto the phone. Build everything successful. But when running on the phone, it crashed.
    I found the problem here https://stackoverflow.com/questions/36002823/ndk-build-fails-to-build-superpowered-audio-library-after-recent-ndk-update. But I do not know how to solve it. Did anyone fix this? thanks advance.

    I libpersona: KNOX_SDCARD checking this for 10229
    I libpersona: KNOX_SDCARD not a persona
    W SELinux : SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=org.qtproject.example.kinhdoanh
    I art     : Late-enabling -Xcheck:jni
    D TimaKeyStoreProvider: TimaSignature is unavailable
    D ActivityThread: Added TimaKeyStore provider
    W System  : ClassLoader referenced unknown path:
    W System.err: java.lang.reflect.InvocationTargetException
    W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:237)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:647)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:181)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
    W System.err: 	at android.app.Activity.performCreate(Activity.java:6876)
    W System.err: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
    W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
    W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
    W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)
    W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
    W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)
    W System.err: 	at android.os.Looper.loop(Looper.java:158)
    W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7225)
    W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
    W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__page_size" referenced by "/data/app/org.qtproject.example.kinhdoanh-1/lib/arm/libQt5Core.so"...
    W System.err: 	at java.lang.Runtime.load(Runtime.java:332)
    W System.err: 	at java.lang.System.load(System.java:1069)
    W System.err: 	at org.qtproject.qt5.android.QtNative.loadQtLibraries(QtNative.java:172)
    W System.err: 	at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:582)
    W System.err: 	... 18 more
    D ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{c3c9e76 V.E...... R.....I. 0,0-0,0}
    D SecWifiDisplayUtil: Metadata value : none

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    AFAIK, the quick solution is to use a lower version of the NDK in order to avoid this.

  • I tried android-ndk 10e, 11, 15, in android 10e app crash but did not display any information. I found the error lies in libc.so of andorid ndk. If I remove libc.so the application runs but libmaria.so does not load because libmariadb.so requires libc.so. I use the android 9 API

  • Lifetime Qt Champion

    IIRC, Qt requires at least API level 13 to run.

  • Finally, I solved it by rebuilding the Qt library. My problem is really confusing with the real device. I try running on samsung note 4 (exynos) then crash. But running on the virtual machine, real machine LG (G1), samsung (j2) things are very good. Perhaps the problem lies in the QMutex library (debug) when running on exynos crash that does not show any in logcat. I'm not sure QMutex is compatible with exynos chips.

  • Moderators

    @Xuan-Dien said in Qt 5.8 deploy fail on android dlopen failed: cannot locate symbol "__page_size":

    QMutex is compatible with exynos chips

    I would be really surprised if it would not be "compatible". It is by far more likely that something is wrong in your app and only appears under specific conditions.

  • I'm trying to find specific conditions where the qmutex library crashed on note 4 without going to another device. Sorry my english is not good when using the word "compatible" in this case.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.