Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53375

qmake's inclusion of "-isystem /usr/include" causes build failures with GCC-6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.6.0
    • Build tools: qmake
    • None

      Inclusion of "-isystem /usr/include" likely stemming from this revision causes build failures in some packages when building with GCC-6.

      For instance, when building qbittorrent (source tarball here), the build fails with:

       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>

      In "src/Makefile" "-isystem /usr/include" is listed in INCPATH. If I change it to "-I/usr/include" or omit it entirely it will build without failure.

      A bug was filed with GCC upstream: Bug 70129 - [6 Regression] stdlib.h: No such file or directory when using -isystem /usr/include

      Status is WONTFIX:

      So, IMHO just the packages that use this should either know what they are doing and put the C++ STL system headers first, or don't use STL, or don't mess with -isystem for the default directories. The last one preferred.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            buddenha Oswald Buddenhagen
            hodorgasm Peter Levine
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes