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

Compiler feature detection failure if multilib toolchain needs platform code generation flags

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Commits:
      737667d28913744b4eeacf96d51d766273957c50 (qt-creator/qt-creator/master)

      Description

      Qt Creator 4.11 is showing a new error opening projects using our wineg++ kit with a yocto cross-compiling gcc toolchain underneath:

      Compiler feature detection failure!
      The command "/opt/YukonAtom/sysroots/core2-32-wrs-linux/usr/bin/winegcc -print-search-dirs" terminated with exit code 2.
      winegcc: i686-wrs-linux-gcc failed
      
      Compiler feature detection failure!
      The command "/opt/YukonAtom/sysroots/core2-32-wrs-linux/usr/bin/wineg++ -dumpmachine" terminated with exit code 2.
      winegcc: i686-wrs-linux-g++ failed
      
      Compiler feature detection failure!
      The command "/opt/YukonAtom/sysroots/core2-32-wrs-linux/usr/bin/wineg++ -print-search-dirs" terminated with exit code 2.
      winegcc: i686-wrs-linux-g++ failed
      

      Thee problem here is that winegcc/wineg++ are compiler wrappers, and need to find the underlying target gcc/g++. To do that, it needs to be provided with flags like -B/opt/TargetSDK/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/i686-wrs-linux --target=i686-wrs-linux, and potentially --sysroot=/opt/TargetSDK/sysroots/i686-wrs-linux.

      I've used sdktool addTC ... to set up this compiler and kit in Qt Creator, and provided the needed flags in ProjectExplorer.GccToolChain.PlatformCodeGenFlags. gccPrepareArguments has a whitelist of which codegen flags to pass through when probing, and functions like GccToolChain::builtInHeaderPaths are using this and succeeding. But the guessGccAbi, gccVersion, and gccInstallDir do not, so they are failing.

      Comparing this code in 4.10.1, 4.11.0, and master, it does not appear that the actual failure is anything new: it just seems to have become more visible, because probing failures are now written to Core::MessageManager instead of qWarning() (this changed in b4022f9).

        Attachments

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

          Activity

            People

            • Assignee:
              kandeler Christian Kandeler
              Reporter:
              puetzk Kevin Puetz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes