diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2015-03-16 21:01:20 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2015-03-16 23:45:15 -0400 |
commit | bb44d9e7546e6118cd91db5bbe471a3ce2ee7fcd (patch) | |
tree | 053574a48db2838d265bd7bf5fe61e14446343bc /depends/packages/libxcb.mk | |
parent | 226f880498f82aee0d59974142dea3eeec2a12ee (diff) |
depends: fix a static qt5 crash when using certain versions of libxcb
See here for background: https://bugreports.qt.io/browse/QTBUG-34748
libxcb temporarily had an abi breakage which caused crashes when qt was
compiled against a non-compatible version. Building qt with -qt-xcb should have
shielded us from this issue, except that incompatible headers were used when
building qt's wrapper.
Make sure those headers aren't picked up by qt's build.
Details:
qt's build adds a wrapper around the xcb libs when -qt-xcb is used. This is
done to avoid having to link to a handful of different libs, which may not be
api/abi stable. This build depends on include-order, so that its files are
found before the real libxcb headers.
Our build (for other reasons related to qt's complicated build-system) injects
our prefix into CXXFLAGS. Because libxcb is found in this path, that reverses
the include-order, negating the purpose of the wrapper.
To fix, libxcb's includes are simply moved to a subdir. pkg-config ensures that
they're still found properly when needed.
To make things even more interesting, this behavior in qt's .pro files is broken:
INCLUDEPATH += $$QMAKE_CFLAGS_XCB
The INCLUDEPATH variable is processed by qmake which automatically prefixes each
entry with "-I". The QMAKE_CFLAGS_XCB variable comes from pkg-config and
already contains -I, making the path look like "-I-I/path/to/xcb/headers".
To work around that, CFLAGS/CXXFLAGS are used here rather than INCLUDEPATH.
Diffstat (limited to 'depends/packages/libxcb.mk')
-rw-r--r-- | depends/packages/libxcb.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index f29b577f8a..28f2bd6f25 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -13,8 +13,13 @@ define $(package)_preprocess_cmds sed "s/pthread-stubs//" -i configure endef +# Don't install xcb headers to the default path in order to work around a qt +# build issue: https://bugreports.qt.io/browse/QTBUG-34748 +# When using qt's internal libxcb, it may end up finding the real headers in +# depends staging. Use a non-default path to avoid that. + define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared endef define $(package)_build_cmds |