microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.19k stars 6.39k forks source link

[qt5-base] build failure: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed. #15150

Closed chenpei2 closed 3 years ago

chenpei2 commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install qt5-base:x64-linux

Failure logs

Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
Compiler: gcc 7.5.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags f16c largefile optimize_debug precompile_header rdrnd shani x86SimdAlways debug c++11 c++14 c++17 c++1z concurrent dbus reduce_exports reduce_relocations release_tools static stl
Build options:
  Mode ................................... debug; optimized tools
  Optimize debug build ................... yes
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Using ccache ........................... no
  Using new DTAGS ........................ yes
  Generating GDB index ................... no
  Relocatable ............................ no
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
    Other x86 ............................ AES F16C RDRAND SHA
    Intrinsics without -mXXX option ...... yes
  Build parts ............................ libs tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  udev ................................... no
  Using system zlib ...................... yes
  Zstandard support ...................... no
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... no
  iconv .................................. no
  ICU .................................... yes
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. no
    Using system PCRE2 ................... yes
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  Linux AF_NETLINK ....................... yes
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. yes
  X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. yes
    EGL on X11 ........................... yes
    xkbcommon-x11 ........................ yes
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ yes
  LinuxFB ................................ yes
  VNC .................................... yes
Qt Sql:
  SQL item models ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... no
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. yes
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... yes
  TDS (Sybase) ........................... no
Qt Testlib:
  Tester for item models ................. yes

Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.

Additional context I have installed all the needed libs according to this page:https://doc.qt.io/qt-5/linux-requirements.html , except libxcd-xinerama-dev, which is unable to locate on my machine. Is there anything to do with this lib?

JackBoosY commented 3 years ago

cc @Neumann-A

chenpei2 commented 3 years ago

It seems that the package name in the qt documentation is wrong. Anyway, I installed libxcb-xinerama0-dev with this command: apt-get install libxcb-xinerama0-dev and problem is solved.

JackBoosY commented 3 years ago

Should we fix the required package name?

chenpei2 commented 3 years ago

not sure, but I installed a full list of packages below to build qt5-base: libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcd-xinerama-dev (should be libxcb-xinerama0-dev on ubuntu 18.04) libxkbcommon-dev libxkbcommon-x11-dev @JackBoosY

marshevms commented 3 years ago

I can confirm that installing the above packages helped. BUT on Ubunutu 20.04:

 libxcb-sync0-dev is just libxcb-sync-dev
 libxcd-xinerama-dev is libxcb-xinerama0-dev
MohamadHalwani commented 3 years ago

I'm facing the exact same issue, and nothing here solved the issue ! Any suggestions ? Note: I'm using ubuntu 16.04 !

JackBoosY commented 3 years ago

@MohamadHalwani See https://github.com/microsoft/vcpkg/issues/16486#issuecomment-789374352

995939901 commented 2 years ago

sudo apt-get install libx11- sudo apt-get install libx11

sudo apt-get install libxcb- sudo apt-get install libxcb

sudo apt-get install libxkbcommon-devsudo sudo apt-get install libxkbcommon-x11-dev

A3itor commented 1 year ago

sudo apt-get install libx11- sudo apt-get install libx11

sudo apt-get install libxcb- sudo apt-get install libxcb

sudo apt-get install libxkbcommon-devsudo sudo apt-get install libxkbcommon-x11-dev

You are the man, thank you very much

Bzz2745 commented 1 year ago

So how can I install this dependences in rhel (my system version is 9.1)?

silverqx commented 1 year ago

Described here

sudo apt-get install build-essential perl python3 git
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
tiemuhua commented 1 year ago

sudo apt-get install libx11- sudo apt-get install libx11

sudo apt-get install libxcb- sudo apt-get install libxcb

sudo apt-get install libxkbcommon-devsudo sudo apt-get install libxkbcommon-x11-dev

sudo apt-get install libxkbcommon-dev not sudo apt-get install libxkbcommon-devsudo

AndreiCherniaev commented 11 months ago

You can use my example.

denghuilong-sir commented 5 months ago

rm config.cache .qmake.cache run ./configure again