Static build qt. Getting error because of xcb
-
Hi!
I'm trying to build static qt on Ubuntu. I built using this:./configure -prefix /home/misha/Qt5_14_2_static -release -opensource -confirm-license -static -no-glib -no-pulseaudio -no-alsa -opengl desktop -nomake examples -nomake tests
Then made simple gui project, but after start i got error:
qt.qpa.plugin could not find the qt platform plugin "xcb" in ""
Then i tried to build qt with xcb:
./configure -prefix /home/misha/Qt5_14_2_static -release -opensource -confirm-license -static -no-glib -no-pulseaudio -no-alsa -opengl desktop -nomake examples -nomake tests -qt-xcb
But getting this:
ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.
I tried to set direct link to xcb after "-qt-xcb" but it still doesn't want to configure.
Help me, please))) -
Hi,
You need the libxkbcommon development package for your distribution.
-
Then check the test logs to see exactly what failed.
-
Thanks, there is really something strange)))
loaded result for library config.qtbase_gui.libraries.xkbcommon Trying source 0 (type pkgConfig) of library xkbcommon ... + /usr/bin/pkg-config --exists --silence-errors xkbcommon '>=' 0.5.0 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library xkbcommon ... xkbcommon/xkbcommon.h not found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.xkbcommon FAILED
But /usr/include/xkbcommon/xkbcommon.h is exist. I can include it from qt creator. But why ./configure doesn't see that?
-
A very similar discussion is taking place at: https://forum.qt.io/topic/114784/definitive-guide-to-building-source-from-downloaded-run-file/29
No solution posted yet, though.
-
Silly question but did you check that you have that file in your system ?
-
Did you install the package after calling configure ?
If so, did you call configure from a clean state ? -
The easiest is to do out of source builds so you can easily nuke the build folder to start anew.
-
@BrMisha - I'm trying to build qt-everywhere-src-5.14.2 on ubuntu, having very similar problem with xcb that you report, i.e. "./configure -qt-xcb" gives errors. Are you also building qt-everywhere-src-5.14.2? How exactly did you overcome your problem and successfully build?
Thanks!