Due to the following revision, http://code.qt.io/cgit/qt/qtbase.git/commit?id=0b144bc76a368ecc6c5c1121a1b51e888a0621ac, qmake now includes "-isystem /usr/include". This is not a problem for gcc prior to gcc-6 but due to changes in how gcc-6 handles inclusion of <math.h> and <stdlib.h> (see https://gcc.gnu.org/gcc-6/porting_to.html) this leads to a bug. In net-p2p/qbittorrent-3.3.4-r1 for instance: >In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/bits/stl_algo.h:59:0, > from /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/algorithm:62, > from /usr/include/qt5/QtCore/qglobal.h:85, > from /usr/include/qt5/QtCore/qalgorithms.h:37, > from /usr/include/qt5/QtCore/qlist.h:37, > from /usr/include/qt5/QtCore/qstringlist.h:34, > from /usr/include/qt5/QtCore/QStringList:1, > from base/http/requestparser.cpp:32: >/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory > #include_next <stdlib.h> The bug had been filed with GCC upstream, marked as WONTFIX: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 I filed a bug with QT: https://bugreports.qt.io/browse/QTBUG-53375
Created attachment 434230 [details, diff] qtcore-5.6.0-no-default-isystem.patch Based on https://codereview.qt-project.org/#/c/159215 pending review
Apparently, it is the responsibility of packages using qmake to ensure that "/usr/include" is not included in INCLUDEPATH, as it will become "-isystem /usr/include" and ruin building with gcc-6 (see https://bugreports.qt.io/browse/QTBUG-53367). Filing this as a new bug: https://bugs.gentoo.org/show_bug.cgi?id=583626