Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

5.12.x offline installer fails on Centos 7: could not load xcb



  • Installation completes, but an attempt to run qtcreator fails with the standard 'Could not load the Qt platform plugin "xcb"'.

    I've tried both as myself (for both the complete installation and just the tools installation), and as root (for the tools installation).

    This is on a locked-down system without internet access (which is why I'm using the offline installer), so manually installing missing libraries is problematical, to say the least.

    Am I missing something, or would you expect the offline installer to have external dependencies? I haven't found any documentation on the offline installer, apart from a minimal FAQ.

    Thank you.



  • The file which can't be loaded is /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so, which does exist:

    1 # export QT_DEBUG_PLUGINS=1
    2 # ll /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so
     -rwxr-xr-x. 1 root root 15648 Dec 10 12:51 /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so
    3 # file /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so
     /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=fdf7a29959324483d53052d544a1c04757c62bd0, not stripped
    

    This is a 64-bit system.



  • Ok, so the offline installer has an external dependency on libxkbcommon, and libxkbcommon-x11, so I have manually installed both of those.

    When I now run qtcreator as an unprivileged user I get:

    $ /opt/Qt5.14.0/Tools/QtCreator/bin/qtcreator
    /opt/Qt5.14.0/Tools/QtCreator/bin/qtcreator: relocation error: /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/../../lib/libQt5DBus.so.5: symbol dbus_message_set_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference
    

    And when I run as root I get:

    # /opt/Qt5.14.0/Tools/QtCreator/bin/qtcreator
    QStandardPaths: wrong ownership on runtime directory /run/user/1001, 1001 instead of 0
    QStandardPaths: wrong ownership on runtime directory /run/user/1001, 1001 instead of 0
    /opt/Qt5.14.0/Tools/QtCreator/bin/qtcreator: symbol lookup error: /opt/Qt5.14.0/Tools/QtCreator/lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: FT_Get_Font_Format
    

    So I'm guessing that the offline installer hasn't been tested on Centos 7?

    Thanks.



  • So... the offline install also depends on freetype, for some reason. If I manually install that and run qtcreator as root, the FT_Get_Font_Format error is resolved, and I get a qtcreator GUI which seems to work.

    I still can't run qtcreator as an unprivileged user, though. There's lots of noise about the LIBDBUS_1_3 error on the net, with a 'resolution' that Ubuntu 14 isn't supported by something, but I'm on Centos 7. This presumably actually boils down to a file permissions error somewhere in the installation.


  • Moderators

    Hi @EML100, and welcome.

    version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference

    ...

    undefined symbol: FT_Get_Font_Format

    This looks like a compatibility issue between the versions of D-Bus and FreeType that are installed on your machine and the versions used to compile Qt Creator.

    Version checks:

    1. What version of CentOS 7 do you have? (Note: CentOS 7.0 was released in July 2014; CentOS 7.7 was released in September 2019)
    2. What version of libdbus do you have? How did you install it?
    3. What version of libfreetype do you have? How did you install it?

    Alternatively, could you install the Qt packages from the CentOS distro itself?



  • Hi @JKSH - this is 7.3.1611, ie. RHEL 7.3 from Nov 2016.

    dbus-daemon is at 1.6.12, from the initial installation.

    The system probably initially had freetype 2.4.11-15 on it, and I replaced this with 2.8.14 rpm, which "fixed" the DBUS error when running as root, but not as myself. freetype-devel is still at 2.4.11. 2.8.14 came out with RHEL 7.7, so this is a potential issue.

    The current problem is that something in this procedure has broken Subversion, which doesn't run at all now. I'm going to have to roll back on freetype at least, and try to find anything which the offline installer has changed.

    Note that qtcreator, when run as root, doesn't actually appear to work. The GUI is there, but I can't actually do anything.

    This system is locked down, with no net access. 'Upgrading' to a later 7.x is not an option. An offline Qt install from approved Centos rpms was an option, but I went for the stand-alone Qt install to avoid what would certainly have been a couple of days fixing rpm dependencies.

    As an aside, it would be interesting to find out how the devs managed to roll a binary release which they think is compatible with common distros. This appears to be next to impossible. When I do this (a lot) I do a release for the main distros, compiled for the first, or slightly after the first, minor release. My RHEL code is compiled on 7.1, for example.


  • Moderators

    @EML100 said in 5.12.x offline installer fails on Centos 7: could not load xcb:

    An offline Qt install from approved Centos rpms was an option, but I went for the stand-alone Qt install to avoid what would certainly have been a couple of days fixing rpm dependencies.

    The Qt offline installer does not contain the 3rd-party dependencies. You still need to manually install the dependencies.

    I imagine that fixing dependencies would be much easier if you installed Qt from an official CentOS RPM for your particular version of CentOS, instead of using the latest qt.io installer.

    this is 7.3.1611, ie. RHEL 7.3 from Nov 2016

    If you want to try the offline installer, you might have an easier time with Qt 5.9 LTS which is still supported for the next few months: http://download.qt.io/official_releases/qt/5.9/5.9.9/

    But, I still think that using an official CentOS RPM is your best bet.

    Note that Qt 5.12 supports and is tested on RHEL 7.4 as a minimum, so is not guaranteed to work out-of-the-box on RHEL 7.3:

    The system probably initially had freetype 2.4.11-15 on it, and I replaced this with 2.8.14 rpm, which "fixed" the DBUS error when running as root, but not as myself.

    FT_Get_Font_Format was introduced in FreeType 2.6: https://github.com/juj/emscripten-freetype/commit/f4d1c11faa116daad655b50828a434babbdaed2a

    But anyway, your symptoms sound quite odd to me: Upgrading FreeType got rid of D-Bus error messages? And only for the root user but not normal users? I'm not sure how to begin diagnosing this; your machine might be in an inconsistent state.

    The current problem is that something in this procedure has broken Subversion, which doesn't run at all now. I'm going to have to roll back on freetype at least, and try to find anything which the offline installer has changed.

    Again, the Qt offline installer does not install any 3rd-party system-wide libraries. It only touched /opt/Qt5.14.0/ according to your original post.

    As an aside, it would be interesting to find out how the devs managed to roll a binary release which they think is compatible with common distros. This appears to be next to impossible. When I do this (a lot) I do a release for the main distros, compiled for the first, or slightly after the first, minor release. My RHEL code is compiled on 7.1, for example.

    I don't know the details, but you could try subscribing to the Interest mailing list and asking the devs directly.

    I suspect they do so by building against the lowest supported versions of all dependencies (see https://doc.qt.io/qt-5.9/linux-requirements.html for example). They would try to stick to these versions for as long as possible until the benefits of upgrading outweigh the costs of supporting an old version.


Log in to reply