xcb issues on update from 6.0.0 to 6.2.0-beta3
-
Hi, I'm confused as to what has changed between 6.0.0 and 6.2.0-beta3 such that I am now seeing the
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
error, similar to could not find the qt platform plugin xcb. I really don't want to have to specify the QT_PLUGIN_PATH as I can't be sure that it will always be the same in the build environments that I need to use. I have noticed that when I build with 6.0.0, my qt_build/plugins/platform has libqxcb_d.a and libqxcb_d.prl but when I build with 6.2.0-beta3, that directory is empty. I'm running CentOS 7
-
Hi,
Well, that's the sane way to see which library you are missing that is now required by the plugin.
-
@ltmdum said in xcb issues on update from 6.0.0 to 6.2.0-beta3:
when I build with 6.0.0, my qt_build/plugins/platform has libqxcb_d.a and libqxcb_d.prl but when I build with 6.2.0-beta3, that directory is empty.
Did you build Qt itself from source? If so, check your configure output to see what's missing.
-
@ltmdum said in xcb issues on update from 6.0.0 to 6.2.0-beta3:
I'm not seeing much difference between what's missing in the outputs of the 6.0.0 build and the 6.2.0-beta3 build. Anything specific you think I should be looking for?
See, for example, https://forum.qt.io/topic/128887/build-qt6-from-source-xcb-issue In this case, the poster's
configure.summary
file had "xcb-sm ............................... no" which was stopping the XCB plugin from being built. -
@JKSH Thanks. I have a no for EGL on X11 but I also had that for 6.0.0, so I thought it was fine. Is that my problem?
Here is my summaryBuilding for: linux-g++ (x86_64, CPU features: mmx sse sse2) Compiler: gcc 9.1.0 Build options: Mode ................................... debug Optimize debug build ................... yes Fully optimize release builds (-O3) .... no Building shared libraries .............. no Using C standard ....................... C11 Using C++ standard ..................... C++14 Using ccache ........................... no Using new DTAGS ........................ yes Generating GDB index ................... no Relocatable ............................ no Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX .................................. AVX AVX2 AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI Other x86 ............................ AES F16C RDRAND SHA Intrinsics without compiler architecture option yes Sanitizers: Addresses ............................ no Threads .............................. no Memory ............................... no Fuzzer (instrumentation only) ........ no Undefined ............................ no Build parts ............................ libs tools Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... no Qt Gui ................................. yes Qt Network ............................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... no Using system zlib ...................... yes Zstandard support ...................... no Thread support ......................... yes Common build options: Linker can resolve circular dependencies yes Qt Core: backtrace .............................. yes DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes ICU .................................... no Using system libb2 ..................... no Built-in copy of the MIME database ..... yes Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... no CLONE_PIDFD support in forkfd .......... yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... no OpenSSL ................................ no Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ no DTLS ................................... no OCSP-stapling .......................... no SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. yes Brotli Decompression Support ........... no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ yes Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... no OpenVG ................................. no OpenGL: Desktop OpenGL ....................... yes OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no INTEGRITY HID .......................... no mtdev .................................. no tslib .................................. no xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... no xkbcommon-x11 ........................ yes xcb-sm ............................... yes QPA backends: DirectFB ............................... no EGLFS .................................. no EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... no EGLFS GBM ............................ no EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes VK_KHR_display ......................... no QNX: lgmon ................................ no IMF .................................. no XCB: Using system-provided xcb-xinput ..... yes GL integrations: GLX Plugin ......................... yes XCB GLX .......................... yes EGL-X11 Plugin ..................... no Windows: Direct 2D ............................ no Direct 2D 1.1 ........................ no DirectWrite .......................... no DirectWrite 3 ........................ no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt Testlib: Tester for item models ................. yes Qt PrintSupport: CUPS ................................... no Core tools: qmake tool ............................. yes
-
Does it also happen if you run a shared build ?
-
@ltmdum said in xcb issues on update from 6.0.0 to 6.2.0-beta3:
I have a no for EGL on X11 but I also had that for 6.0.0, so I thought it was fine. Is that my problem?
Hmm... good question; I'm not sure. If it worked in 6.0.0, I'd expect it to work with 6.2.0 too.
Are you able to compare the
configure.summary
files for 6.0 and 6.2? Are there any differences at all? -
@SGaist a shared build is a last resort. I know you're asking for testing purposes but it will take some work for me to create one.
@JKSH I had a look at a diff between the two files and the difference was negligible.
I am beginning to think that the issue lies in cmake/QtPluginHelpers.cmake. I have found that with 6.0.0 the generated cpp files with the Q_IMPORT_PLUGIN macro are created where my final binary is but the equivalent files in 6.2.0-beta3 go to src/plugins/... directory. I have since found that my 6.0.0 binary incorporates these files but the 6.2.0-beta3 binary does not. There have been a lot of changes around this area of the source between 6.0.0 and 6.2.0 and the way things are done is completely different. Still trying to get my head around it
-
@ltmdum said in xcb issues on update from 6.0.0 to 6.2.0-beta3:
@SGaist a shared build is a last resort. I know you're asking for testing purposes but it will take some work for me to create one
Maybe less than you think, build only qtbase with the same configuration you have now just dropping the static option. It will be faster.
-
-
I'm finally up and running, just as an FYI I had to make these changes to firstly get past a "target_sources can not be used on an ALIAS target" error and secondly to get past "cmake objects of target <blah> referenced but no such target exists"
diff --git a/cmake/QtPublicPluginHelpers.cmake b/cmake/QtPublicPluginHelpers.cmake index 5023498b..1750cf63 100644 --- a/cmake/QtPublicPluginHelpers.cmake +++ b/cmake/QtPublicPluginHelpers.cmake @@ -193,12 +193,18 @@ function(__qt_internal_add_static_plugin_import_macro qt_module_unprefixed) __qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target) - set(objs_genex "$<TARGET_OBJECTS:${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_init_target}>") + set(objs_genex "$<TARGET_OBJECTS:${plugin_init_target}>") + + set(_plugin_target "${plugin_target}") + get_target_property(__aliased_target ${_plugin_target} ALIASED_TARGET) + if(__aliased_target) + set(_plugin_target ${__aliased_target}) + endif() # TODO: Replace the target_sources call here with the more generalized approach that will be # added to __qt_propagate_generated_resource (the one that determines whether to use # target_sources or target_link_libraries depending on the CMake version). - target_sources(${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target} INTERFACE + target_sources(${_plugin_target} INTERFACE "${objs_genex}") endfunction()
-
Did you consider submitting this patch for inclusion ?
-
So a completely clean build ?