Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81866

Android, wrong libraries added as ANDROID_EXTRA_LIBS for armeabi-v7a

    XMLWordPrintable

    Details

    • Platform/s:
      Android
    • Commits:
      75d32a195a1dbba42756353ee1705b709bfab002 (qt/qtbase/dev) 634f633a8569712342113c83db1ffbd0e6449a3d (qt/qtbase/5.15)

      Description

      I updated my project to use Qt 5.14.1 from Qt 5.12.6 and I noticed its missing the openssl libraries for the armeabi-v7a APK.
      The attached example project can reproduce this issue.

       

      The pro file includes the libraries like this:

      android{
        equals(ANDROID_TARGET_ARCH, armeabi-v7a){
        ANDROID_EXTRA_LIBS = $$PWD/armv7/libcrypto_1_1.so \
      		       $$PWD/armv7/libssl_1_1.so
       }
       equals(ANDROID_TARGET_ARCH, arm64-v8a){
        ANDROID_EXTRA_LIBS = $$PWD/arm64/libcrypto_1_1.so \
      		       $$PWD/arm64/libssl_1_1.so
       }
      }
      

       

      For the selected ABI armeabi-v7a in QtCreator the resulting deployment-settings.json looks like this:

      {
         ...
      ,  "architectures": {"armeabi-v7a":"arm-linux-androideabi"},
      ,  "android-extra-libs": "~/arm64/libcrypto_1_1.so,~/arm64/libssl_1_1.so",
         ...
      }
      

      For the selected ABI arm64-v8a deployment-settings.json looks like this:

      {
        ...
      , "architectures": {"arm64-v8a":"aarch64-linux-android"}
      , "android-extra-libs": "~/arm64/libcrypto_1_1.so,~/arm64/libssl_1_1.so"
        ...
      }
      

      "android-extra-libs" is both times the same.
      If you also build for the two different ABI´s the armeabi-v7a APK is missing the libs because they are discarded because they are the wrong architecture.
      The arm64-v8a APK includes them.

       

      I am not sure if this change in behaviour is intentional.
      A possible workaround is adding the libraries for all architectures at once to "ANDROID_EXTRA_LIBS".

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              whoistheguilty Tapio Oksa
              Reporter:
              Marscho Marscho
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There is 1 open Gerrit change