Testing on fedora 30 with gcc-9.0.1, wacomtablet builds fail with error: [ 11%] Building CXX object src/common/CMakeFiles/wacom_common.dir/libwacomwrapper.cpp.o In file included from /usr/include/c++/9/memory:80, from /var/tmp/kdecache-rdieter/BUILDROOT/wacomtablet-3.1.1/src/common/libwacomwrapper.cpp:24: /usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = _WacomError; _Dp = Wacom::libWacomWrapper::lookupTabletInfo(int, int, Wacom::TabletInformation&)::<lambda(WacomError*&)>]’: /var/tmp/kdecache-rdieter/BUILDROOT/wacomtablet-3.1.1/src/common/libwacomwrapper.cpp:65:53: required from here /usr/include/c++/9/bits/unique_ptr.h:285:56: error: static assertion failed: unique_ptr's deleter must be invocable with a pointer 285 | static_assert(__is_invocable<deleter_type&, pointer>::value, | ^~~~~ /usr/include/c++/9/bits/unique_ptr.h:289:17: error: no match for call to ‘(std::unique_ptr<_WacomError, Wacom::libWacomWrapper::lookupTabletInfo(int, int, Wacom::TabletInformation&)::<lambda(WacomError*&)> >::deleter_type {aka Wacom::libWacomWrapper::lookupTabletInfo(int, int, Wacom::TabletInformation&)::<lambda(WacomError*&)>}) (std::remove_reference<_WacomError*&>::type)’ 289 | get_deleter()(std::move(__ptr)); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/9/bits/unique_ptr.h:289:17: note: candidate: ‘void (*)(WacomError*&)’ {aka ‘void (*)(_WacomError*&)’} <conversion> /usr/include/c++/9/bits/unique_ptr.h:289:17: note: conversion of argument 2 would be ill-formed: /usr/include/c++/9/bits/unique_ptr.h:289:17: error: cannot bind non-const lvalue reference of type ‘WacomError*&’ {aka ‘_WacomError*&’} to an rvalue of type ‘std::remove_reference<_WacomError*&>::type’ {aka ‘_WacomError*’} /var/tmp/kdecache-rdieter/BUILDROOT/wacomtablet-3.1.1/src/common/libwacomwrapper.cpp:63:25: note: candidate: ‘Wacom::libWacomWrapper::lookupTabletInfo(int, int, Wacom::TabletInformation&)::<lambda(WacomError*&)>’ <near match> 63 | auto errorDeleter = [](WacomError *&e){libwacom_error_free(&e);}; | ^ /var/tmp/kdecache-rdieter/BUILDROOT/wacomtablet-3.1.1/src/common/libwacomwrapper.cpp:63:25: note: conversion of argument 1 would be ill-formed: In file included from /usr/include/c++/9/memory:80, from /var/tmp/kdecache-rdieter/BUILDROOT/wacomtablet-3.1.1/src/common/libwacomwrapper.cpp:24: /usr/include/c++/9/bits/unique_ptr.h:289:17: error: cannot bind non-const lvalue reference of type ‘WacomError*&’ {aka ‘_WacomError*&’} to an rvalue of type ‘std::remove_reference<_WacomError*&>::type’ {aka ‘_WacomError*’} 289 | get_deleter()(std::move(__ptr)); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/9/bits/unique_ptr.h:153:18: warning: ‘std::__uniq_ptr_impl<_Tp, _Dp>::pointer& std::__uniq_ptr_impl<_Tp, _Dp>::_M_ptr() [with _Tp = _WacomError; _Dp = Wacom::libWacomWrapper::lookupTabletInfo(int, int, Wacom::TabletInformation&)::<lambda(WacomError*&)>]’ used but never defined 153 | pointer& _M_ptr() { return std::get<0>(_M_t); } | ^~~~~~ make[2]: *** [src/common/CMakeFiles/wacom_common.dir/build.make:194: src/common/CMakeFiles/wacom_common.dir/libwacomwrapper.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:631: src/common/CMakeFiles/wacom_common.dir/all] Error 2 make: *** [Makefile:133: all] Error 2
Git commit 810487c4fa240f6de598b04929bb08de8937feb5 by Valerii Malov. Committed on 28/04/2019 at 16:10. Pushed by valeriymalov into branch 'master'. (Supposedly) fix building with gcc9 I don't really have access to gcc9 right now to test, but this should fix "static assertion failed: unique_ptr's deleter must be invocable with a pointer" M +1 -1 src/common/libwacomwrapper.cpp https://commits.kde.org/wacomtablet/810487c4fa240f6de598b04929bb08de8937feb5
Hello, I don't think I can get my hands on gcc9 in the nearest time. Can you try the following patch? https://cgit.kde.org/wacomtablet.git/patch/?id=810487c4fa240f6de598b04929bb08de8937feb5 If this fixes the problem, do you need a bugfix release or you'll fine with a patch until next release?
Patch is fine for me, I can test later today. Thanks
Confirmed patch works as advertised, thanks.