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

Cannot add Qt 6.4.1 Android Arm64_v8a as a Qt Kit into QtCreator #626

Closed
vkuznetsovgn opened this issue Dec 2, 2022 · 8 comments · Fixed by #627
Closed

Cannot add Qt 6.4.1 Android Arm64_v8a as a Qt Kit into QtCreator #626

vkuznetsovgn opened this issue Dec 2, 2022 · 8 comments · Fixed by #627
Labels
bug Something isn't working

Comments

@vkuznetsovgn
Copy link

vkuznetsovgn commented Dec 2, 2022

Description
When trying to add Qt 6.4.1 Android Arm64_v8a as a Qt Version for Kit into QtCreator, I am getting an error:

The qmake executable /opt/Qt/6.4.1/android_arm64_v8a/bin/qmake could not be added: "/opt/Qt/6.4.1/android_arm64_v8a/bin/qmake" produced no output: /opt/Qt/6.4.1/android_arm64_v8a/bin/qmake: 7: /Users/qt/work/install/bin/qmake: not found

However, via an official installer I can add this Qt version without any issues and I can compile and deploy everything as usual.

To Reproduce

  1. aqt install-qt -O /opt/Qt linux android 6.4.1 android_arm64_v8a --autodesktop
  2. Open QtCreator 8.0.2, add /opt/Qt/6.4.1/android_arm64_v8a/bin/qmake as Qt Version.
  3. See the error.

Expected behavior
Works the same as for the official installer.

Desktop:

  • OS: Ubuntu 22.04
  • aqt version: aqtinstall(aqt) v3.0.2 on Python 3.10.6 [CPython GCC 11.3.0]

UPD:
I don't have such problem with Qt 6.4.0 installed via aqtinstall.

@vkuznetsovgn vkuznetsovgn added the bug Something isn't working label Dec 2, 2022
@miurahr miurahr added the duplicate This issue or pull request already exists label Dec 2, 2022
@miurahr
Copy link
Owner

miurahr commented Dec 2, 2022

Duplicated with #621

@vkuznetsovgn
Copy link
Author

vkuznetsovgn commented Dec 2, 2022

@miurahr
It's not a duplicate.
This is the aqt bug, because the behavior differs from the official installer.
And it has nothing to do with "wrong archive versions". They are not wrong. They work.

@miurahr

This comment was marked as off-topic.

@vkuznetsovgn
Copy link
Author

vkuznetsovgn commented Dec 2, 2022

#621 report installation of android_arm64_v8a with --autodesktop installs "windows" binary because The Qt foundation published android binary with metadata only with windows SDK, and they close its issue ticket as won't fix.

It is why QtCreator on linux failed to execute qmake, but it is windows binary qmake.exe.

What I am missing here is that why then Qt 6.4.1 android_arm64_v8a from the official installer works in QtCreator but from aqt not?

You can do work around in a way that previous versions.

I completely removed Qt 6.4.1 installed with aqt and reinstalled it using 2 commands:

$ aqt install-qt -O /opt/Qt linux desktop 6.4.1
$ aqt install-qt -O /opt/Qt linux android 6.4.1 android_arm64_v8a

It did not help. I'm still getting the same error in QtCreator.
if I check cat /opt/Qt/6.4.1/android_arm64_v8a/bin/qmake , I see it's using some strange location to execute qmake /Users/qt/work/install/bin/qmake that does not exist, while qmake from Qt installer points to the correct desktop qmake.

@vkuznetsovgn
Copy link
Author

Upd:
I just manually replaced non-existent /Users/qt/work/install/bin/qmake with /opt/Qt/6.4.1/gcc_64/bin/qmake and it does work perfectly fine now.

@miurahr
Copy link
Owner

miurahr commented Dec 2, 2022

@vkuznetsovgn Thank you. Now I understand a report.

when running command I observed

$ aqt install-qt  linux android 6.4.1 android_arm64_v8a --autodesktop
INFO    : aqtinstall(aqt) v3.0.2.dev11 on Python 3.10.6 [CPython GCC 11.3.0]
INFO    : You are installing the android version of Qt, which requires that the desktop version of Qt is also installed. Now installing Qt: desktop 6.4.1 gcc_64
WARNING : Specified Qt version is unknown: 6.4.1.
INFO    : Downloading qttools...
INFO    : Downloading qtbase...
INFO    : Downloading qtdeclarative...
INFO    : Downloading qtsvg...
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Finished installation of qtsvg-MacOS-MacOS_12-Clang-Android-Android_ANY-ARM64.7z in 3.58569239
INFO    : Downloading qttranslations...
INFO    : Finished installation of qttools-MacOS-MacOS_12-Clang-Android-Android_ANY-ARM64.7z in 5.86575145
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Downloading qtbase...
INFO    : Finished installation of qtbase-MacOS-MacOS_12-Clang-Android-Android_ANY-ARM64.7z in 10.55020444
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Downloading qtsvg...
INFO    : Finished installation of qttranslations-MacOS-MacOS_12-Clang-Android-Android_ANY-ARM64.7z in 10.60716895
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Finished installation of qtdeclarative-MacOS-MacOS_12-Clang-Android-Android_ANY-ARM64.7z in 15.21983997
INFO    : Finished installation of qtsvg-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 4.99439451
INFO    : Downloading qtdeclarative...
INFO    : Downloading qttools...
INFO    : Downloading qttranslations...
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Finished installation of qtbase-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 13.91680251
INFO    : Finished installation of qttranslations-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 8.86879561
INFO    : Downloading qtwayland...
INFO    : Downloading icu...
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Redirected: ftp.yz.yamagata-u.ac.jp
INFO    : Finished installation of qttools-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 25.95157577
INFO    : Finished installation of qtwayland-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 21.82308230
INFO    : Finished installation of icu-linux-Rhel7.2-x64.7z in 19.52644032
INFO    : Finished installation of qtdeclarative-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 33.75186424
INFO    : Patching Qt/6.4.1/android_arm64_v8a/bin/qmake
INFO    : Patching Qt/6.4.1/gcc_64/bin/qmake
... (continues)

then

$ strings 6.4.1/android_arm64_v8a/bin/qmake|grep work
/Users/qt/work/install/bin/qmake -qtconf "$script_dir_path/target_qt.conf" $*

Here should be some thing like

/opt/Qt/6.4.1/gcc_64/bin/qmake -qtconf "$script_dir_path/target_qt.conf" $*

It may need to patch android qmake binary, it is not necessary for Qt 6.4.0 and before

@miurahr miurahr removed the duplicate This issue or pull request already exists label Dec 2, 2022
@ddalcino
Copy link
Contributor

ddalcino commented Dec 3, 2022

I think the logic that needs to change is here:

def unpatched_path(os_name: str, final_component: str) -> str:
return ("/home/qt/work/install" if os_name == "linux" else "/Users/qt/work/install") + "/" + final_component

On Linux, before Qt 6.4.1, the path that we needed to patch was /home/qt/work/install. Now, the qmake file looks a lot more like the Mac version, in which we need to patch the patch /Users/qt/work/install/bin/qmake.

Personally, I think it makes sense to just patch both paths on all OSes, so we are not affected by strange choices by the Qt devs like this.

@ddalcino
Copy link
Contributor

ddalcino commented Dec 4, 2022

@vkuznetsovgn Can you please try #627, and let us know if it fixes the problem for you with android_arm64_v8a? edit: maybe wait on this; there are some files that installscript.qs automatically patches that we are not patching yet; these could be important...

OT: I'm having some difficulty with android_armv7, and right now it looks like it might not work anywhere other than Windows.

edit: I'm pretty sure that this should be fixed now in #627.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants