Cannot build QtWayland plugin when building qt from source for 32bit.
-
Hi,
I am trying to build QtWayland from source as Qt does not provide 32 bit versions anymore. I am also running qt through a virtualbox vm on Ubuntu. I have successfully built multiple versions of qt, but I am now at the point where I try to run my app and the application outputs says the following error message:qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""So when I went back to try and reconfigure the qt source files for a new build, I saw that the configure output said:
CMake Warning at qtwayland/src/CMakeLists.txt.26 (message):
QtWayland is missing required dependencies, nothing will be built.I downloaded what I thought were the correct dependencies, but the issue persists. I cannot seem to find what dependencies I am missing in order to fix this.
Thanks in advance.
-
Hi,
I am trying to build QtWayland from source as Qt does not provide 32 bit versions anymore. I am also running qt through a virtualbox vm on Ubuntu. I have successfully built multiple versions of qt, but I am now at the point where I try to run my app and the application outputs says the following error message:qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""So when I went back to try and reconfigure the qt source files for a new build, I saw that the configure output said:
CMake Warning at qtwayland/src/CMakeLists.txt.26 (message):
QtWayland is missing required dependencies, nothing will be built.I downloaded what I thought were the correct dependencies, but the issue persists. I cannot seem to find what dependencies I am missing in order to fix this.
Thanks in advance.
@logan-massey said in Cannot build QtWayland plugin when building qt from source for 32bit.:
I downloaded what I thought were the correct dependencies, but the issue persists. I cannot seem to find what dependencies I am missing in order to fix this.
From here:
To build the QtWayland module you need the external dependencies: xkbcommon - http://xkbcommon.org/ wayland - http://wayland.freedesktop.org/
There also other Qt modules, external components and driver support that may be needed.
What did you think were the correct dependencies?
What did you actually install into your Ubuntu VM?
What virtual display hardware is present?
How did you build Qt? What version? -
Hello @logan-massey,
you are getting this two error because your Qt source code build is not generated xcb and wayland flatform libraries.sudo apt-get install build-essential libgl1-mesa-dev
try the above common for build essentials. in configure commond add both wayland and xcb.
example - ../configure -prefix pathtoinstall -xcb -xcb-xlib -bundled-xcb-xinput -developer-build -wayland -- -DQT_BUILD_TESTS_BY_DEFAULT=OFF -
@logan-massey said in Cannot build QtWayland plugin when building qt from source for 32bit.:
I downloaded what I thought were the correct dependencies, but the issue persists. I cannot seem to find what dependencies I am missing in order to fix this.
From here:
To build the QtWayland module you need the external dependencies: xkbcommon - http://xkbcommon.org/ wayland - http://wayland.freedesktop.org/
There also other Qt modules, external components and driver support that may be needed.
What did you think were the correct dependencies?
What did you actually install into your Ubuntu VM?
What virtual display hardware is present?
How did you build Qt? What version?@ChrisW67 said in Cannot build QtWayland plugin when building qt from source for 32bit.:
@logan-massey said in Cannot build QtWayland plugin when building qt from source for 32bit.:
To build the QtWayland module you need the external dependencies:
xkbcommon - http://xkbcommon.org/
wayland - http://wayland.freedesktop.org/I have seen this and used
apt install
to try and get any and everything related to wayland and xkbcommon. But seeing it now I realize that it is something I need to go grab from the website. I have downloaded these and am reconfiguring now. I will let you know if this solves my issue.> What did you think were the correct dependencies?
I have usedapt install
to download any wayland or xcb/xkb library available. I believe I understand the error of my mistake relevant to dependencies now.> What did you actually install into your Ubuntu VM?
I am using a VirtualBox vm with an Ubuntu .iso> What virtual display hardware is present?
I am using a laptop with 2 additional monitors> How did you build Qt? What version?
I built qt by following this guide. Qt version 6.9 -
Hello @logan-massey,
you are getting this two error because your Qt source code build is not generated xcb and wayland flatform libraries.sudo apt-get install build-essential libgl1-mesa-dev
try the above common for build essentials. in configure commond add both wayland and xcb.
example - ../configure -prefix pathtoinstall -xcb -xcb-xlib -bundled-xcb-xinput -developer-build -wayland -- -DQT_BUILD_TESTS_BY_DEFAULT=OFF@Durugesha said in Cannot build QtWayland plugin when building qt from source for 32bit.:
> sudo apt-get install build-essential libgl1-mesa-dev
These have already been downloaded> example - ../configure -prefix pathtoinstall -xcb -xcb-xlib -bundled-xcb-xinput -developer-build -wayland -- -DQT_BUILD_TESTS_BY_DEFAULT=OFF
Previously using any of these flags (-xcb, -xcb-xlib, etc...) have resulted in errors mentioning something along the lines of "Forcing XCB to ON breaks its state". But I have followed @ChrisW67 suggestions in the post above and believe this may be my issue. I will try to build without these flags, then if I still run into issues I will add these flags and report my results here.Thank you for your reply.
-
Hi,
Unrelated to your issue, unless you plan to hack on Qt itself, drop the
-developer-build
option. -
Hi,
Unrelated to your issue, unless you plan to hack on Qt itself, drop the
-developer-build
option.@SGaist said in Cannot build QtWayland plugin when building qt from source for 32bit.:
Hi,
Unrelated to your issue, unless you plan to hack on Qt itself, drop the
-developer-build
option.the man, the myth, the legend, @SGaist
I'm currently building with that option enabled. Does it alter qt in any major way? Or is it fine to use a build that has that option?
-
@SGaist said in Cannot build QtWayland plugin when building qt from source for 32bit.:
Hi,
Unrelated to your issue, unless you plan to hack on Qt itself, drop the
-developer-build
option.the man, the myth, the legend, @SGaist
I'm currently building with that option enabled. Does it alter qt in any major way? Or is it fine to use a build that has that option?
@logan-massey it modifies some of the flags used for the build (sorry I don't remember the details right now). The point is that the build is not optimized as a release build which is what you want to have for building and distributing your applications.
-
@logan-massey it modifies some of the flags used for the build (sorry I don't remember the details right now). The point is that the build is not optimized as a release build which is what you want to have for building and distributing your applications.
@SGaist okay will reconfigure without it, thank you.
-
Hello @logan-massey,
you are getting this two error because your Qt source code build is not generated xcb and wayland flatform libraries.sudo apt-get install build-essential libgl1-mesa-dev
try the above common for build essentials. in configure commond add both wayland and xcb.
example - ../configure -prefix pathtoinstall -xcb -xcb-xlib -bundled-xcb-xinput -developer-build -wayland -- -DQT_BUILD_TESTS_BY_DEFAULT=OFF@Durugesha @ChrisW67 So currently while trying to configure with these flags "-xcb, -xcb-xlib, -bundled-xcb-xinput", I get the following 2 errors:
I also figure this would be relevant, what can I do to ensure these (xkbxommon-x11,, and xcb-sm) are "yes" ?
When in fact i have this installed already
Also, qtwayland says it is still missing required dependencies:
Thank you for your help!
-
Hi,
Did you restart the configuration from a clean state after installing the missing dependencies ?
-
Hi,
Did you restart the configuration from a clean state after installing the missing dependencies ?
I delete all folders in the build folder. And start a new terminal. Is that enough?
Once I removed the
-developer-build
option from the configure line, like you suggested earlier, I started getting those "Forcing to ON breaks its condition" errors, so I am only using the-bundled-xcb-xinput
option.Also, I am skipping a good amount of modules to keep the space it takes up fairly low and since I have encountered errors building all of them in the past. Here is a screenshot of my full configure line:
-
Check the logs generated from the configure tests, they might give you more hints about what is going wrong.
-
Check the logs generated from the configure tests, they might give you more hints about what is going wrong.
@SGaist
After a break from this, I am back and retrying. This is where I stand now. Help would be much appreciated as I am a little naive with this topic. ThanksI do not see any log files. Only file i see is the config.summary file. Which only mentions wayland once
The configure output throws this warning:
When I go to that file and look at line 26, I see this conditional:
I can confirm I have WaylandScanner:
And this shows I am using Wayland:
So to figure out which conditional was failing, I modified the CMakeLists.txt in the wayland/src folder by splitting the conditional into two if statements:
After running the configure script again with this new CMakeLists.txt file, I see this:
This tells me that the
NOT Wayland_FOUND
conditional is what is throwing this. I'm not positive what this means since I am running Wayland already since it comes with Ubuntu pre-installed. -
Do you have the wayland development libraries installed ?
-
The Wayland Development libraries I already have installed are as follows:
libwayland-dev
libffi-dev
libwayland-bin
libwayland-client0
libwayland-cursor0
libwayland-egl1
libwayland-server0
libwayland-doc -
I just saw that the cmake file looks for 1.15 and you have wayland 1.20. I wonder if it comes to that.
-
I just saw that the cmake file looks for 1.15 and you have wayland 1.20. I wonder if it comes to that.
@SGaist
spent yesterday working on this suggestion. Got wayland1.15 built and installed.I ran the configure script for qt and didnt see any issues with configuring the qtwayland module. Started building and it failed with this error:
before it failed, it spit out these warnings:
I was trying to open a log file to see if it would give me any more info, but it wasnt opening. So I restarted my VM, and now I get a blinking cursor on a black screen. I feel the issue may be that my version of ubuntu is incompatible with wayland 1.15. Trying to see what I can do to save this machine.
-
As a first step, I would have adapted the script to the version of wayland installed and not replace any system components like that.
What you can do is switch to one of the virtual terminal and force reinstall wayland.
Another possibility is to ssh into the system.
-
As a first step, I would have adapted the script to the version of wayland installed and not replace any system components like that.
What you can do is switch to one of the virtual terminal and force reinstall wayland.
Another possibility is to ssh into the system.
@SGaist
Im back where I was and have fixed the script. Its currently building. Will update with progress