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

Can't run cmake with qprocess on OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.11
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      OS X 10.14.3
    • Platform/s:
      macOS

      Description

      OS X 10.14.3

      I am developing C++ IDE based on QT called SaberPlus, but I have problem on OS X.
      Some applications does not run, and there is no output from them, for example - cmake:

       

      QString buildString = "cmake";
      
      process = new QProcess();
      process->setProcessChannelMode(QProcess::MergedChannels);
      
      QObject::connect(process, &QProcess::readyReadStandardOutput, this, &SPProjectBuilderService::readyReadStandardOutput);
      QObject::connect(process, &QProcess::stateChanged, this, &SPProjectBuilderService::stateChanged);
      
      auto projectPath = QString(project->projectDirectoryPath->c_str());
      
      qDebug() << "projectPath: " << projectPath;
      qDebug() << "buildString: " << buildString;
      
      process->setWorkingDirectory(projectPath);
      process->start(buildString);
      

      Trace:

       

       

      State changed:  QProcess::ProcessState(Starting)
      State changed:  QProcess::ProcessState(NotRunning)
      

      But everything works for "make":

       

      QString buildString = "make";
      
      process = new QProcess();
      process->setProcessChannelMode(QProcess::MergedChannels);
      
      QObject::connect(process, &QProcess::readyReadStandardOutput, this, &SPProjectBuilderService::readyReadStandardOutput);
      QObject::connect(process, &QProcess::stateChanged, this, &SPProjectBuilderService::stateChanged);
          process->setWorkingDirectory(QString(project->projectDirectoryPath->c_str()));
      process->start(buildString);
      

      Trace:

       

      State changed:  QProcess::ProcessState(Starting)
      State changed:  QProcess::ProcessState(Running)
      processOutput:  "make: *** No targets specified and no makefile found.  Stop.\n" 
      

      Cmake and make works both on Ubuntu with QT, but I can't run it on OS X for some reason, I guess there is some bug in OS X implementation.
      Related source code:

      https://gitlab.com/demensdeum/saberplus/blob/master/Saber-Plus/spprojectbuilderservice.cpp

        Attachments

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

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              demensdeum Ilya Prokhorov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes