Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Error when building Qt5.13.2 from source on Windows for Android.



  • Hello,

    I have a problem while trying to build Qt 5.13.2 from source for Android.
    I have used PowerShell on Windows 10.
    Before configure command I have set JDK_ROOT path:

    set "JDK_ROOT=C:\Program Files\Java\jdk1.8.0_241\bin
    

    This configure command is executed successfully:

    ..\src\qt5\configure -prefix E:\Qt\Static\Qt5.13.2Android -platform win32-g++ -opengl es2 -xplatform android-clang -android-sdk C:\Users\user\AppData\Local\Android\Sdk -android-ndk C:\Users\user\AppData\Local\Android\Sdk\ndk\21.3.6528147 -nomake tests -nomake examples -opensource -confirm-license -static -release
    

    I am getting 2 warnings after configure command:

    WARNING: Python version 2 (2.7.5 or later) is required to build QtWebEngine.
    WARNING: host pkg-config not found

    After this I execute:

    mingw32-make -j4
    

    and shortly after start the build stops with this output at the end:

    del ..\..\..\lib\libQt5Bootstrap.a 2>NUL
    ar -rc ..\..\..\lib\libQt5Bootstrap.a @object_script.libQt5Bootstrap.Release
    mingw32-make[4]: Leaving directory 'E:/Qt/Static/build-android/qtbase/src/tools/bootstrap'
    mingw32-make[3]: Leaving directory 'E:/Qt/Static/build-android/qtbase/src/tools/bootstrap'
    mingw32-make[2]: Leaving directory 'E:/Qt/Static/build-android/qtbase/src'
    mingw32-make[1]: *** [Makefile:51: sub-src-make_first] Error 2
    mingw32-make[1]: Leaving directory 'E:/Qt/Static/build-android/qtbase'
    mingw32-make: *** [Makefile:87: module-qtbase-make_first] Error 2
    

    Any suggestion or idea why build stops? Thanks in advance.

    UPDATE: Same happens with Qt 5.14.2 and Qt 5.12.5



  • Found what was causing the problem from here.

    I don't know why but running without -j4 like this:

    mingw32-make
    

    there is no error and qt is built successfully. I thought that without -j4 I would see the error message but luckily there was no error.



  • Found what was causing the problem from here.

    I don't know why but running without -j4 like this:

    mingw32-make
    

    there is no error and qt is built successfully. I thought that without -j4 I would see the error message but luckily there was no error.