I can't get WSL build from QT Project?
-
wrote on 25 Jun 2022, 07:38 last edited by
-
I installed a QT plugin with VS 2022, but my goal was to compile on both WSL and windows. I can't get the linux compilation of the project I created on windows. I suspect I have set an incomplete configuration.
wrote on 29 Jun 2022, 08:06 last edited byIs the answer to my question so difficult?
-
Have you actually already configured the deployment to the device?
I suggest you double check the steps shown in
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-1/2
and
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-2/2
-
Have you actually already configured the deployment to the device?
I suggest you double check the steps shown in
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-1/2
and
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-2/2
wrote on 29 Jun 2022, 17:11 last edited by@kkoehne said in I can't get WSL build from QT Project?:
Have you actually already configured the deployment to the device?
I suggest you double check the steps shown in
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-1/2
and
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-2/2
Yes, it didn't work. I wish the documents were updated.
-
Have you actually already configured the deployment to the device?
I suggest you double check the steps shown in
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-1/2
and
https://www.qt.io/blog/creating-an-embedded-qt-quick-application-in-visual-studio-2/2
wrote on 15 Apr 2023, 23:13 last edited byI come here from 2023, and document also never update.
Here is my stuck on VS 2022, QT and WSL
Build started... 1>------ Build started: Project: QtQuickApplication2, Configuration: Debug x64 ------ 1>Invoking 'mkdir -p $(dirname /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp/props.txt); mkdir -p /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp; cd /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp; ("//wsl.localhost/Ubuntu/home/khoim/Qt/5.15.2/gcc_64/bin/qmake" -query) 1> props.txt', working directory: '/mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2' 1> 1>C:\Users\khoim\AppData\Local\QtMsBuild\qt_vars.targets(149,5): error : Host command failed. 1>Done building project "QtQuickApplication2.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build started at 5:51 AM and took 01.536 seconds ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ========== ========== Deploy started at 5:51 AM and took 01.536 seconds ==========
-
I come here from 2023, and document also never update.
Here is my stuck on VS 2022, QT and WSL
Build started... 1>------ Build started: Project: QtQuickApplication2, Configuration: Debug x64 ------ 1>Invoking 'mkdir -p $(dirname /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp/props.txt); mkdir -p /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp; cd /mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2/obj/x64/Debug/qmake/temp; ("//wsl.localhost/Ubuntu/home/khoim/Qt/5.15.2/gcc_64/bin/qmake" -query) 1> props.txt', working directory: '/mnt/c/Users/khoim/source/repos/QtQuickApplication2/QtQuickApplication2' 1> 1>C:\Users\khoim\AppData\Local\QtMsBuild\qt_vars.targets(149,5): error : Host command failed. 1>Done building project "QtQuickApplication2.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build started at 5:51 AM and took 01.536 seconds ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ========== ========== Deploy started at 5:51 AM and took 01.536 seconds ==========
wrote on 16 Apr 2023, 06:32 last edited by@Khoi-Vo-Minh said in I can't get WSL build from QT Project?:
The OP's problem would appear to be trying to execute a non binary file (the
.out
file in the dialog). This was probably a misconfiguration but clearly occurred after an apparently successful build.Your output gives you command the build system tried to execute to build your project. It failed. Try to run it manually to find out which art failed and you will be closer to solving whatever misconfiguration or missing component you have.
-
@Khoi-Vo-Minh said in I can't get WSL build from QT Project?:
The OP's problem would appear to be trying to execute a non binary file (the
.out
file in the dialog). This was probably a misconfiguration but clearly occurred after an apparently successful build.Your output gives you command the build system tried to execute to build your project. It failed. Try to run it manually to find out which art failed and you will be closer to solving whatever misconfiguration or missing component you have.
wrote on 30 Apr 2023, 07:02 last edited by@ChrisW67 Look like this missing config of WSL1 and WSL2 in VS 2022 Tools QT
For WSL1, it's missed textbox for config toolchain path like old document, missing target path, ....
1>C:\Users\khoim\AppData\Local\QtMsBuild\qt_vars.targets(149,5): error : Host command failed.
<HostExec Command="$(Cmd)" RedirectStdOut="props.txt" WorkingDirectory="@(WorkDir->'%(HostPath)')" Outputs="@(QMakeProps)" RemoteTarget="$(ResolvedRemoteTarget)" RemoteProjectDir="$(_ResolvedRemoteProjectDir)" />
For WSL2, it try to connect via SSH instead local WSL.
It return with log:Severity Code Description Project File Line Suppression State Error MSB4018 The "HostExec" task failed unexpectedly. liblinux.RemoteConnectivityException: Could not connect to the remote system or the connection was lost. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCore(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout, Boolean ownsSocket) at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.CreateAndConnectSession() at Renci.SshNet.BaseClient.Connect() at liblinux.HostKeyVerifier.Connect(BaseClient client) at liblinux.RemoteSystemBase.ConnectCore() --- End of inner exception stack trace --- at liblinux.RemoteSystemBase.ConnectCore() at liblinux.RemoteSystemBase.Connect() at liblinux.SshRemoteSystemFactory.CreateRemoteSystem() at Microsoft.Build.Linux.Tasks.ConnectionCache.ConnectAndIncrementUseCount(IRemoteSystemFactory factory) at Microsoft.Build.Linux.Tasks.ConnectionCache.AddOrGetIncrementUseCount(IRemoteSystemFactory factory) at Microsoft.Build.Linux.Tasks.RemoteToolTask.get_RemoteSystem() at Microsoft.Build.Linux.Tasks.RemoteToolTask.Execute(String commandText, TimeSpan timeout) at Microsoft.Build.Linux.Tasks.Execute.ExecuteTool() at InlineCode.HostExec.Execute() in c:\Users\khoim\AppData\Local\Temp\kdfgkuu0.0.cs:line 239 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() QtQuickApplication1 C:\Users\khoim\AppData\Local\QtMsBuild\qt_vars.targets 149
WSL2, I don't want to connect SSH, because it will take down performance build.