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

make distclean fails with Qt for Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.11, 5.15.2
    • Build System
    • None
    • Android

    Description

      make distclean fails with Qt for Android

      This was tested with Qt 5.12.11 and 5.15.2 using the original single source tarballs from https://download.qt.io/official_releases/qt/

      1. run "./configure"

              ./configure \
                  -confirm-license \
                  -prefix "/usr/lib/qt4android-5.15" \
                  -opensource \
                  -xplatform android-clang \
                  -disable-rpath \
                  -skip qtwebengine \
                  -skip qtmacextras \
                  -skip qtwinextras \
                  -skip qtx11extras \
                  -skip qtwayland \
                  -nomake tests \
                  -nomake examples \
                  -android-sdk /opt/Sdk \
                  -android-ndk /opt/Sdk/ndk/20.1.5948944 \
                  -no-warnings-are-errors
      

      2. run "make"

      make
      

      2b. I also ran make install, but not sure that this changes anything

      3. run "make distclean" or "make -f Makefile distclean"

      4. Reported error (full log attached)

      make[1]: Leaving directory '/build/qt-everywhere-src-5.15.2/qtbase'
      cd qtnetworkauth/ && ( test -e Makefile || /build/qt-everywhere-src-5.15.2/qtbase/bin/qmake -o Makefile /build/qt-everywhere-src-5.15.2/qtnetworkauth/qtnetworkauth.pro ) && make -f Makefile distclean
      make[1]: Entering directory '/build/qt-everywhere-src-5.15.2/qtnetworkauth'
      /build/qt-everywhere-src-5.15.2/qtbase/bin/qmake -o Makefile qtnetworkauth.pro
      /build/qt-everywhere-src-5.15.2/qtnetworkauth/.qmake.conf:1: Cannot find feature qt_build_config
      Cannot find feature spec_pre.prf
      Error processing project file: qtnetworkauth.pro
      Makefile:254: recipe for target 'Makefile' failed
      make[1]: *** [Makefile] Error 3
      make[1]: Leaving directory '/build/qt-everywhere-src-5.15.2/qtnetworkauth'
      Makefile:116: recipe for target 'module-qtnetworkauth-distclean' failed
      make: *** [module-qtnetworkauth-distclean] Error 2
      

      Workaround I used (to be applied *before any execution of distclean):*

      Workaround 'A':
      In the main Makefile:

      • invert the order of all subtargets of the "distclean" target
      • remove all subtargets of all *-distclean targets.

      Workaround 'B' once Workaround 'A' is applied:

      Once workaround A is applied and we run make distclean, a few other problems are revealed.
      To fix them apply the changes before running distclean (ie one has first to (re)do a clean build, then apply the workaround A, then the workaround B, then only after that run 'make distclean' )

      This workaround will remove some faulty subtargets

      For Qt 5.12 & 5.15

      sed '/^distclean: / s,sub-examples-distclean,,' -i qtdoc/Makefile
      

      For Qt 5.15 only

      sed '/^distclean: / s,sub-plugins-distclean,,' -i qttools/src/designer/src/Makefile
      sed '/^distclean: / s,sub-examples-distclean,,' -i qttools/Makefile
      

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            ban F S
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes