microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

[QT5] build failure ARM64 #9041

Closed qz3fwd closed 4 years ago

qz3fwd commented 4 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install qt5:arm64-windows

Failure logs PS C:\Users\qz3fwd\vcpkg> .\vcpkg install qt5:arm64-windows The following packages will be built and installed:

-- Figuring out qt target mkspec. Target arch arm64 -- Figuring out arm64 -- Target mkspec set to: win32-arm64-msvc2017 -- Host mkspec not set. Qt's own buildsystem will try to figure out the host system CMake Warning at scripts/cmake/vcpkg_buildpath_length_warning.cmake:4 (message): qt5-base's buildsystem uses very long paths and may fail on your system.

We recommend moving vcpkg to a short path such as 'C:\src\vcpkg' or using the subst command. Call Stack (most recent call first): ports/qt5-base/cmake/qt_download_submodule.cmake:13 (vcpkg_buildpath_length_warning) ports/qt5-base/portfile.cmake:29 (qt_download_submodule) scripts/ports.cmake:94 (include)

-- Using cached C:/Users/qz3fwd/vcpkg/downloads/qtbase-everywhere-src-5.12.5.tar.xz -- Using source at C:/Users/qz3fwd/vcpkg/buildtrees/qt5-base/src/5.12.5-0f870116d4 -- Configuring arm64-windows-dbg CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message): Command failed: C:/Users/qz3fwd/vcpkg/buildtrees/qt5-base/src/5.12.5-0f870116d4/configure.bat -confirm-license -opensource -system-zlib -system-libjpeg -system-libpng -system-freetype -system-pcre -system-doubleconversion -system-sqlite -system-harfbuzz -opengl dynamic -nomake examples -nomake tests LIBJPEG_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/jpegd.lib ZLIB_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/zlibd.lib "LIBPNG_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/libpng16d.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/zlibd.lib" PCRE2_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/pcre2-16d.lib "FREETYPE_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/freetyped.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/bz2d.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/libpng16d.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/zlibd.lib" QMAKE_LIBS_PRIVATE+=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/bz2d.lib QMAKE_LIBS_PRIVATE+=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/libpng16d.lib "PSQL_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/libpqd.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/ssleay32.lib C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/libeay32.lib ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" SQLITE_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/sqlite3.lib HARFBUZZ_LIBS=C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/harfbuzz.lib -debug -prefix C:/Users/qz3fwd/vcpkg/installed/arm64-windows -extprefix C:/Users/qz3fwd/vcpkg/installed/arm64-windows -hostprefix C:/Users/qz3fwd/vcpkg/installed/arm64-windows/tools/qt5/debug -hostlibdir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/tools/qt5/debug/lib -hostbindir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/tools/qt5/debug/bin -archdatadir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/tools/qt5/debug -datadir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/share/qt5/debug -plugindir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/plugins -qmldir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/qml -headerdir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/include -libexecdir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/tools/qt5/debug -bindir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/bin -libdir C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib -I C:/Users/qz3fwd/vcpkg/installed/arm64-windows/include -L C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib -L C:/Users/qz3fwd/vcpkg/installed/arm64-windows/debug/lib/manual-link -xplatform win32-arm64-msvc2017 Working Directory: C:/Users/qz3fwd/vcpkg/buildtrees/qt5-base/arm64-windows-dbg Error code: 1 See logs for more information: C:\Users\qz3fwd\vcpkg\buildtrees\qt5-base\config-arm64-windows-dbg-out.log C:\Users\qz3fwd\vcpkg\buildtrees\qt5-base\config-arm64-windows-dbg-err.log

Call Stack (most recent call first): ports/qt5-base/cmake/configure_qt.cmake:108 (vcpkg_execute_required_process) ports/qt5-base/portfile.cmake:201 (configure_qt) scripts/ports.cmake:94 (include)

Error: Building package qt5-base:arm64-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: qt5-base:arm64-windows Vcpkg version: 2019.09.12-nohash

Additionally, attach any relevant sections from the log files above. PS C:\Users\qz3fwd\vcpkg> config-arm64-windows-dbg-out.log

Additional context It seems to get stuck in the configure step and builds an ARM64 qmake on a x64 host machine and does not find prebuilt x86 qmake utility installed via vcpkg install qt5 config-arm64-windows-dbg-err.log

NancyLi1013 commented 4 years ago

Hi @Neumann-A
Could you help take a look ? The error info seems like this:

This version of C:\Users\qz3fwd\vcpkg\buildtrees\qt5-base\arm64-windows-dbg\bin\qmake.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

Neumann-A commented 4 years ago

@NancyLi1013 That one is easy. The host machine itself is not an arm64 but x64, As such the arm64 tools cannot be used on the host machine. Cross compilation is not yet supported by the Qt port. He must build qt5-base:x64-windows or qt5-base:x86-windows (or better the static versions of these triplets so dll issues are taken care of) for cross compilation to even have a chance of working. If it does not work then defining VCPKG_QT_HOST_TOOLS_ROOT for the qt port in the triplet might do the trick but i never tested it. In the end it comes down to what find_qt_mkspec does and what is passed to configure_qt to setup cross-compilation correctly

NancyLi1013 commented 4 years ago

@Neumann-A thanks for your so detailed explanation to this issue. I have known about this now.

Thank you again.

NancyLi1013 commented 4 years ago

Hi @qz3fwd thanks for posting this issue. Since qt5 doesn't support cross compiler now. The behavior you met is expected.

NancyLi1013 commented 4 years ago

Since the current behavior is as intended. I close it now.