FS#54763 - [libinput] 1.8.0 breaks build of Qt

Attached to Project: Arch Linux
Opened by Antonio Rojas (arojas) - Monday, 10 July 2017, 18:21 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 11 July 2017, 11:48 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Qt fails to build with libinput 1.8.0. Rebuilding libinput using autotools instead of meson fixes the problem.

make[3]: Entering directory '/build/qt5-base/src/qtbase-opensource-src-5.9.0/src/platformsupport/input'
g++ -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -D_REENTRANT -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_INPUT_SUPPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_DEVICEDISCOVERY_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ishared -Ishared -I../../../include -I../../../include/QtInputSupport -I../../../include/QtInputSupport/5.9.0 -I../../../include/QtInputSupport/5.9.0/QtInputSupport -I../../../include/QtGui/5.9.0 -I../../../include/QtGui/5.9.0/QtGui -I../../../include/QtDeviceDiscoverySupport -I../../../include/QtDeviceDiscoverySupport/5.9.0 -I../../../include/QtDeviceDiscoverySupport/5.9.0/QtDeviceDiscoverySupport -I../../../include/QtCore/5.9.0 -I../../../include/QtCore/5.9.0/QtCore -I../../../include/QtGui -I../../../include/QtCore -I.moc -isystem /usr/include/libdrm -isystem /usr/include -I../../../mkspecs/linux-g++ -x c++-header -c ../../corelib/global/qt_pch.h -o .pch/Qt5InputSupport.gch/c++
In file included from /usr/include/c++/7.1.1/bits/stl_algo.h:59:0,
from /usr/include/c++/7.1.1/algorithm:62,
from ../../../include/QtCore/../../src/corelib/global/qglobal.h:109,
from ../../../include/QtCore/qglobal.h:1,
from ../../corelib/global/qt_pch.h:56:
/usr/include/c++/7.1.1/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.

This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 11 July 2017, 11:48 GMT
Reason for closing:  Fixed
Comment by Antonio Rojas (arojas) - Monday, 10 July 2017, 19:11 GMT
The problem is caused by the trailing slash in "Cflags: -I${includedir}/" in the pkgconfig file (which is not present when building with autotools). Removing the slash fixes the issue.
Comment by Laurent Carlier (lordheavy) - Monday, 10 July 2017, 22:22 GMT
I dig a bit, and found where is the bug; it's in meson with the way it manage Cflags with generate_pkgconfig_file()
(file /usr/lib/python3.6/site-packages/mesonbuild/modules/pkgconfig.py: lines 98 -> 103):

https://paste.xinu.at/gMl8fj/

if h is empty, os.path.join adds a trailing slash.
Comment by Laurent Carlier (lordheavy) - Tuesday, 11 July 2017, 11:21 GMT
Upstream bugreport https://github.com/mesonbuild/meson/issues/2050

With the proper patch :)
Comment by Laurent Carlier (lordheavy) - Tuesday, 11 July 2017, 11:39 GMT
meson-0.41.1+8+g1be77026-2 and libinput-1.8.0-2 pushed in [testing]
Comment by Antonio Rojas (arojas) - Tuesday, 11 July 2017, 11:48 GMT
Thanks, I confirm Qt builds fine again

Loading...