Android .so file name mangled.



  • Qt 5.8 on Android

    I'm specifying third-party .so files using ANDROID_EXTRA_LIBS as below

    ANDROID_EXTRA_LIBS += $$LIB_DIR/libcrypto.so \
            $$LIB_DIR/libssl.so \
            $$LIB_DIR/libogg.so \
            $$LIB_DIR/libopus.so \
            $$LIB_DIR/libspeex.so \
    

    Upon running the application, I got "fatal error, cannot continue" message, LogCat says

    W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libspeex.so.1" not found
    W System.err: 	at java.lang.Runtime.load(Runtime.java:344)
    W System.err: 	at java.lang.System.load(System.java:1079)
    W System.err: 	at org.qtproject.qt5.android.QtNative.loadBundledLibraries(QtNative.java:191)
    W System.err: 	at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:584)
    W System.err: 	... 18 more
    

    Why is the file name changed from ".so" to ".so.1"? I tried using the prefix ".so.1" in ANDROID_EXTRA_LIBS but it won't build (saying library file must begin with "lib" and end with "so").

    How do I get it working?



  • Okay, my bad

    Although the file is named "libspeex.so", the SONAME defined in it is "libspeex.so.1".

    I modified the SONAME using the command rpl and now it can link correctly.


Log in to reply
 

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