Discussion:
[Qt-creator] Where to install Ninja on macOS Sierra (10.12)
Mike Jackson
2017-04-06 16:42:53 UTC
Permalink
What is the recommended location to install ninja on macOS Sierra so
that QtCreator can find it? We tried the usual /usr/local/bin but
QtCreator does not seem to find it there.

Note: putting it in /usr/bin or /bin is NOT a correct answer since SIP
is on by default and will not allow it.

Could QtCreator ship with a Ninja in its "Resources" directory or is
there some preference setting (like the CMake path) that we are missing?

thanks
--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: ***@bluequartz.net
Tobias Hunger
2017-04-07 11:06:03 UTC
Permalink
Hi Mike,

I am not much of an Apple user, so I hope I do not make a fool out of myself by
trying to answer:


Creator should not default to ninja unless it sees a "ninja" binary in PATH.
What is the recommended location to install ninja on macOS Sierra so 
that QtCreator can find it? We tried the usual /usr/local/bin but 
QtCreator does not seem to find it there.
Note: putting it in /usr/bin or /bin is NOT a correct answer since SIP 
is on by default and will not allow it.
Add the directory with Ninja to PATH? Does that work?

Creator will call "cmake --build .". CMake needs to find ninja somehow. From
what I see in the manual CMake should find anything in PATH, but I got a report
that this is apparently not the case on Macs.
Could QtCreator ship with a Ninja in its "Resources" directory or is 
there some preference setting (like the CMake path) that we are missing?
No, there is no special setting.

I would love to ship more development tools with Qt Creator (e.g. cmake, ninja,
git) and have them optionally installed along with the IDE. But this is not my
call to make, no idea whether or not we will do so.


Best Regards,
Tobias

--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Konstantin Tokarev
2017-04-07 11:11:59 UTC
Permalink
Post by Tobias Hunger
Hi Mike,
I am not much of an Apple user, so I hope I do not make a fool out of myself by
Creator should not default to ninja unless it sees a "ninja" binary in PATH.
AFAIK question was about using ninja consciously, not as default option.

Mike: Change build command in project settings from "cmake --build ." to
/usr/local/bin/ninja or where do you have it
Post by Tobias Hunger
 What is the recommended location to install ninja on macOS Sierra so
 that QtCreator can find it? We tried the usual /usr/local/bin but
 QtCreator does not seem to find it there.
 Note: putting it in /usr/bin or /bin is NOT a correct answer since SIP
 is on by default and will not allow it.
Add the directory with Ninja to PATH? Does that work?
Creator will call "cmake --build .". CMake needs to find ninja somehow. From
what I see in the manual CMake should find anything in PATH, but I got a report
that this is apparently not the case on Macs.
 Could QtCreator ship with a Ninja in its "Resources" directory or is
 there some preference setting (like the CMake path) that we are missing?
No, there is no special setting.
I would love to ship more development tools with Qt Creator (e.g. cmake, ninja,
git) and have them optionally installed along with the IDE. But this is not my
call to make, no idea whether or not we will do so.
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Regards,
Konstantin
Mike Jackson
2017-04-07 12:08:23 UTC
Permalink
The issues with Macs is that anything extra set in your PATH env var is
NOT honored by GUI apps. There used to be a way to write some sort of
.plist file but with Sierra that seems to be gone. One of our guys
figured out that if you set the CMAKE_MAKE_PROGRAM variable BEFORE you
run CMake (so in the kit I guess) you can set there.

Since I am still running macOS 10.10 I can just make a symlink in
/usr/bin to a ninja installation somewhere else. With macOS 10.11 and
beyond the user would have to disable SIP (System Integrity Protection)
to write to anything in /usr/bin.

Thanks for the info.
--
Michael A. Jackson
BlueQuartz Software, LLC
Post by Konstantin Tokarev
Post by Tobias Hunger
Hi Mike,
I am not much of an Apple user, so I hope I do not make a fool out of myself by
Creator should not default to ninja unless it sees a "ninja" binary in PATH.
AFAIK question was about using ninja consciously, not as default option.
Mike: Change build command in project settings from "cmake --build ." to
/usr/local/bin/ninja or where do you have it
Post by Tobias Hunger
Post by Mike Jackson
What is the recommended location to install ninja on macOS Sierra so
that QtCreator can find it? We tried the usual /usr/local/bin but
QtCreator does not seem to find it there.
Note: putting it in /usr/bin or /bin is NOT a correct answer since SIP
is on by default and will not allow it.
Add the directory with Ninja to PATH? Does that work?
Creator will call "cmake --build .". CMake needs to find ninja somehow. From
what I see in the manual CMake should find anything in PATH, but I got a report
that this is apparently not the case on Macs.
Post by Mike Jackson
Could QtCreator ship with a Ninja in its "Resources" directory or is
there some preference setting (like the CMake path) that we are missing?
No, there is no special setting.
I would love to ship more development tools with Qt Creator (e.g. cmake, ninja,
git) and have them optionally installed along with the IDE. But this is not my
call to make, no idea whether or not we will do so.
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Loading...