Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. When I configure Qt 5.6, it shows that xcb failed! Why?
Forum Updated to NodeBB v4.3 + New Features

When I configure Qt 5.6, it shows that xcb failed! Why?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
31 Posts 3 Posters 16.0k Views 2 Watching
  • 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.
  • jsulmJ jsulm

    @small_bird You're using wrong compiler to compile but the cross-compiler to link. I updated my previous post.

    small_birdS Offline
    small_birdS Offline
    small_bird
    wrote on last edited by small_bird
    #14

    @jsulm Ok, now I have solved the problem. I added one line to the qmake.conf file, now the file is like this:

    Now:

    modifications to g++.conf

    QMAKE_CC = arm-linux-gcc -lts
    QMAKE_CXX = arm-linux-g++ -lts
    QMAKE_LINK = arm-linux-g++ -lts
    QMAKE_LINK_SHLIB = arm-linux-g++ -lts

    modifications to linux.conf

    QMAKE_AR = arm-linux-ar cqs
    QMAKE_OBJCOPY = arm-linux-objcopy
    QMAKE_NM = arm-linux-nm -P
    QMAKE_STRIP = arm-linux-strip

    Before:

    modifications to g++.conf

    QMAKE_CC = arm-linux-gcc -lts
    QMAKE_LINK = arm-linux-g++ -lts
    QMAKE_LINK_SHLIB = arm-linux-g++ -lts

    modifications to linux.conf

    QMAKE_AR = arm-linux-ar cqs
    QMAKE_OBJCOPY = arm-linux-objcopy
    QMAKE_NM = arm-linux-nm -P
    QMAKE_STRIP = arm-linux-strip
    load(qt_config)

    However, I got the following result:

    xcb auto-detection... ()
    arm-linux-g++ -lts -c -pipe -O2 -Wall -W -fPIC -I. -I/home/smallbird/tslib1.4/include -I../../../mkspecs/linux-arm-gnueabi-g++ -o xcb.o xcb.cpp
    xcb.cpp:34: fatal error: xcb/xcb.h: No such file or directory
    compilation terminated.
    Makefile:172: recipe for target 'xcb.o' failed
    make: *** [xcb.o] Error 1
    xcb disabled.
    The test for linking against libxcb failed!
    You might need to install dependency packages for libxcb.
    See src/plugins/platforms/xcb/README.

    Why?The packages are all installed.

    jsulmJ 1 Reply Last reply
    0
    • small_birdS small_bird

      @jsulm Ok, now I have solved the problem. I added one line to the qmake.conf file, now the file is like this:

      Now:

      modifications to g++.conf

      QMAKE_CC = arm-linux-gcc -lts
      QMAKE_CXX = arm-linux-g++ -lts
      QMAKE_LINK = arm-linux-g++ -lts
      QMAKE_LINK_SHLIB = arm-linux-g++ -lts

      modifications to linux.conf

      QMAKE_AR = arm-linux-ar cqs
      QMAKE_OBJCOPY = arm-linux-objcopy
      QMAKE_NM = arm-linux-nm -P
      QMAKE_STRIP = arm-linux-strip

      Before:

      modifications to g++.conf

      QMAKE_CC = arm-linux-gcc -lts
      QMAKE_LINK = arm-linux-g++ -lts
      QMAKE_LINK_SHLIB = arm-linux-g++ -lts

      modifications to linux.conf

      QMAKE_AR = arm-linux-ar cqs
      QMAKE_OBJCOPY = arm-linux-objcopy
      QMAKE_NM = arm-linux-nm -P
      QMAKE_STRIP = arm-linux-strip
      load(qt_config)

      However, I got the following result:

      xcb auto-detection... ()
      arm-linux-g++ -lts -c -pipe -O2 -Wall -W -fPIC -I. -I/home/smallbird/tslib1.4/include -I../../../mkspecs/linux-arm-gnueabi-g++ -o xcb.o xcb.cpp
      xcb.cpp:34: fatal error: xcb/xcb.h: No such file or directory
      compilation terminated.
      Makefile:172: recipe for target 'xcb.o' failed
      make: *** [xcb.o] Error 1
      xcb disabled.
      The test for linking against libxcb failed!
      You might need to install dependency packages for libxcb.
      See src/plugins/platforms/xcb/README.

      Why?The packages are all installed.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #15

      @small_bird said in When I configure qt5.6, it shows that xcb failed! Why?:

      xcb/xcb.h

      Is xcb/xcb.h there? And if so where exactly is it?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      small_birdS 2 Replies Last reply
      0
      • jsulmJ jsulm

        @small_bird said in When I configure qt5.6, it shows that xcb failed! Why?:

        xcb/xcb.h

        Is xcb/xcb.h there? And if so where exactly is it?

        small_birdS Offline
        small_birdS Offline
        small_bird
        wrote on last edited by
        #16

        @jsulm Yes, it is there.
        It is located in /home/smallbird/qt-everywhere-opensource-src-5.6.0/qtbase/src/3rdparty/xcb/sysinclude.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #17

          If you are using Qt's 3rdparty xcb, you should say so in the configure options.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          small_birdS 2 Replies Last reply
          0
          • SGaistS SGaist

            If you are using Qt's 3rdparty xcb, you should say so in the configure options.

            small_birdS Offline
            small_birdS Offline
            small_bird
            wrote on last edited by
            #18

            @SGaist Yes, I have added -qt-xcb option, my configure is as following:
            #!/bin/sh
            ./configure
            -v
            -prefix /home/smallbird/qt5.6.0
            -release
            -continue
            -confirm-license
            -plugin-sql-sqlite
            -qt-libjpeg
            -qt-libpng
            -qt-zlib
            -no-c++11
            -qt-xcb
            -opensource
            -xplatform linux-arm-gnueabi-g++
            -force-pkg-config
            -make examples
            -no-dbus
            -pkg-config
            -qt-freetype
            -qt-pcre
            -I/home/smallbird/tslib1.4/include
            -L/home/smallbird/tslib1.4/lib

            exit

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @small_bird said in When I configure qt5.6, it shows that xcb failed! Why?:

              xcb/xcb.h

              Is xcb/xcb.h there? And if so where exactly is it?

              small_birdS Offline
              small_birdS Offline
              small_bird
              wrote on last edited by small_bird
              #19

              @jsulm
              As I did not designate the sysroot option, the compiler should seek the headers and libraries in the folder /usr/include.
              Now the folder has the xcb/xcb.h. However the result is still the same:

              "xcb auto-detection... ()
              arm-linux-g++ -lts -c -pipe -O2 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o xcb.o xcb.cpp
              xcb.cpp:34: fatal error: xcb/xcb.h: No such file or directory
              compilation terminated.
              Makefile:172: recipe for target 'xcb.o' failed
              make: *** [xcb.o] Error 1
              xcb disabled.
              The test for linking against libxcb failed!
              You might need to install dependency packages for libxcb.
              See src/plugins/platforms/xcb/README.
              "
              How could it be like that? This is my /usr/include:
              root@ubuntu:/home/smallbird/qt-everywhere-opensource-src-5.6.0# ls /usr/include/
              aio.h expat_external.h lastlog.h netipx rpcsvc termios.h
              aliases.h expat.h libgen.h netiucv sched.h tgmath.h
              alloca.h fcntl.h libintl.h netpacket scsi thread_db.h
              argp.h features.h libio.h netrom search.h time.h
              argz.h fenv.h libpng netrose semaphore.h ttyent.h
              ar.h fmtmsg.h libpng12 nfs setjmp.h uapi
              arpa fnmatch.h limits.h nl_types.h sgtty.h uchar.h
              asm-generic fontconfig link.h nss.h shadow.h ucontext.h
              assert.h freetype2 linux obstack.h signal.h ulimit.h
              autosprintf.h fstab.h locale.h paths.h sound unistd.h
              byteswap.h fts.h malloc.h pngconf.h spawn.h ustat.h
              c++ ftw.h math.h png.h stab.h utime.h
              complex.h _G_config.h mcheck.h poll.h stdc-predef.h utmp.h
              cpio.h gconv.h memory.h printf.h stdint.h utmpx.h
              crypt.h getopt.h misc protocols stdio_ext.h values.h
              ctype.h gettext-po.h mntent.h pthread.h stdio.h video
              dirent.h glob.h monetary.h pty.h stdlib.h wait.h
              dlfcn.h gnumake.h mqueue.h pwd.h string.h wchar.h
              drm gnu-versions.h mtd python3.5m strings.h wctype.h
              elf.h grp.h net rdma stropts.h wordexp.h
              endian.h gshadow.h netash re_comp.h sudo_plugin.h X11
              envz.h i386-linux-gnu netatalk regex.h syscall.h xcb
              err.h iconv.h netax25 regexp.h sysexits.h xen
              errno.h ifaddrs.h netdb.h reglib syslog.h xlocale.h
              error.h inttypes.h neteconet resolv.h tar.h xorg
              execinfo.h langinfo.h netinet rpc termio.h zlib.h

              This is what xcb folder contains:

              root@ubuntu:/home/smallbird/qt-everywhere-opensource-src-5.6.0# ls /usr/include/xcb/
              bigreq.h glx.h screensaver.h xcb_cursor.h xcb_image.h xevie.h xproto.h
              composite.h present.h shape.h xcb_event.h xcb_keysyms.h xf86dri.h xtest.h
              damage.h randr.h shm.h xcb_ewmh.h xcb_pixel.h xfixes.h xv.h
              dpms.h record.h sync.h xcbext.h xcb_renderutil.h xinerama.h xvmc.h
              dri2.h render.h xcb_atom.h xcb.h xcb_util.h xkb.h
              dri3.h res.h xcb_aux.h xcb_icccm.h xc_misc.h xprint.h

              You might say that I should not use the super user as root, but if not, some folders could not be entered. Could you offer me help? Thanks a lot!

              1 Reply Last reply
              0
              • SGaistS SGaist

                If you are using Qt's 3rdparty xcb, you should say so in the configure options.

                small_birdS Offline
                small_birdS Offline
                small_bird
                wrote on last edited by
                #20

                @SGaist Someone told me : "You don't have X11 development packages installed for the arm target, then. Stuff in /usr/include/X11 is for the host, not for the target." However, I wonder how to install the packages for the arm target !

                jsulmJ 1 Reply Last reply
                0
                • small_birdS small_bird

                  @SGaist Someone told me : "You don't have X11 development packages installed for the arm target, then. Stuff in /usr/include/X11 is for the host, not for the target." However, I wonder how to install the packages for the arm target !

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by jsulm
                  #21

                  @small_bird In another thread I told you that you need a sysroot to cross compile. The content of /usr on your host PC is completely unrelated to your target device. What is your device? What Linux distribution is running on it (I assume you're using Linux)? You really should read about cross-compiling.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  small_birdS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @small_bird In another thread I told you that you need a sysroot to cross compile. The content of /usr on your host PC is completely unrelated to your target device. What is your device? What Linux distribution is running on it (I assume you're using Linux)? You really should read about cross-compiling.

                    small_birdS Offline
                    small_birdS Offline
                    small_bird
                    wrote on last edited by small_bird
                    #22

                    @jsulm My device is arm-cortexA8. The linux distribution is based on linux3.2, not a offical distribution. I know what you mean, then where can I get the headers and libraries for the device.

                    jsulmJ 1 Reply Last reply
                    0
                    • small_birdS small_bird

                      @jsulm My device is arm-cortexA8. The linux distribution is based on linux3.2, not a offical distribution. I know what you mean, then where can I get the headers and libraries for the device.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #23

                      @small_bird So, on your device Ubuntu is running, right?
                      In that case start it log on on it (remotely over SSH or directly if you can connect a monitor and keyboard) and use apt-get to install all needed packages.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      small_birdS 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @small_bird So, on your device Ubuntu is running, right?
                        In that case start it log on on it (remotely over SSH or directly if you can connect a monitor and keyboard) and use apt-get to install all needed packages.

                        small_birdS Offline
                        small_birdS Offline
                        small_bird
                        wrote on last edited by
                        #24

                        @jsulm I am sorry that I have corrected the answer. According to the offical description, the distribution installed on PC is the same as that on the arm board. So after I use cross-compiler to compile the qt5.6 source code, the libraries it generates should be avaliable for the arm board. Why should I install the packages on the board ?

                        jsulmJ 1 Reply Last reply
                        0
                        • small_birdS small_bird

                          @jsulm I am sorry that I have corrected the answer. According to the offical description, the distribution installed on PC is the same as that on the arm board. So after I use cross-compiler to compile the qt5.6 source code, the libraries it generates should be avaliable for the arm board. Why should I install the packages on the board ?

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #25

                          @small_bird Could you please read about cross-compiling?
                          I already provided a link in one of your threads.
                          What you need is a sysroot containing libraries AND include files for your target architecture.
                          Lets say you cross-compile your app which depends on a library. In your code you include header files needed to use that library. Now the question is where are the library and its header files? You cannot use what is installed on your host PC as it is for a different architecture (your PC is most probably x86_64, right?). So, you need a sysroot containing that lib and header files. One way to get that sysroot is to mount the file system from your target device in your PC. If you're using Raspberry Pi (you still didn't say what your device actually is, arm-cortexA8 is not a device it is a CPU architecture) you can just put the SD card into your PC and mount it - then you have a sysroot.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          small_birdS 3 Replies Last reply
                          0
                          • jsulmJ jsulm

                            @small_bird Could you please read about cross-compiling?
                            I already provided a link in one of your threads.
                            What you need is a sysroot containing libraries AND include files for your target architecture.
                            Lets say you cross-compile your app which depends on a library. In your code you include header files needed to use that library. Now the question is where are the library and its header files? You cannot use what is installed on your host PC as it is for a different architecture (your PC is most probably x86_64, right?). So, you need a sysroot containing that lib and header files. One way to get that sysroot is to mount the file system from your target device in your PC. If you're using Raspberry Pi (you still didn't say what your device actually is, arm-cortexA8 is not a device it is a CPU architecture) you can just put the SD card into your PC and mount it - then you have a sysroot.

                            small_birdS Offline
                            small_birdS Offline
                            small_bird
                            wrote on last edited by
                            #26

                            @jsulm Thanks a lot for your patient reply ! My device is OK335XD, you might not hear that.

                            1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @small_bird Could you please read about cross-compiling?
                              I already provided a link in one of your threads.
                              What you need is a sysroot containing libraries AND include files for your target architecture.
                              Lets say you cross-compile your app which depends on a library. In your code you include header files needed to use that library. Now the question is where are the library and its header files? You cannot use what is installed on your host PC as it is for a different architecture (your PC is most probably x86_64, right?). So, you need a sysroot containing that lib and header files. One way to get that sysroot is to mount the file system from your target device in your PC. If you're using Raspberry Pi (you still didn't say what your device actually is, arm-cortexA8 is not a device it is a CPU architecture) you can just put the SD card into your PC and mount it - then you have a sysroot.

                              small_birdS Offline
                              small_birdS Offline
                              small_bird
                              wrote on last edited by
                              #27

                              @jsulm Now I will follow your advice and have a try. Thanks once more !

                              1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @small_bird Could you please read about cross-compiling?
                                I already provided a link in one of your threads.
                                What you need is a sysroot containing libraries AND include files for your target architecture.
                                Lets say you cross-compile your app which depends on a library. In your code you include header files needed to use that library. Now the question is where are the library and its header files? You cannot use what is installed on your host PC as it is for a different architecture (your PC is most probably x86_64, right?). So, you need a sysroot containing that lib and header files. One way to get that sysroot is to mount the file system from your target device in your PC. If you're using Raspberry Pi (you still didn't say what your device actually is, arm-cortexA8 is not a device it is a CPU architecture) you can just put the SD card into your PC and mount it - then you have a sysroot.

                                small_birdS Offline
                                small_birdS Offline
                                small_bird
                                wrote on last edited by
                                #28

                                @jsulm The linux installed on my board does not have apt-get command. It is the edition reduced.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #29

                                  Can you tell what exactly is running on that board ? It could be a yocto based image or something similar which could potentially simplify the situation.

                                  Also, it seems that we are currently answering in parallel on this thread for exactly the same problem. So I propose to stop the other one and continue here.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  small_birdS 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    Can you tell what exactly is running on that board ? It could be a yocto based image or something similar which could potentially simplify the situation.

                                    Also, it seems that we are currently answering in parallel on this thread for exactly the same problem. So I propose to stop the other one and continue here.

                                    small_birdS Offline
                                    small_birdS Offline
                                    small_bird
                                    wrote on last edited by
                                    #30

                                    @SGaist It is the linux edition designed by the FORLINX company based on linux3.2 core, not the distribution like ubuntu, etc.

                                    1 Reply Last reply
                                    0
                                    • small_birdS Offline
                                      small_birdS Offline
                                      small_bird
                                      wrote on last edited by
                                      #31

                                      Ok! I've solved the problem. My cross-compiler edition is wrong. Thank all the people above !

                                      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