Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I can't get WSL build from QT Project?

I can't get WSL build from QT Project?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • HerrWinfriedH Offline
    HerrWinfriedH Offline
    HerrWinfried
    wrote on last edited by
    #1

    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.

    45603392-71c7-4d37-a75b-040c6216918c-image.png

    feb499dd-b020-4c9b-9bd2-a6514b0f210a-image.png

    HerrWinfriedH 1 Reply Last reply
    0
    • HerrWinfriedH HerrWinfried

      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.

      45603392-71c7-4d37-a75b-040c6216918c-image.png

      feb499dd-b020-4c9b-9bd2-a6514b0f210a-image.png

      HerrWinfriedH Offline
      HerrWinfriedH Offline
      HerrWinfried
      wrote on last edited by
      #2

      Is the answer to my question so difficult?

      1 Reply Last reply
      0
      • kkoehneK Offline
        kkoehneK Offline
        kkoehne
        Moderators
        wrote on last edited by
        #3

        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

        Director R&D, The Qt Company

        HerrWinfriedH K 2 Replies Last reply
        0
        • kkoehneK kkoehne

          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

          HerrWinfriedH Offline
          HerrWinfriedH Offline
          HerrWinfried
          wrote on last edited by
          #4

          @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.

          1 Reply Last reply
          1
          • kkoehneK kkoehne

            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

            K Offline
            K Offline
            Khoi Vo Minh
            wrote on last edited by
            #5

            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 ==========
            
            
            C 1 Reply Last reply
            0
            • K Khoi Vo Minh

              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 ==========
              
              
              C Offline
              C Offline
              ChrisW67
              wrote on last edited by
              #6

              @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.

              K 1 Reply Last reply
              0
              • C ChrisW67

                @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.

                K Offline
                K Offline
                Khoi Vo Minh
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved