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. [SOLVED] qt-creator could not find or load the Qt platform plugin xcb ?
QtWS25 Last Chance

[SOLVED] qt-creator could not find or load the Qt platform plugin xcb ?

Scheduled Pinned Locked Moved Installation and Deployment
19 Posts 4 Posters 78.5k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #4

    XCB stuff might be just that something is still missing in the OS. Linux distro packagers vary a lot, a thing that works flawlessly on one distro can easily fail on another.

    As for prefix/ nonprefix stuff. I'll give you a short description. Just bear in mind I'm heavily biased in this area :P

    A "standard" way of installing Qt is to do it without a prefix. When you run "make", Qt is compiled and all libraries and headers remain inside your build directory (usually Qt source dir). When you run "make install", make copies libraries to standard OS-dependent set of locations (on linux it's /usr/bin for binaries, /usr/lib for libraries, etc. Other OSes copy the stuff to compeltely different locations). This makes Qt work without hassles, but you can't install another version in parallel (it would overwrite the current one) and is rather hard to track (as you've mentioned, files are copied all over the filesystem. It's even worse on Mac).

    Another approach (I'm using this one all the time) is to configure Qt using -prefix $PWD or -develope-build. This builds Qt inside source dir and running make install is not required. Resulting package is big (all sources, libs, headers, object files are there), but it's self contained: you can compile another in parallel, in another folder. When something fails, you simply remove the directory and your system remains clean. In order to use the package, you have to point the environment to it (add bin directory to $PATH, optionally add $QTDIR, too).

    (Z(:^

    1 Reply Last reply
    0
    • E Offline
      E Offline
      EdOfTheMountain
      wrote on last edited by
      #5

      I * think * I have all xcb dependencies installed:
      @
      yum install libxcb libxcb-devel xcb-util xcb-util-devel
      rpm -qa |grep xcb
      libxcb-1.8.1-1.el6.x86_64
      xcb-util-devel-0.3.6-1.el6.x86_64
      libxcb-devel-1.8.1-1.el6.x86_64
      xcb-util-0.3.6-1.el6.x86_64
      @

      Thank you very much for detailing the "standard" way of installing Qt! I will try your approach.

      I am working on building a kickstart for a 64-bit CentOS 6.4 build machine that will be used to build and port our old 32-bit CentOS 5.2 software. The "-developer-build" option did not seem appropriate for a build machine that build software and makes RPM packages for distribution.

      Attempting to use Qt 5 installers downloaded fromhttp://qt-project.org resulted in complaints about the old packages used in CentOS 6.4 which are:
      @
      libstdc++-4.4.7-3.el6.x86_64
      gcc-4.4.7-3.el6.x86_64
      @

      So I * think * I need to build Qt5 from source to create a new build machine using the older CentOS 6.4 4.4.7 libraries. Does this make sense?

      Or is it better to upgrade to 4.7 versions of libc and libstdc++ and then build software releases using RPATH to a new 4.7 libstdc++.so that I deploy with my software?

      Opinions and recommendations are much appreciated.

      Thanks again,

      -Ed

      1 Reply Last reply
      0
      • E Offline
        E Offline
        EdOfTheMountain
        wrote on last edited by
        #6

        All is good! Thank you!

        I discovered the Red Hat DevTools 1.1 for CentOS-5/6 x86_64 and updated GCC tools on my CentOS 6.4 build machine from gcc version 4.4.7 to 4.7.

        • http://people.centos.org/tru/devtools-1.1/
        • https://access.redhat.com/site/documentation/Red_Hat_Developer_Toolset/

        The devtools work great! I wished I had discovered them sooner. They use Software Collections (SCLs) that install all the tools under /opt directory without polluting any of the existing gcc version 4.4.7 CentOS 6.4 developer tools. Now if I could only figure out how to install and use both 32-bit and 64-bit Red Hat DevTools to build software apps under 64-bit CentoOS 6.4?

        Recipe used:
        @

        Install missing Qt build dependencies:

        yum install libxcb libxcb-devel xcb-util xcb-util-devel

        Install Red Hat DevTools 1.1 for CentOS-5/6 x86_64

        wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo
        yum install devtoolset-1.1

        Open new terminal in ~/projects folder and enable devtoolset-1.1

        mkdir ~/projects
        cd ~/projects
        scl enable devtoolset-1.1 bash

        Test - Expect to see gcc version 4.7.2 ( * not * gcc version 4.4.7 )

        gcc -v

        Git Qt source

        git clone git://gitorious.org/qt/qt5.git qt5
        cd qt5
        git checkout stable
        perl init-repository

        Clean and configure

        Optional clean is needed if re-configuring

        git submodule foreach --recursive "git clean -dfx"
        ./configure -opensource -nomake examples -nomake tests -no-gtkstyle -confirm-license -qt-libpng -no-c++11

        If making on multi-core, for example a quad-core,use "make -j 4"

        make

        make install copies to /usr/local/Qt-5.1.2/

        Run as su or using sudo

        make install

        Build Qt Creator

        export QTDIR=/usr/local/Qt-5.1.2/

        Git Qt Creator source

        cd ~/projects
        git clone git://gitorious.org/qt-creator/qt-creator.git
        cd qt-creator

        ${QTDIR}/bin/qmake -r
        make

        ./bin/qtcreator &
        @

        Thanks again for your help!

        -Ed

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #7

          I think it's a good candidate for posting on a wiki. Care to update "the guide":http://qt-project.org/wiki/Building_Qt_5_from_Git yourself or should I do it? I think a lot of people can benefit from your description - questions about building on CentOS are rather frequent.

          (Z(:^

          1 Reply Last reply
          0
          • E Offline
            E Offline
            EdOfTheMountain
            wrote on last edited by
            #8

            Sure, I'll take a stab at it.

            Thanks!

            1 Reply Last reply
            0
            • E Offline
              E Offline
              EdOfTheMountain
              wrote on last edited by
              #9

              I changed my mind. Can you please update the guide for me?

              It was not clear to me how you would edit an existing wiki article without damaging existing content. I am used to MediaWiki.

              Thanks!

              -Ed

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #10

                OK no problem, I'll do it right away.

                Edit: done.

                (Z(:^

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Lugaxx
                  wrote on last edited by
                  #11

                  EdOfTheMountain's guide doesn't work for me.

                  [quote author="EdOfTheMountain" date="1375458145"]
                  make
                  [/quote]

                  @.obj/moc_qqmlvaluetype_p.o: file not recognized: File format not recognized
                  collect2: error: ld returned 1 exit status
                  make[3]: *** [../../lib/libQt5Qml.so.5.2.0] Error 1
                  make[3]: Leaving directory /opt/sw/qt5/qt5/qtdeclarative/src/qml' make[2]: *** [sub-qml-make_first-ordered] Error 2 make[2]: Leaving directory /opt/sw/qt5/qt5/qtdeclarative/src'
                  make[1]: *** [sub-src-make_first] Error 2
                  make[1]: Leaving directory `/opt/sw/qt5/qt5/qtdeclarative'
                  make: *** [module-qtdeclarative-make_first] Error 2@

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    alphabit
                    wrote on last edited by
                    #12

                    Hi guys,

                    I followed the steps listed but with yesterday's source and on centos 6.4 and everything works fine, except for the mouse scroll wheel. I VNC into the box that qt-creator compiled and installed from sources, but VNC or no VNC, the scrollwheel just doesn't work. I recompiled Qt and Qt-Creator a number of times but still no go. I have all the xcb packages installed but the scrollwheel just doesn't work. Did anyone experience this issue?

                    Thanks

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #13

                      No, I have not had that problem. Check out the configure output: maybe there are some hints there.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        alphabit
                        wrote on last edited by
                        #14

                        I checked the output and didn't find anything out of the norms. Let me post the output here, maybe your eyes may find something.

                        @
                        Configure summary

                        Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
                        Platform notes:

                                - Also available for Linux: linux-kcc linux-icc linux-cxx
                        

                        Build options:
                        Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend avx avx2 clock-gettime clock-monotonic compile_examples concurrent dbus evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl openssl pcre png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports reduce_relocations release rpath shared small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-jpeg system-zlib xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender
                        Build parts ............ libs tools
                        Mode ................... release
                        Using C++11 ............ no
                        Using PCH .............. yes
                        Target compiler supports:
                        SSE2/SSE3/SSSE3 ...... yes/yes/yes
                        SSE4.1/SSE4.2 ........ yes/yes
                        AVX/AVX2 ............. yes/yes

                        Qt modules and options:
                        Qt D-Bus ............... yes (loading dbus-1 at runtime)
                        Qt Concurrent .......... yes
                        Qt GUI ................. yes
                        Qt Widgets ............. yes
                        Large File ............. yes
                        QML debugging .......... yes
                        Use system proxies ..... no

                        Support enabled for:
                        Accessibility .......... yes
                        ALSA ................... yes
                        CUPS ................... no
                        FontConfig ............. yes
                        FreeType ............... yes (system library)
                        Glib ................... yes
                        GTK theme .............. no
                        HarfBuzz ............... no
                        Iconv .................. yes
                        ICU .................... no
                        Image formats:
                        GIF .................. yes (plugin, using bundled copy)
                        JPEG ................. yes (plugin, using system library)
                        PNG .................. yes (in QtGui, using bundled copy)
                        journald ............... no
                        mtdev .................. no
                        Networking:
                        getaddrinfo .......... yes
                        getifaddrs ........... yes
                        IPv6 ifname .......... yes
                        OpenSSL .............. yes (loading libraries at run-time)
                        NIS .................... yes
                        OpenGL / OpenVG:
                        EGL .................. no
                        OpenGL ............... desktop
                        OpenVG ............... no
                        PCRE ................... yes (bundled copy)
                        pkg-config ............. yes
                        PulseAudio ............. yes
                        QPA backends:
                        DirectFB ............. no
                        EGLFS ................ no
                        KMS .................. no
                        LinuxFB .............. yes
                        XCB .................. yes (system library)
                        EGL on X ........... no
                        GLX ................ yes
                        MIT-SHM ............ yes
                        Xcb-Xlib ........... yes
                        Xcursor ............ yes (loaded at runtime)
                        Xfixes ............. yes (loaded at runtime)
                        Xi ................. no
                        Xi2 ................ yes
                        Xinerama ........... yes (loaded at runtime)
                        Xrandr ............. yes (loaded at runtime)
                        Xrender ............ yes
                        XKB ................ no
                        XShape ............. yes
                        XSync .............. yes
                        XVideo ............. yes
                        Session management ..... yes
                        SQL drivers:
                        DB2 .................. no
                        InterBase ............ no
                        MySQL ................ yes (plugin)
                        OCI .................. no
                        ODBC ................. no
                        PostgreSQL ........... yes (plugin)
                        SQLite 2 ............. no
                        SQLite ............... yes (plugin, using bundled copy)
                        TDS .................. no
                        udev ................... no
                        xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
                        zlib ................... yes (system library)

                        NOTE: libxkbcommon and libxkbcommon-x11 0.4.0 or higher not found on the system, will use
                        the bundled version from 3rd party directory.

                        Qt is now configured for building. Just run 'gmake'.
                        Once everything is built, you must run 'gmake install'.
                        Qt will be installed into /usr/local/Qt-5.3.0

                        Prior to reconfiguration, make sure you remove any leftovers from
                        the previous build.

                        @

                        1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #15

                          Looks good to me, too...

                          (Z(:^

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alphabit
                            wrote on last edited by
                            #16

                            Would this qualify as a bug? I can reproduce this everytime on a Centos 6.4 and 6.5.

                            1 Reply Last reply
                            0
                            • sierdzioS Offline
                              sierdzioS Offline
                              sierdzio
                              Moderators
                              wrote on last edited by
                              #17

                              Yes, please "report it":https://qt-project.org/wiki/ReportingBugsInQt.

                              The wiki page is not part of documentation per se, so you can't claim it's a bug because a thing from the docs is not working, but I think it's important to notify the Qt dev that something is wrong.

                              (Z(:^

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                alphabit
                                wrote on last edited by
                                #18

                                Hi sierdzio,

                                Apparently, there is an existing "bug":https://bugreports.qt-project.org/browse/QTBUG-38169 with 5.3beta1, which I am experiencing since I cloned a few days back. I read the bug report and it looks like 5.2.1 was all good. I want to follow the same instructions listed on this post to "build 5.2.1 from source.":http://download.qt-project.org/official_releases/qt/5.2/5.2.1/single/ .Would they work? The file I was hoping to download is qt-everywhere-opensource-src-5.2.1.tar.gz.

                                Thanks.

                                1 Reply Last reply
                                0
                                • sierdzioS Offline
                                  sierdzioS Offline
                                  sierdzio
                                  Moderators
                                  wrote on last edited by
                                  #19

                                  [quote author="alphabit" date="1398321241"]Would they work? The file I was hoping to download is qt-everywhere-opensource-src-5.2.1.tar.gz.Thanks.[/quote]

                                  You need to check yourself. I have seen enough errors on CentOS to try to stay away from that OS as far as possible.

                                  I often build Qt on Kubuntu linux and sometimes on OpenSUSE - there it works without problems, every time.

                                  (Z(:^

                                  1 Reply Last reply
                                  0
                                  • H hmserenade referenced this topic on

                                  • Login

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