aqtinstall: Error when use qmake with Qt 6

Describe the bug Hi,

Im trying use qmake with Qt 6 on Windows, but i always get error:

https://github.com/paulocoutinhox/prprojector/actions/runs/6080974346/job/16495785923#step:9:239

Can you help me understand?

To Reproduce

git clone https://github.com/paulocoutinhox/prprojector.git
cd prprojector
python3 -m pip install -r requirements.txt
python3 make.py run build-win-x64

Expected behavior

Run qmake without problems.

Desktop (please complete the following information):

  • OS: windows
  • INFO : aqtinstall(aqt) v3.1.7 on Python 3.9.6 [CPython Clang 14.0.3 (clang-1403.0.22.14.1)]

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

@paulocoutinhox, can you try using #711? If I understand the problem correctly, this PR should fix your arm64 build. Just make sure to add the --autodesktop flag when you run aqt install-qt.

Ok, I got tired of waiting for a response to see if my PR works for your project, so I answered it myself. The short answer is, yes, it will work for your project. However, you need to make some changes to the project to get your CI builds to work. Please see CI run: https://github.com/ddalcino/prprojector/actions/runs/6132364215/job/16643166565

Necessary changes:

  • Fix usage of ilammy/msvc-dev-cmd: you need to use arch: amd64_arm64 instead of arm64 (see docs)
  • Add --autodesktop flag to aqt install-qt command
  • Use aqtinstall that includes #711
  • Change usage of windeployqt; it does not exist at C:\Qt\6.5.2\msvc2019_arm64\bin\windeployqt.

Optional change (I don’t know if this is necessary, but I don’t care because it cuts build time in half):

  • Do not install the debuginfo module

Please see https://github.com/paulocoutinhox/prprojector/compare/master...ddalcino:prprojector:master for a working example of these changes.

My branch does not do anything about windeployqt, and in fact my CI build fails because windeployqt is missing, but that’s beyond the scope of this issue. There will be a copy installed at C:\Qt\6.5.2\msvc2019_64\bin\windeployqt, but I don’t know if that will work for arm64 builds. If you need an arm64 version of windeployqt, you may need to contact the Qt maintainers. aqtinstall can only deliver binaries hosted at download.qt.io, and it doesn’t appear to be present there.

Do you think we could change the title of this issue to something more like ‘errors installing Qt 6 with arch=win64_msvc2019_arm64’, or similar? That’s the real bug here, and making the title more specific will make this problem much easier to track in the future.

Have a glance at the code and log:

python3 make.py run build-win-arm64

...

> Validating data...
> Building Qt...

> FINISHED!
The system cannot find the path specified.
> Validating data...
> Building libraries...
> Building Qt to arch "arm64" and mode "release"...
> Generating files to arch "arm64" and mode "release"...
Traceback (most recent call last):
  File "D:\a\prprojector\prprojector\make.py", line 112, in <module>
    main(args)
  File "D:\a\prprojector\prprojector\make.py", line 95, in main
    windows.run_task_build(c.targets_win_arm64)
  File "D:\a\prprojector\prprojector\modules\windows.py", line 77, in run_task_build
    check_call(command, cwd=build_dir, shell=True)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'D:\a\prprojector\prprojector\build\qt\6.5.2\msvc2019_arm64\bin\qmake -project D:\a\prprojector\prprojector\PRProjector.pro' returned non-zero exit status 1.

Hmm, you were not using python3 make.py run build-win-x64.

To see what error happens, I think you may have to replace check_call with check_output to get the output of qmake. An “exit status 1” is not helpful.