Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18902

Clang backend doesn't work with multilib gcc-7.2/glibc 2.26

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.4.0
    • Fix Version/s: Qt Creator 4.9.0
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:

      Description

      After ArchLinux upgraded gcc to version 7.2 and/or glibc to 2.26, clang backend displays a warning for Plain C/C++ cross-built projects, about being unable to parse headers.

      It says : 'Warning: The code model could not parse included file, which may lead to slow or incorrect code completion and highlighting, for example'.

       

      Project are built for 32bits on 64bit linux. After selecting native, 64b kit, there is no error nor any warning.

       

      • With a C++ project, instantly after project creation, from the included <iostream> header from the new project template, the warning displays: 

       

      new:120:7: error: 'operator new' takes type size_t ('unsigned int') as first parameter
       main.cpp:1:1: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1:
       main.cpp:1:10: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1:
       iostream:39:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/iostream:39:
       ostream:38:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ostream:38:
       ios:39:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ios:39:
       exception:142:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/exception:142:
       exception_ptr.h:40:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/exception_ptr.h:40:

       

       

      • With a C++ project, after including <cmath> or <cstdlib>, the warning displays: 

       

      cpp_type_traits.h:261:9: error: __int128 is not supported on this target
      main.cpp:1:1: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:1:
      main.cpp:2:10: note: in file included from /home/kk/untitleddd/untitled2/main.cpp:2:
      cmath:42:10: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/cmath:42:

       

      • With a Plain C project, after including <math.h>  it displays:

       

      mathcalls-helper-functions.h:21:36: error: unknown type name '_Float128'
       main.c:1:1: note: in file included from /home/kk/untitleddd/untitled/main.c:1:
       main.c:2:10: note: in file included from /home/kk/untitleddd/untitled/main.c:2:
       math.h:30:16: note: in file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/math.h:30:
       math.h:312:12: note: in file included from /usr/include/math.h:312:

       

       

      Steps to reproduce:

      1. Install GCC-7.2 and GLIBC-2.26
      2. Create a kit for 32bit desktop build
      3. Create new Plain C or C++ project
      4. Select 32bit kit
      5. Include aforementioned header files
      6. See the results

      Attached screenshots with the warnings, clangbackend debug output and my kit and compiler settings.

       

      Clang and GCC compiles the projects without any errors!

        Attachments

        1. clangbackend_c_debug.txt
          141 kB
        2. Screenshot_20170913_085302.png
          Screenshot_20170913_085302.png
          121 kB
        3. Screenshot_20170913_085410.png
          Screenshot_20170913_085410.png
          100 kB
        4. Screenshot_20170913_115132.png
          Screenshot_20170913_115132.png
          114 kB
        5. Screenshot_20170913_115217.png
          Screenshot_20170913_115217.png
          90 kB
        6. Screenshot_20180330_085726.png
          Screenshot_20180330_085726.png
          72 kB
        7. Screenshot_20181001_085403.png
          Screenshot_20181001_085403.png
          63 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              hunger Tobias Hunger
              Reporter:
              kkundzicz Krzysztof Kundzicz
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes