Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 6.5.2 ARM 64-bit's qtpaths.bat has hardcoded, possible nonexistent path #3892

Closed
hmartinez82 opened this issue Oct 10, 2023 · 12 comments
Closed
Assignees

Comments

@hmartinez82
Copy link

hmartinez82 commented Oct 10, 2023

When crosspiling with Qt ARM 64-bit the CMake scripts need both a Host build of Qt (x64) and a Target build of Qt(ARM64).
The builds are correctly generating the ARM64 binaries, but windeployqt is not working, even with passing the custom --qtpaths parameter.

This issue with windeployqt is only happening with the ARM 64-bit version of Qt. x64 is not affected.

Defect:

qmake and qpaths, in the \bin folder of the ARM 64-bit build of Qt are actually .bat files that use the x64 qmake.exe/qtpaths.exe binaries but with a custom .conf file. The issue, I think is that these .bat files are hardcoded to some folder I can't confirm exist nor match the host version of Qt. So:

Content of C:\Qt\6.5.2\msvc2019_arm64\bin\qtpaths.bat
Expected (it should use a Qt matching version of a host build .exe)

@echo off
C:\Qt\6.5.2\msvc2019_64\bin\qtpaths6.exe -qtconf "%~dp0\target_qt.conf" %*

Actual

@echo off
\Users\qt\work\install\bin\qtpaths6.exe -qtconf "%~dp0\target_qt.conf" %*

Please make sure that qmake.bat, qmake6.bat, qtpaths.bat and qtpaths6.bat have correct paths.

@hmartinez82 hmartinez82 changed the title Qt 6.5.2 ARM 64-bit's qtpaths.bat is with hardcoded, possible nonexistent path Qt 6.5.2 ARM 64-bit's qtpaths.bat has hardcoded, possible nonexistent path Oct 14, 2023
@hmartinez82
Copy link
Author

hmartinez82 commented Oct 14, 2023

I don't like that Qt doesn't have a more flexible solution for this that doesn't require manually patching those files. But in my previous experiences when building Qt 6 for x-compiling I always had to manually modify those four .bat files every time I moved the Host build around.

@OwenMcDonnell
Copy link

Are you thinking that qmake.bat should point to the path of the x64 qmake.exe, whereas qmake6.bat should point to the qmake6.exe, and similar for qtpaths/6.bat? I want to get the patch right on the next image update.

@hmartinez82
Copy link
Author

That will work, but canonically (given a local build I have), the mapping is:
qmake.bat -> qmake6.exe
qmake6.bat -> qmake6.exe
qtpaths.bat -> qtpaths6.exe
qtpaths6.bat -> qtpaths6.exe

You can also look at the existing .bat files.
My ask is not to mess with the mapping. It is to just fix the path to the files.
I mean this part:
\Users\qt\work\install\bin\
is wrong in all .bat files

Whatever they use at the host executable can stay the same.

@OwenMcDonnell
Copy link

Got it, thanks for clarifying. I'll just redirect the paths to the executables as they are. The new image will be along in a few days, at which point, if it works, let me know so i can close this issue.
Note that upcoming image will have Qt 6.5.3 not 6.5.2.

@OwenMcDonnell
Copy link

Please let me know if/when this issue is resolved.

@hmartinez82
Copy link
Author

@OwenMcDonnell you mean I can try again? I kept looking at https://www.appveyor.com/docs/windows-images-software/#qt and it still says 6.5.2

@OwenMcDonnell
Copy link

The deployed image is preceding the documentation this time, since we're deploying both VS2022 and VS2019 images this time. So, yes please give it a try.

@hmartinez82
Copy link
Author

hmartinez82 commented Oct 29, 2023

@OwenMcDonnell What is the patht to this Qt 6.5.3?
I tried C:/Qt/6.5.3/msvc2019_arm64/bin/qmake.bat but it says it's not found

I tried APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 with C:/Qt/6.5.3/msvc2022_arm64/bin/qmake.bat . Also not found.

@OwenMcDonnell
Copy link

Visual Studio 2022 image has not been updated yet. On Visual studio 2019 image you should find C:/Qt/6.5.3/msvc2019_arm64/bin/qmake.bat

@hmartinez82
Copy link
Author

I can confirm it fixed the issue. Let me know once the Visual Studio 2022 runner has this fixed Qt 6.5.3

@OwenMcDonnell
Copy link

The Visual Studio 2022 image has now been updated as well.

@hmartinez82
Copy link
Author

Awesome, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants