[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#846996: Unable to compile with g++-6



Hi Dmitry,
>> Trying to compile lxqt-panel with g++-6 and qtbase5-dev_5.7.1 results in the following errors:
>>
>> /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h: In function ‘uint qCountTrailingZeroBits(quint16)’:
>> /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:630:32: error: ‘__builtin_ctzs’ was not declared in this scope
>>      return v ? __builtin_ctzs(v) : 16U;
>>                                 ^
>> /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h: In function ‘uint qCountLeadingZeroBits(quint16)’:
>> /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:693:32: error: ‘__builtin_clzs’ was not declared in this scope
>>      return v ? __builtin_clzs(v) : 16U;
>>                                 ^
>>
>> This is because g++ removed __builtin_clzs and __builtin_ctzs.
> There is a potential fix for this at https://codereview.qt-project.org/175542,
> but unfortunately it needs some more work.
>
> I have just asked the upstream author about the status, if he does not reply
> in a few days, I will write my own patch and add it to the next Debian upload.
according to Uroš Bizjak it should be sufficient to use
 return __tzcnt_u16(v);
instead of
 return v ? __tzcnt_u16(v) : 16U;

I haven't checked it...


Reply to: