Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85922

Qt 5.15.0 cannot be compiled with options -xcb and -xcb-xlib on RedHat 7.5 with Gcc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 6.0
    • 5.15.0
    • Build System
    • None
    • Red Hat Enterprise Linux Workstation release 7.5 (Maipo)
      GCC version 9.1.1 20190605 (Red Hat 9.1.1-2) (GCC)
    • Linux/X11

    Description

      Hello,

       

      I need to compile Qt 5.15.0 on Linux with xcb, glx and opengl desktop support. 

      My configure command is the following

      configure -opensource -platform linux-g+-64 -shared -release -no-rpath -cups -system-zlib -cstd c+17 -opengl desktop -qt-libjpeg -qt-libpng -xcb -xcb-xlib -no-icu -nomake examples -nomake tests -prefix

       

      I have all the packages on that machine as recommended on https://wiki.qt.io/Building_Qt_5_from_Git 

      Yet, the configure fails reporting that the -xcb-xlib option is not usable because features.xib is not available with the error message.

      ERROR: Feature 'xcb-xlib' was enabled, but the pre-condition 'features.xlib && libs.xcb_xlib' failed.

      I have looked into the qtbase/src/gui/configure.json file and found

      "xlib": {
       "label": "XLib",
       "test": {
       "main": [
       "Display *d = XOpenDisplay(NULL);",
       "XCloseDisplay(d);"
       ]
       },
       "headers": "X11/Xlib.h",
       "sources": [
       \{ "type": "makeSpec", "spec": "X11" }
       ]
       },
      

      From what I figured out from that file, the X11 path is read from the mkspecs file for my configuration. However, in  qtbase/mkspecs/linux-g++-64/qmake.conf, the paths referenced are

      QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
      QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64

      and this is not at all the configuration on my RedHat machine.

      I changed the paths to 

      QMAKE_LIBDIR_X11 = /usr/lib64
      QMAKE_LIBDIR_OPENGL = /usr/lib64

      so that it matches my local configuration and my configuration command works now,

      Would it be better to change the check in qtbase/src/gui/configure.json

      to use a pkg-config pattern instead?

      Something like 

      "xlib": {
       "label": "XLib",
       "test": {
       "main": [
       "Display *d = XOpenDisplay(NULL);",
       "XCloseDisplay(d);"
       ]
       },
       "headers": "X11/Xlib.h",
       "sources": [
       *{ "type": "pkgConfig", "args": "x11" }*
       ]
       },

      I have not tested it: I do not know if the Qt build system will handle possibly contradictory information for QMAKE_LIBDIR_X11 and QMAKE_LIBDIR_OPENGL: one coming from the qmake.defs and one from configure.json.

       

      Best regards,

       

      Didier Donner

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            didier.donner Didier Donner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes