[blfs-support] Problem with gcc-6 and qt--5.6

Pierre Bechetoille pierre.bechetoille at free.fr
Sat May 21 14:55:05 PDT 2016


Le 21/05/2016 23:07, Bruce Dubbs a écrit :
> Pierre Bechetoille wrote:
>> Hi,
>>
>> Following BLFS dev, I built latest KDE plasma and sddm with QT-5.6.0. 
>> The
>> build was OK.
>> However starting sddm or kde plasma failed (segmentation fault).
>>
>> Using gdb on sddm, I finally found the culprit: the crash occured in
>> QV4::ExecutionEngine::newArrayObject(int) () from 
>> /usr/lib/libQt5Qml.so.5
>>
>> Googling the problem, I found this issue in Qt bugreports:
>> https://bugreports.qt.io/browse/QTBUG-52057
>>
>> The description explains exactly what happens :
>> "Upcoming gcc-6 has much more aggressive dead-store elimination.
>>
>> See: http://gcc.gnu.org/gcc-6/porting_to.html (-flifetime-dse section).
>>
>> Due to undefined behavior in QV4::ExecutionEngine::newArrayObject(int)
>> this will lead to segfaults"
>>
>> There is no patch currently available however, the author suggests
>> compiling Qt-5.6.0 with gcc-6 adding "-flifetime-dse=1" to 
>> QMAKE_CXXFLAGS
>> (addition in
>> qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/linux-g++/qmake.conf).
>>
>> And it works ! I now can start sddm / kde plasma without crash.
>>
>> Hope this can help if anyone encounters the same problem.
>
> Sounds like we need a sed, but I do not see any QMAKE_CXXFLAGS 
> settings in that qmake.conf file.  Do we just need to add
>
> QMAKE_CXXFLAGS += -flifetime-dse=1
>
> to the end of the file?
>
>   -- Bruce
>
Yes, it is what I did. But there are lot of .conf files in mkspecs 
directory: maybe there is a more appropriate place (e.g. 
qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/common/linux.conf).

Pierre


More information about the blfs-support mailing list