Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with building Qt 5.15.16 for UWP arm
Forum Updated to NodeBB v4.3 + New Features

Issue with building Qt 5.15.16 for UWP arm

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 755 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Cobra91151C Offline
    Cobra91151C Offline
    Cobra91151
    wrote on last edited by Cobra91151
    #1

    Hello!

    I want to build Qt 5.15.16 for UWP arm architecture. I use "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm.bat" command prompt and get the following error:

    fatal error C1189: #error: "Unable to determine byte order!"

    ** Visual Studio 2019 Developer Command Prompt v16.11.42
    ** Copyright (c) 2021 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x86_arm'
    C:\QtBuild\qt-everywhere-src-5.15.16>configure.bat -top-level -debug-and-release -xplatform "winrt-arm-msvc2019" -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix "C:\Qt\5.15.16\winrt_armv7_msvc2019"
    + cd qtbase
    + C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\configure.bat -top-level -top-level -debug-and-release -xplatform "winrt-arm-msvc2019" -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix "C:\Qt\5.15.16\winrt_armv7_msvc2019"
    Bootstrapping qmake ...
    
    jom 1.1.4 - empower your cores
    
            cl -c -Fo./ -Fdqmake.pdb  -W2 -nologo -O2  /MP /wd4577   -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\library -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\unix -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\win32 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\mac  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/src/3rdparty/tinycbor/src  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16\QtCore  -I..\src\corelib\global  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\win32-msvc   -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS  -DQT_VERSION_STR=\"5.15.16\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=16  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL  -DQT_NO_FOREACH -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -c -Yc -Fpqmake_pch.pch -TP C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\qmake_pch.h
    qmake_pch.h
    C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\include\QtCore\../../src/corelib/global/qprocessordetection.h(364): fatal error C1189: #error:  "Unable to determine byte order!"
    jom: C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\Makefile [qmake_pch.obj] Error 2
    
    C:\QtBuild\qt-everywhere-src-5.15.16>
    

    According to the file: qprocessordetection.h

    /*
      NOTE:
      GCC 4.6 added __BYTE_ORDER__, __ORDER_BIG_ENDIAN__, __ORDER_LITTLE_ENDIAN__
      and __ORDER_PDP_ENDIAN__ in SVN r165881. If you are using GCC 4.6 or newer,
      this code will properly detect your target byte order; if you are not, and
      the __LITTLE_ENDIAN__ or __BIG_ENDIAN__ macros are not defined, then this
      code will fail to detect the target byte order.
    */
    // Some processors support either endian format, try to detect which we are using.
    #if !defined(Q_BYTE_ORDER)
    #  if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == Q_BIG_ENDIAN || __BYTE_ORDER__ == Q_LITTLE_ENDIAN)
    // Reuse __BYTE_ORDER__ as-is, since our Q_*_ENDIAN #defines match the preprocessor defaults
    #    define Q_BYTE_ORDER __BYTE_ORDER__
    #  elif defined(__BIG_ENDIAN__) || defined(_big_endian__) || defined(_BIG_ENDIAN)
    #    define Q_BYTE_ORDER Q_BIG_ENDIAN
    #  elif defined(__LITTLE_ENDIAN__) || defined(_little_endian__) || defined(_LITTLE_ENDIAN) \
            || defined(WINAPI_FAMILY) // WinRT is always little-endian according to MSDN.
    #    define Q_BYTE_ORDER Q_LITTLE_ENDIAN
    #  else
    #    error "Unable to determine byte order!"
    #  endif
    #endif
    

    The issue is that it can not detect the Q_BYTE_ORDER when using vcvarsx86_arm.bat for crossplatform compilation.
    Any ideas how to fix this issue? Thanks.

    1 Reply Last reply
    0
    • Cobra91151C Offline
      Cobra91151C Offline
      Cobra91151
      wrote on last edited by Cobra91151
      #9

      Hello!

      I removed the jom from PATH environment variable to use nmake to get the proper error message. I get the following issue:

      Running configuration tests...
      Checking for valid makespec...
      + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch"  "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec
      + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& nmake
      > Microsoft (R) Program Maintenance Utility Version 14.29.30158.0
      > Copyright (C) Microsoft Corporation.  All rights reserved.
      >       cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\nm3D22.tmp
      > verifyspec.cpp
      >       link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\nm3D71.tmp
      > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'
      > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\ARM\link.EXE"' : return code '0x49d'
      > Stop.
      ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
      C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild>
      

      The problem was with > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'.

      I found out that this issue is causing the latest Windows SDK - 10.0.26100.0: https://discussions.unity.com/t/info-link-fatal-error-lnk1181-cannot-open-input-file-ucrt-lib-hololens-2-build-issue/950584/3
      So, I used the following Windows SDK: 10.0.22621.0 and run: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" 10.0.22621.0
      Now, it completed the configuration and I successfully built Qt 5.15.16 for winrt-arm-msvc2019 architecture. This issue is resolved. Thanks.

      1 Reply Last reply
      1
      • Cobra91151C Offline
        Cobra91151C Offline
        Cobra91151
        wrote on last edited by Cobra91151
        #2

        According to this documentation: https://wiki.qt.io/WinRTBuild
        From docs:
        No matter what your target (PC, Surface, Phone, etc.), ALWAYS USE the "x86 Native tools command prompt". This is because the command prompt will first build host tools (qmake, moc, rcc, etc.) and then cross-compile the Qt libraries. Do not open the Windows Phone command prompt, for instance, as it will not be able to build the host tools.

        So, I tried the x86 Native Tools Command Prompt for VS 2019 to build: winrt-arm-msvc2019

        ...
        cl -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch -c -Fo./ -Fdqmake.pdb  -W2 -nologo -O2  /MP /wd4577   -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\library -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\unix -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\win32 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\mac  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/src/3rdparty/tinycbor/src  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16\QtCore  -I..\src\corelib\global  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\win32-msvc   -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS  -DQT_VERSION_STR=\"5.15.16\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=16  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL  -DQT_NO_FOREACH -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE  C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\src\corelib\serialization\qjsonvalue.cpp
        qjsonvalue.cpp
               cl -c -Fo./ -Fdqmake.pdb  -W2 -nologo -O2  /MP /wd4577   -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\library -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\unix -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\win32 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\mac  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/src/3rdparty/tinycbor/src  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16\QtCore  -I..\src\corelib\global  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\win32-msvc   -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS  -DQT_VERSION_STR=\"5.15.16\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=16  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL  -DQT_NO_FOREACH -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DQT_BUILD_QMAKE_BOOTSTRAP C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\src\corelib\global\qlibraryinfo.cpp
        qlibraryinfo.cpp
               link  /OUT:..\bin\qmake.exe project.obj main.obj ioutils.obj proitems.obj qmakevfs.obj  qmakeglobals.obj qmakeparser.obj qmakeevaluator.obj qmakebuiltins.obj  makefile.obj unixmake.obj unixmake2.obj mingw_make.obj  option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj  makefiledeps.obj metamakefile.obj xmloutput.obj  msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj  msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj qbitarray.obj  qbuffer.obj  qcryptographichash.obj  qfilesystementry.obj  qfilesystemengine.obj  qfilesystemengine_win.obj  qfilesystemiterator_win.obj  qfsfileengine.obj  qfsfileengine_iterator.obj  qarraydata.obj  qbytearray.obj  qbytearraylist.obj  qvsnprintf.obj  qbytearraymatcher.obj  qcalendar.obj  qdatetime.obj  qdir.obj  qdiriterator.obj  qfiledevice.obj  qfile.obj  qtemporaryfile.obj  qabstractfileengine.obj  qfsfileengine_win.obj  qsystemlibrary.obj  qfileinfo.obj  qendian.obj  qglobal.obj  qgregoriancalendar.obj  qhash.obj  qiodevice.obj  qringbuffer.obj  qdebug.obj  qlist.obj  qlocale.obj  qlocale_tools.obj  qlocale_win.obj  qversionnumber.obj  qmalloc.obj  qmap.obj  qoperatingsystemversion.obj  qoperatingsystemversion_win.obj  qregexp.obj  qromancalendar.obj  qutfcodec.obj  qstring.obj  qstringlist.obj  qstringbuilder.obj  qsystemerror.obj  qtextstream.obj  qdatastream.obj  quuid.obj  qrandom.obj  qsettings.obj  qvariant.obj  qsettings_win.obj  qmetatype.obj  qxmlstream.obj  qxmlutils.obj  qnumeric.obj  qlogging.obj  qcborstreamwriter.obj  qcborvalue.obj  qjsoncbor.obj  qjsondocument.obj  qjsonparser.obj  qjsonarray.obj  qjsonobject.obj  qjsonvalue.obj qlibraryinfo.obj qmake_pch.obj ole32.lib advapi32.lib shell32.lib netapi32.lib
        Microsoft (R) Incremental Linker Version 14.29.30157.0
        Copyright (C) Microsoft Corporation.  All rights reserved.
        
        Info: creating super cache file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.super
        Info: creating cache file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.cache
        Info: creating stash file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.stash
        
        This is the Qt Open Source Edition.
        
        You have already accepted the terms of the Open Source license.
        
        Running configuration tests...
        Checking for valid makespec... ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
        
        Check config.log for details.
        
        C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild>
        

        In the config.log:

        Command line: -debug-and-release -xplatform winrt-arm-msvc2019 -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix C:\Qt\5.15.16\winrt_armv7_msvc2019
        executing config test verifyspec
        + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch"  "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec
        + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& jom
        > jom 1.1.4 - empower your cores
        > 	cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\verifyspec.obj.34368.0.jom
        > verifyspec.cpp
        > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\verifyspec.exe.34368.31.jom
        > verifyspec.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'ARM'
        > jom: C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec\Makefile [verifyspec.exe] Error 1112
        

        So, I get another issue. Is there a way to skip test verifyspec?

        jsulmJ 1 Reply Last reply
        0
        • Cobra91151C Cobra91151

          According to this documentation: https://wiki.qt.io/WinRTBuild
          From docs:
          No matter what your target (PC, Surface, Phone, etc.), ALWAYS USE the "x86 Native tools command prompt". This is because the command prompt will first build host tools (qmake, moc, rcc, etc.) and then cross-compile the Qt libraries. Do not open the Windows Phone command prompt, for instance, as it will not be able to build the host tools.

          So, I tried the x86 Native Tools Command Prompt for VS 2019 to build: winrt-arm-msvc2019

          ...
          cl -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch -c -Fo./ -Fdqmake.pdb  -W2 -nologo -O2  /MP /wd4577   -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\library -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\unix -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\win32 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\mac  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/src/3rdparty/tinycbor/src  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16\QtCore  -I..\src\corelib\global  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\win32-msvc   -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS  -DQT_VERSION_STR=\"5.15.16\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=16  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL  -DQT_NO_FOREACH -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE  C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\src\corelib\serialization\qjsonvalue.cpp
          qjsonvalue.cpp
                 cl -c -Fo./ -Fdqmake.pdb  -W2 -nologo -O2  /MP /wd4577   -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\library -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\unix -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\win32 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\qmake\generators\mac  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/src/3rdparty/tinycbor/src  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16 -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase/include\QtCore\5.15.16\QtCore  -I..\src\corelib\global  -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\win32-msvc   -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS  -DQT_VERSION_STR=\"5.15.16\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=16  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL  -DQT_NO_FOREACH -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DQT_BUILD_QMAKE_BOOTSTRAP C:\QtBuild\qt-everywhere-src-5.15.16\qtbase\src\corelib\global\qlibraryinfo.cpp
          qlibraryinfo.cpp
                 link  /OUT:..\bin\qmake.exe project.obj main.obj ioutils.obj proitems.obj qmakevfs.obj  qmakeglobals.obj qmakeparser.obj qmakeevaluator.obj qmakebuiltins.obj  makefile.obj unixmake.obj unixmake2.obj mingw_make.obj  option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj  makefiledeps.obj metamakefile.obj xmloutput.obj  msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj  msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj qbitarray.obj  qbuffer.obj  qcryptographichash.obj  qfilesystementry.obj  qfilesystemengine.obj  qfilesystemengine_win.obj  qfilesystemiterator_win.obj  qfsfileengine.obj  qfsfileengine_iterator.obj  qarraydata.obj  qbytearray.obj  qbytearraylist.obj  qvsnprintf.obj  qbytearraymatcher.obj  qcalendar.obj  qdatetime.obj  qdir.obj  qdiriterator.obj  qfiledevice.obj  qfile.obj  qtemporaryfile.obj  qabstractfileengine.obj  qfsfileengine_win.obj  qsystemlibrary.obj  qfileinfo.obj  qendian.obj  qglobal.obj  qgregoriancalendar.obj  qhash.obj  qiodevice.obj  qringbuffer.obj  qdebug.obj  qlist.obj  qlocale.obj  qlocale_tools.obj  qlocale_win.obj  qversionnumber.obj  qmalloc.obj  qmap.obj  qoperatingsystemversion.obj  qoperatingsystemversion_win.obj  qregexp.obj  qromancalendar.obj  qutfcodec.obj  qstring.obj  qstringlist.obj  qstringbuilder.obj  qsystemerror.obj  qtextstream.obj  qdatastream.obj  quuid.obj  qrandom.obj  qsettings.obj  qvariant.obj  qsettings_win.obj  qmetatype.obj  qxmlstream.obj  qxmlutils.obj  qnumeric.obj  qlogging.obj  qcborstreamwriter.obj  qcborvalue.obj  qjsoncbor.obj  qjsondocument.obj  qjsonparser.obj  qjsonarray.obj  qjsonobject.obj  qjsonvalue.obj qlibraryinfo.obj qmake_pch.obj ole32.lib advapi32.lib shell32.lib netapi32.lib
          Microsoft (R) Incremental Linker Version 14.29.30157.0
          Copyright (C) Microsoft Corporation.  All rights reserved.
          
          Info: creating super cache file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.super
          Info: creating cache file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.cache
          Info: creating stash file C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\.qmake.stash
          
          This is the Qt Open Source Edition.
          
          You have already accepted the terms of the Open Source license.
          
          Running configuration tests...
          Checking for valid makespec... ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
          
          Check config.log for details.
          
          C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild>
          

          In the config.log:

          Command line: -debug-and-release -xplatform winrt-arm-msvc2019 -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix C:\Qt\5.15.16\winrt_armv7_msvc2019
          executing config test verifyspec
          + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch"  "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec
          + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& jom
          > jom 1.1.4 - empower your cores
          > 	cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\verifyspec.obj.34368.0.jom
          > verifyspec.cpp
          > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\verifyspec.exe.34368.31.jom
          > verifyspec.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'ARM'
          > jom: C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec\Makefile [verifyspec.exe] Error 1112
          

          So, I get another issue. Is there a way to skip test verifyspec?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #3

          @Cobra91151 said in Issue with building Qt 5.15.16 for UWP arm:

          fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'ARM'

          This is your issue.
          How do you call configure?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Cobra91151C 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Cobra91151 said in Issue with building Qt 5.15.16 for UWP arm:

            fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'ARM'

            This is your issue.
            How do you call configure?

            Cobra91151C Offline
            Cobra91151C Offline
            Cobra91151
            wrote on last edited by
            #4

            @jsulm

            Hello!

            I run the following command using x86 Native Tools Command Prompt for VS 2019:

            configure.bat -debug-and-release -xplatform "winrt-arm-msvc2019" -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix "C:\Qt\5.15.16\winrt_armv7_msvc2019"

            So, some parameter is missing?

            jsulmJ 1 Reply Last reply
            0
            • Cobra91151C Cobra91151

              @jsulm

              Hello!

              I run the following command using x86 Native Tools Command Prompt for VS 2019:

              configure.bat -debug-and-release -xplatform "winrt-arm-msvc2019" -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix "C:\Qt\5.15.16\winrt_armv7_msvc2019"

              So, some parameter is missing?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #5

              @Cobra91151 said in Issue with building Qt 5.15.16 for UWP arm:

              x86 Native Tools Command Prompt for VS 2019

              Are you sure this is the right one? You want to build for UWP ARM.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • Cobra91151C Offline
                Cobra91151C Offline
                Cobra91151
                wrote on last edited by Cobra91151
                #6

                @jsulm

                When I use "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" it leads to this error: Checking for valid makespec... ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

                Also, I tried the "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm.bat" but the error is: fatal error C1189: #error: "Unable to determine byte order!"

                According to the docs: https://wiki.qt.io/WinRTBuild:
                x86 Native tools command prompt is the right one but it fails for me:

                Command line: -debug-and-release -xplatform winrt-arm-msvc2019 -confirm-license -mp -c++std c++17 -opensource -nomake examples -no-ltcg -skip qtwebengine -prefix C:\Qt\5.15.16\winrt_armv7_msvc2019
                executing config test verifyspec
                + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch"  "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec
                + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& jom
                > jom 1.1.4 - empower your cores
                > 	cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\verifyspec.obj.14548.0.jom
                > verifyspec.cpp
                > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\verifyspec.exe.14548.46.jom
                > verifyspec.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'ARM'
                > jom: C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec\Makefile [verifyspec.exe] Error 1112
                
                1 Reply Last reply
                0
                • jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  Do you build in a clean build folder?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • Cobra91151C Offline
                    Cobra91151C Offline
                    Cobra91151
                    wrote on last edited by Cobra91151
                    #8

                    @jsulm
                    Yes, I always clean up the build directory after the unsuccessful configure run. I reported this issue here: https://bugreports.qt.io/browse/QTBUG-132728

                    It could be related ony to my environment or latest Visual Studio 2019 - 16.11.42.

                    1 Reply Last reply
                    0
                    • Cobra91151C Offline
                      Cobra91151C Offline
                      Cobra91151
                      wrote on last edited by Cobra91151
                      #9

                      Hello!

                      I removed the jom from PATH environment variable to use nmake to get the proper error message. I get the following issue:

                      Running configuration tests...
                      Checking for valid makespec...
                      + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch"  "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec
                      + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& nmake
                      > Microsoft (R) Program Maintenance Utility Version 14.29.30158.0
                      > Copyright (C) Microsoft Corporation.  All rights reserved.
                      >       cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\nm3D22.tmp
                      > verifyspec.cpp
                      >       link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\nm3D71.tmp
                      > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'
                      > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\ARM\link.EXE"' : return code '0x49d'
                      > Stop.
                      ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
                      C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild>
                      

                      The problem was with > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'.

                      I found out that this issue is causing the latest Windows SDK - 10.0.26100.0: https://discussions.unity.com/t/info-link-fatal-error-lnk1181-cannot-open-input-file-ucrt-lib-hololens-2-build-issue/950584/3
                      So, I used the following Windows SDK: 10.0.22621.0 and run: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" 10.0.22621.0
                      Now, it completed the configuration and I successfully built Qt 5.15.16 for winrt-arm-msvc2019 architecture. This issue is resolved. Thanks.

                      1 Reply Last reply
                      1
                      • Cobra91151C Cobra91151 has marked this topic as solved on

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved