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

Qt Creator doesn't see environment PATH variable and doesn't see ninja executable

    XMLWordPrintable

Details

    • macOS
    • 04215912a (17.0)

    Description

      Qt Creator doesn't see environment PATH variable and doesn't see ninja executable

      There is ninja installed via brew. The executable file is located in /usr/local/bin/ninja. I am trying to configure a simple project in Qt Creator using the Ninja Multi-Config generator and I get the error:

      [cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja Multi-Config". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
      [cmake] -- Configuring incomplete, errors occurred! 

      If I set the variable:
      CMAKE_MAKE_PROGRAM=/usr/local/bin/ninja then the error disappears, however, when I call the configuration via the console manually like this:

      cmake ../untitled -D CMAKE_GENERATOR="Ninja Multi-Config" 

      then the problem does not arise at all.

      Here is the value of the PATH variable in the console:

      echo $PATH
      /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin 

      And here is the value of the PATH variable in the project settings in Qt Creator (Build Settings - CMake - Use Build Environment - Details - PATH):
      /usr/bin:/bin:/usr/sbin:/sbin

      I.e. it is clear that /usr/local/bin is missing. And if you add the /usr/local/bin path to PATH in these settings, then the configuration will be successful even without setting CMAKE_MAKE_PROGRAM.

      I think CMAKE_MAKE_PROGRAM looks like a crutch in this case, because Qt Creator should, in theory, correctly read the current value of the PATH variable.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-33016
        # Subject Branch Project Status CR V

        Activity

          People

            kandeler Christian Kandeler
            rumgot rumgot
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes