The header xcb_icccm.h in the x11-libs/xcb-util-wm package uses C++ keywrods as variable names. This prevents this lib being used in a C++ application. In my case I am trying to build Qt5 from git. This is already fixed in the upstream git repo but until the next version is released I have extracted the appropriate commit as a patch and made a simple mod to the ebuild that applies it. The resulting package can now be used in C++ applications. Reproducible: Always Steps to Reproduce: 1. emerge x11-libs/xcb-util-wm 2. Try to build qtbase modules ofrm Qt5 git repo Actual Results: cd xcb/ && make -f Makefile make[4]: Entering directory `/home/sean_harmer/development/qt5/qtbase/src/plugins/platforms/xcb' g++ -c -m64 -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_CORESERVICES -DXCB_USE_XLIB -DXCB_USE_RENDER -DXCB_USE_GLX -DXCB_USE_IBUS -DQ_FONTCONFIGDATABASE -DQT_COMPILES_IN_HARFBUZZ -DQT_PLUGIN -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I../../../../mkspecs/linux-g++-64 -I. -I../../../../include/QtCore -I../../../../include/QtCore/5.0.0 -I../../../../include/QtCore/5.0.0/QtCore -I../../../../include/QtGui/5.0.0 -I../../../../include/QtGui/5.0.0/QtGui -I../../../../include/QtGui -I../../../../include/QtPlatformSupport/5.0.0 -I../../../../include/QtPlatformSupport/5.0.0/QtPlatformSupport -I../../../../include/QtPlatformSupport -I../../../../include/QtDBus -I../../../../include -I../../../../include/QtXml -I/usr/X11R6/include -I.moc/debug-shared -o .obj/debug-shared/qxcbclipboard.o qxcbclipboard.cpp In file included from qxcbclipboard.cpp:53: /usr/include/xcb/xcb_icccm.h:395: error: expected ‘,’ or ‘...’ before ‘class’ /usr/include/xcb/xcb_icccm.h:403: error: expected ‘,’ or ‘...’ before ‘class’ Expected Results: Compilation of C++ file using xcb_icccm.h works. Fixed in upstream git repo (git clone --recursive git://anongit.freedesktop.org/git/xcb/util-wm) in e08332c4a61f9825fc8893025ffa8f89d67a8900
Created attachment 287023 [details, diff] Patch with upstream fix
Created attachment 287025 [details] Ebuild to apply patch
*** Bug 383677 has been marked as a duplicate of this bug. ***
xcb-util-wm-0.3.9 fixes this.