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

Android: QT_ARCH added to TARGET but is already present (5.14.0rc1)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 5.14.1, 5.15.0 Alpha
    • 5.14.0 RC1
    • Extras: Android
    • None
    • Android NDK 20b, Qt 5.14.0-rc1, Ubuntu 18.04
    • Android
    • ce04fa345dbe52a022b592dde3ff49514c66b4c2 (qt/qtbase/5.14) 12df6c63a0272408f3fa369dccc3c9eb0486a7f8 (qt/qtbase/5.14)

    Description

      Since Qt 5.14.0-rc1 my libraries end up with names like "libName_arm64-v8a_arm64-v8a.so", whereas the second one gets added by a recent fix that does not work as expected. Previously in beta3 the lib and TARGET was correctly "libName_arm64-v8a"/.so.
      The change happend in https://bugreports.qt.io/browse/QTBUG-80351 --> https://codereview.qt-project.org/c/qt/qtbase/+/282873 --> https://codereview.qt-project.org/c/qt/qtbase/+/282873/3/mkspecs/features/android/android.prf#39

       

      The contains check is supposed to check if there is already the _$${QT_ARCH} in the target name, else appends it.
      However the check is also true when QT_ARCH is already presend.

      See example: 

      message($${TARGET})
      TARGET = $$qtLibraryTarget($$TARGET)
      message($${TARGET} - target with librarytarget)
      message(Change from QTBUG-80351)
      !contains(TARGET, "_$${QT_ARCH}"): TARGET = $${TARGET}_$${QT_ARCH}
      message($${TARGET})
      
      -->
      Project MESSAGE: mylib
      Project MESSAGE: mylib_arm64-v8a - target with librarytarget
      Project MESSAGE: Change from QTBUG-80351
      Project MESSAGE: mylib_arm64-v8a_arm64-v8a
      Project MESSAGE: mylib
      Project MESSAGE: mylib_armeabi-v7a - target with librarytarget
      Project MESSAGE: Change from QTBUG-80351
      Project MESSAGE: mylib_armeabi-v7a_armeabi-v7a

      When commenting the own !contains check here (so only the android.prf change is present), I find this in the generated Makefile:

      message($${TARGET})
      TARGET = $$qtLibraryTarget($$TARGET)
      message($${TARGET} - target with librarytarget)
      # message(Change from QTBUG-80351)
      # !contains(TARGET, "_$${QT_ARCH}"): TARGET = $${TARGET}_$${QT_ARCH}
      #message($${TARGET})
      
      QMAKE_TARGET  = mylib_arm64-v8a_arm64-v8a
      DESTDIR       = 
      TARGET        = libmylib_arm64-v8a_arm64-v8a.so
      TARGETA       = libmylib_arm64-v8a_arm64-v8a.a
       

      Can the contains check please be fixed so it does not duplicate the QT_ARCH?

      Attachment: Simple library project (from QtC library wizard) where the issue is shown.

      Attachments

        1. screenrecord-qt-lib2.gif
          screenrecord-qt-lib2.gif
          2.06 MB
        2. screenrecord-qt-lib.gif
          screenrecord-qt-lib.gif
          2.38 MB
        3. mylib.zip
          1 kB

        Issue Links

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

          Activity

            People

              taipan BogDan Vatra
              de-live-gdev Gregor Santner
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes