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

-isystem /usr/include with cstdlib causes file not found in include_next using GCC 6.1.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.6.0
    • Build tools: qmake
    • None

    Description

      Under Arch Linux, makefiles generated by qmake from qt 5.6.0 causes the following error with gcc 6.1.1:

      In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0,
                       from /usr/include/c++/6.1.1/algorithm:62,
                       from /usr/include/qt/QtCore/qglobal.h:85,
                       from /usr/include/qt/QtCore/QtGlobal:1,
                       from ../<Project Source File>
      /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
       #include_next <stdlib.h>
                               ^
      compilation terminated.
      Makefile:2433: recipe for target 'telegramfunctionobject.o' failed
      make: *** [telegramfunctionobject.o] Error 1
      

      Removing -isystem /usr/include solves this problem, but this sounds like a dirty hack. Perhaps -isystem did something weird to the include file ordering.

      Build log with gcc -v to show include file order: https://cfp.vim-cn.com/cc2M (append /txt to the URL for formatted output with line numbers)
      AUR workaround: https://aur.archlinux.org/cgit/aur.git/commit/?h=libqtelegram-ae-git&id=dd074f4efc956fca13256a9455de2387797b7563 (QMAKE_CFLAGS_ISYSTEM='')

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              arturia2e5 Mingye Wang
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes