Compile and build project on remote machine
-
Hi,
I have a desktop Linux machine (Ubuntu 22.04 OS) name kismet, and it has three 4K monitors and therefore is my main interface.
I run headless servers on my LAN network, one of which, thor, is a powerful XEON machine which houses my data filesystem and is ideal for compiling workloads.
I wish to use the QtCreator UI on kismet, my desktop machine but compile remotely using thor (which is in also in my house and on my LAN). thor's OS is Ubuntu 22.04.
I'm running QtCreator version 6.0.2 on kismet and thor. My Qt versions on kismet and thor are both 6.2.4.
I was able to establish an ssh link and include thor (my remote machine) as an option on ODevices on Qtcreator running on kismet (my desktop).
This was set via Tools->Options->Devices. The remote device, thor, tested OK.After configuring and testing (OK) the remote device, i.e. thor, I went to the "kits" menu and added a new kit which I named thor_compile. I got a menu to set up the thor_compile kit
I tried the following steps from the menu on Kits page for the new kit, thor_compile
And here's where I'm stuck:
Device type: Generic Linux Device
Device: thor (default for Generic Linux)
Build device Local PC (default for Desktop) ****************Note I cannot change this to thor!
Since I cannot change the Build device to thor, I am stuck.
Also, the documentation in AI Google and Qt are apparently incorrect and/or for another Qtcreator version.
So my question remains: How do I get Qtcreator, running on kismet, to compile using thor?
Any ideas very welcome!
Thanks, Phil
... -
Hi,
I have a desktop Linux machine (Ubuntu 22.04 OS) name kismet, and it has three 4K monitors and therefore is my main interface.
I run headless servers on my LAN network, one of which, thor, is a powerful XEON machine which houses my data filesystem and is ideal for compiling workloads.
I wish to use the QtCreator UI on kismet, my desktop machine but compile remotely using thor (which is in also in my house and on my LAN). thor's OS is Ubuntu 22.04.
I'm running QtCreator version 6.0.2 on kismet and thor. My Qt versions on kismet and thor are both 6.2.4.
I was able to establish an ssh link and include thor (my remote machine) as an option on ODevices on Qtcreator running on kismet (my desktop).
This was set via Tools->Options->Devices. The remote device, thor, tested OK.After configuring and testing (OK) the remote device, i.e. thor, I went to the "kits" menu and added a new kit which I named thor_compile. I got a menu to set up the thor_compile kit
I tried the following steps from the menu on Kits page for the new kit, thor_compile
And here's where I'm stuck:
Device type: Generic Linux Device
Device: thor (default for Generic Linux)
Build device Local PC (default for Desktop) ****************Note I cannot change this to thor!
Since I cannot change the Build device to thor, I am stuck.
Also, the documentation in AI Google and Qt are apparently incorrect and/or for another Qtcreator version.
So my question remains: How do I get Qtcreator, running on kismet, to compile using thor?
Any ideas very welcome!
Thanks, Phil
...@montanaviking said in Compile and build project on remote machine:
I'm running QtCreator version 6.0.2
That seems to be ~ 4 years old. Is trying a more recent version an option?
And here's where I'm stuck:
Device type: Generic Linux Device
Device: thor (default for Generic Linux)
Build device Local PC (default for Desktop) ****************Note I cannot change this to thor!Using Creator 17 on a mac, The label "Build device: Type: " is next to a combo box. Select "Remote Linux Device". That will select the only remote Linux device, or enable a combo box if more than one is registered. I suspect that Creator on Linux works similarly.
-
Thanks for your input. I upgraded to qtcreator 17.0.2 and Qt6.10.0 and followed the procedure of:
https://doc.qt.io/qtcreator/creator-how-to-build-on-remote-linux.html
I was able to get my Qt project to compile remotely but there were strange problems. Attempting to run in debug works once then if you try to add a breakpoint, the debugger will freeze at Launching Debugger. I end up having to force qtcreator to shut down and restart. I did add a remote debugger too but that made no difference.
Also running sans the debugger gives errors:
qt.qpa.xcb: could not connect to display localhost:15.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: xcb, wayland-brcm, wayland-egl, wayland, vkkhrdisplay, linuxfb, minimal, offscreen, eglfs, vnc, minimalegl.
Any ideas? thanks, Phil
-
Thanks for your input. I upgraded to qtcreator 17.0.2 and Qt6.10.0 and followed the procedure of:
https://doc.qt.io/qtcreator/creator-how-to-build-on-remote-linux.html
I was able to get my Qt project to compile remotely but there were strange problems. Attempting to run in debug works once then if you try to add a breakpoint, the debugger will freeze at Launching Debugger. I end up having to force qtcreator to shut down and restart. I did add a remote debugger too but that made no difference.
Also running sans the debugger gives errors:
qt.qpa.xcb: could not connect to display localhost:15.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: xcb, wayland-brcm, wayland-egl, wayland, vkkhrdisplay, linuxfb, minimal, offscreen, eglfs, vnc, minimalegl.
Any ideas? thanks, Phil
@montanaviking You would have to get the remote linux to be capable of running Qt applications.
Qt5 applications used to have libxcb compiled statically with all its dependencies (xcursor and friends). Qt6 requires the system to have this present.
Your remote linux doesn't have it, and you need to take care of it.
-
I believe I have all the dependencies required for Qt6.10. Also qtcreator and the program under development run fine on either the remote machine and also the local machine but fails when compiling and running remotely.
Thanks -
Thanks for your input. I upgraded to qtcreator 17.0.2 and Qt6.10.0 and followed the procedure of:
https://doc.qt.io/qtcreator/creator-how-to-build-on-remote-linux.html
I was able to get my Qt project to compile remotely but there were strange problems. Attempting to run in debug works once then if you try to add a breakpoint, the debugger will freeze at Launching Debugger. I end up having to force qtcreator to shut down and restart. I did add a remote debugger too but that made no difference.
Also running sans the debugger gives errors:
qt.qpa.xcb: could not connect to display localhost:15.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: xcb, wayland-brcm, wayland-egl, wayland, vkkhrdisplay, linuxfb, minimal, offscreen, eglfs, vnc, minimalegl.
Any ideas? thanks, Phil
@montanaviking said in Compile and build project on remote machine:
I did add a remote debugger too but that made no difference.
Did set the remote debugger for the specific kit you are using?
Also running sans the debugger gives errors:
qt.qpa.xcb: could not connect to display localhost:15.0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Did you use
ssh -X
to do X-forwarding for your ssh connection?