Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Trying to build static Qt5 in Ubuntu 12.04; all apps quit with 'Failed to load platform plugin "xcb"'

Trying to build static Qt5 in Ubuntu 12.04; all apps quit with 'Failed to load platform plugin "xcb"'

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 4.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Guy GizmoG Offline
    Guy GizmoG Offline
    Guy Gizmo
    wrote on last edited by
    #1

    Hi,

    I've built a static version of Qt 5 from Git, but all of the applications I build, including the Qt examples, will immediately quit with the following message:
    @Failed to load platform plugin "xcb". Available platforms are:

    The program has unexpectedly finished.@

    Here's the call to configure I used when building:
    ./configure -release -static -opensource -nomake examples -nomake tests -xcb

    Qt builds successfully, and at this point I'm quite sure I've installed all of the necessary libraries, particularly the xcb-dev libraries.

    I've been searching around extensively looking for a solution to this problem. In particular, I came across these:
    https://bugreports.qt-project.org/browse/QTBUG-21486
    https://bugreports.qt-project.org/browse/QTBUG-24496
    https://bugreports.qt-project.org/browse/QTBUG-26636
    None have helped.

    I've tried several different attempts at building Qt5, but as long as it's static, I get this problem. (If I build without the -static flag my apps will run.)

    I've tried adding:
    QTPLUGIN += xcb
    to my project file, but it makes no difference. As per the suggestion in bug 24496 I've also tried adding the following to main.cpp:
    @#include <QtCore/QtPlugin>
    ...
    Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)@

    but that just results in the following link error:
    undefined reference to `qt_static_plugin_QXcbIntegrationPlugin()'

    I'm at my wit's end now - I have no idea how to resolve this, and it's important I be able to use a statically built Qt5 if I'm going to proceed with what I'm doing. From the looks of those bug reports, a lot of people had a problem just like this or similar, but according to the bug reports, it's now resolved. What can I do from here?

    1 Reply Last reply
    0
    • Guy GizmoG Offline
      Guy GizmoG Offline
      Guy Gizmo
      wrote on last edited by
      #2

      I just tried again with RC1, but still the same situation. Is there anyone here that can help me with this?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        Did you "file a bug report":https://bugreports.qt-project.org/ ?

        The bug tracker is the authority on issues in Qt... anything reported anywhere else on the net is very likely to just get lost in the noise.

        1 Reply Last reply
        0
        • Guy GizmoG Offline
          Guy GizmoG Offline
          Guy Gizmo
          wrote on last edited by
          #4

          [quote author="Tobias Hunger" date="1355006667"]The bug tracker is the authority on issues in Qt... anything reported anywhere else on the net is very likely to just get lost in the noise.[/quote]

          Thanks for the tip. I'll make a bug report.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved