Build on Linux: -qt-xcb option?
-
-qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )
-
@Christian-Ehrlicher said in Build on Linux: -qt-xcb option?:
-qt-xcb was removed from configure (and also from the documentation for 5.15 but the official site did not pick up the lastest version yet - see https://codereview.qt-project.org/c/qt/qtdoc/+/300877/3/doc/src/platforms/linux.qdoc )
Good catch, I forgot about that one.
-
I'm seeing a similar problem on centOS 7.2, but I've previously installed earlier versions of Qt without a problem.
For me, Qt 5.15.0 seems to be installing, but the X11Extras is not, and I need the X11Extras module to install successfully.looking at the logs of a successful and working Qt 5.12 installation, it mentioned iccm failures there, too, but that seemed to be inconsequential, since those installations worked for me.
What stands out in my case is a complete absence of any reference to render or xrender in the logs for the 5.15.0 installation.
When I tried "-bundled-xcb-xinput", my config.summary said this:
"WARNING: Feature system-xcv-xinput is insignificant in this configuration, ignoring related command line option(s)."It didn't seem to make any difference.
As an experiment, the original poster could try installing Qt 5.14.0, to compare. I was able to install that on CentOS 7.2.
If that is successful, we might have the same problem, and comparing a successful 5.14 installation with a problematic 5.15 installation might help. We may both need the same solution. -
@Joshua-Fletcher said in Build on Linux: -qt-xcb option?:
We may both need the same solution.
The solution is to use xcb from the distribution since it no longer is shipped with Qt.
-
@Christian-Ehrlicher Thank you! That is a big help as it eliminates one of the main things that was confusing me.
The problem is now reduced to resolving the list of dependencies. I can't believe that if icccm (for example) is so important that it is not available more easily so I am wondering if it gets bundled with another package on CentOS. I am going to have to ask for packages to be installed as I don't have privileges at the moment, which is why it would be useful to have a definitive list of what is needed on CentOS.
-
I found that ensuring these packages were installed was sufficient for my purposes:
libxcb-devel
libxkbcommon-devel
xcb-util-devel
xcb-util-image-devel
xcb-util-keysyms-devel
xcb-util-renderutil-devel
xcb-util-wm-devel
mesa-libGL-develthe only one I was actually missing was: xcb-util-renderutil-devel
but if you can, check and make sure all those are installed, and I think it should work for you. -
Hi, I just also trying to solve problems with -qt-xcb option.
I removed this switch and compiled the latest Qt 5.15.0. But my application didn't start with error:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc.Directory qt\plugis\platforms contains only
libqlinuxfb.so
libqminimal.so
libqoffscreen.so
libqvnc.soThanks for any help
-
@JoeCFD Thanks for the reply. I already saw this topic but it is a slightly different problem.
I do not have a message:
Qt platform plugin "xcb" in "" even though it was found.
but only
Qt platform plugin "xcb" in ""
My issue is that I don't have file libqxcb.so in Qt/plugins/platform directory at all.
I tried to compile it with -qt-xcb like several times before, but because this switch was removed, I tried it without that. Also, I tried "-xcb" switch too.
But although I have "X11 specific: XCB Xlib...yes" message during configuration, libqxcb.so file isn't created.
-
Seems that adding following switches forces Qt to build libxcb.so
-xcb -xcb-xlib -bundled-xcb-input
(it's necessary to add all these switches based on my observations)
-
@ludek-vodicka, where do you specify those options? They are not part of configure, correct?
-
@Jawsh said in Build on Linux: -qt-xcb option?:
They are not part of configure
They are. Call configure with -h parameter and you will see.
-
Actually, if I remove bundled-xcb-input it works on configure. However, I have run into a new error: "ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed." Anyone have any ideas? I have installed as many of the prerequisite libs as I could find listed.
-
Found this on: https://github.com/RudolfCardinal/camcops/issues/3
sudo apt-get build-dep qt5-default (having enabled "Source code" option in Software and Updates > Ubuntu Software)
After I did this, deleted config.cache, and reran configure then it worked.
-
I had this exact same problem and I found that if I combined the installing the packages listed by Joshua Fletcher on 16 Jun 2020:
- libxcb-devel
- libxkbcommon-devel
- xcb-util-devel
- xcb-util-image-devel
- xcb-util-keysyms-devel
- xcb-util-renderutil-devel
- xcb-util-wm-devel
- mesa-libGL-devel
And then running configure with the options suggested by Ludek Vodicka on 19 Jun 2020:
- -xcb
- -xcb-xlib
- -bundled-xcb-xinput
Built Qt and correctly built the libqxcb.so under the platforms plugin directory, and now my applications compiled against Qt 5.15.2 launch without any errors.
-
Hey everyone. I was facing the same issue on Ubuntu 20.04. This thread and @SeanMurphy_6's solution (23rd Nov) helped me a lot. Thanks for that.
Just wanted to add that it is important to use the 'dev' versions of the xcb libraries. In my case I had the latest 'xcb xinerama0' library installed but libqxcb.so still didn't compile. Fixed it by installing the dev version (libxcb-xinerama0-dev
on Debian/Ubuntu). If all xcb libraries are installed correctly, you should- See a 'yes' for each xcb library on the CLI when running the configure command:
Checking XCB XINERAMA .... yes
- See a 'succeeded' for tests in the config.log file:
test config.qtbase_gui.libraries.xcb_xinerama succeeded
When compiled you should see libqxcb.so in the
qtbase/plugins/platforms
directory
The original software ran perfectly after ensuring this. -
In case this might help someone, there appears to be a bug in configure with respect to the iccc such that with Qt-5.12.6 on RHEL7, despite having it installed the config log says:
loaded result for library config.qtbase_gui.libraries.xcb_icccm Trying source 0 (type pkgConfig) of library xcb_icccm ... + /bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.3.9 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library xcb_icccm ... xcb/xcb_icccm.h not found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.xcb_icccm FAILED
I'm very sure I have that package installed (RHEL7's latest which is 0.27.1) which should have passed that version check, if I run that command myself I see it should have found it:
bash-4.2$ /bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.3.9 bash-4.2$ echo $? 0
Now pick a version I know I don't have to check pkg-config is working:
bash-4.2$ /bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.28.9 bash-4.2$ echo $? 1 bash-4.2$ /bin/pkg-config --version xcb-icccm 0.27.1 bash-4.2$ /bin/pkg-config --libs xcb-icccm -lxcb-icccm -lxcb
echoing $? gives you the result of the last command, 0 is "success" on unix-like OSes, non-zero is fail. Something odd is happening in that test.
If you were looking to install this library on RHEL7 the package name you need is xcb-util-wm-devel. Unfortunately that doesn't help in this case.
-
@jrb1 Using the latest version of RHEL7, I had this issue and found that I had to install
xcb-util-wm-devel
before installing other xcb* libraries. I tested this by removingxcb-util-wm-devel
andxcb-util-wm
then re-installing justxcb-util-wm-devel
and re-configuring. There seems to be a bug in RHEL7 with the way this it is packaged.Thank you for your post, you helped me fix my issue, along with @SeanMurphy_6 and @ludek-vodicka posts.
-
-