Should gn write a ninja_required_version= line? |
||||
Issue descriptionIn a recent chromium-dev thread ([chromium-dev] Ninja Error while building ChromePublic APK on ToT !) someone had an older ninja binary on their path in front of the new one in depot_tools. If gn wrote a ninja_required_version line (https://ninja-build.org/manual.html#ref_versioning) the error would've maybe been a bit less cryptic. Should we add this? If not, please WontFix. Else, I'll try to get around to adding it eventually. (Or someone else can.)
,
Jun 23 2017
,
Jun 23 2017
Do we make this a special variable in GN or a function (like cmake_minimum_required in CMake)?
,
Jun 23 2017
cmake_minimium_version controls the min cmake version, not the min ninja version. gn should just hardcode the ninja version it requires (1.5 or when pools were added).
,
Jun 23 2017
The simplest (and bad) way seems to hard code it (like Meson, but the fact it does is irrelevant). https://chromium-review.googlesource.com/546475
,
Jun 23 2017
The reference to cmake_minimu_version was just about the syntax. I know it controls the version of CMake :)
,
Jun 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/188307cee04070a6164db1c31aa06de7d0290ae6 commit 188307cee04070a6164db1c31aa06de7d0290ae6 Author: Thiago Farina <tfarina@chromium.org> Date: Mon Jun 26 23:49:23 2017 tools/gn: write out the required version of ninja Write to the build.ninja file the required version of Ninja to avoid problems like the one that happended in https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiFsmWqyHnriH3eFB%2BmQ_CXs1qSTKSaP4fv3GQYf3Zr63Q%40mail.gmail.com?utm_medium=email&utm_source=footer BUG= 732518 Change-Id: Ief55a93798de15fa5fae0b74db6ab7c4c844e5aa Reviewed-on: https://chromium-review.googlesource.com/546475 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Thiago Farina <tfarina@chromium.org> Cr-Commit-Position: refs/heads/master@{#482469} [modify] https://crrev.com/188307cee04070a6164db1c31aa06de7d0290ae6/tools/gn/ninja_build_writer.cc
,
Jun 26 2017
Thanks for the fix. However, the person on the thread was using 1.3.4, so requiring 1.1.0 probably isn't enough; gn must depend on something newer.
,
Jun 27 2017
I was thinking the same thing and waiting for you to comment on the review, but you didn't.
,
Jun 27 2017
,
Jun 27 2017
Pools were added at 1.1.0. 1.5 is fine by you Nico? Otherwise let me know which version you want to be picked.
,
Jun 27 2017
I was neither cc'd nor listed as reviewer on the review, so I wonder how you think I should've commented on it :-) The mail mentions "ninja: error: toolchain.ninja:1292: unknown pool name". Looking at around that line in my local toolchain.ninja, it has pool = console Console pools were added in 1.5.1 (https://groups.google.com/forum/#!topic/ninja-build/3DLt4mC4e1Y/discussion), so at least that. Other options: Pools didn't work quite right before 1.6.0 (https://github.com/ninja-build/ninja/issues/959), so maybe 1.6.0. And since using anything older than what's in depot_tools is incorrect, using 1.7.2 would be an option too.
,
Jun 27 2017
Because I posted a link to the review at comment #5, but let's move on :) I will copy it there this time, so you can comment/review if you want. The mail mentions "ninja: error: toolchain.ninja:1292: unknown pool name". My preference is for 1.7.2, for the reasons you outlined here, so I picked that. https://chromium-review.googlesource.com/550077
,
Jun 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a581dfb4b77eda8fb98b6434a325dec7ff00417 commit 4a581dfb4b77eda8fb98b6434a325dec7ff00417 Author: Thiago Farina <tfarina@chromium.org> Date: Fri Jun 30 02:45:41 2017 tools/gn: require a newer version of ninja Requiring 1.1.0 is not enough because console pools are needed, and it was added only in 1.5.1. But pools did not work quite right until 1.6.0, but since using anything other than what is in depot_tools currently is not correct, and the current version of ninja binary there is 1.7.2, picked that one now. BUG= 732518 Change-Id: I7b4af6f16166145fb88255d2ad6018a07d0569c8 Reviewed-on: https://chromium-review.googlesource.com/550077 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Thiago Farina <tfarina@chromium.org> Cr-Commit-Position: refs/heads/master@{#483600} [modify] https://crrev.com/4a581dfb4b77eda8fb98b6434a325dec7ff00417/tools/gn/ninja_build_writer.cc
,
Jun 30 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dpranke@chromium.org
, Jun 12 2017Status: Available (was: Untriaged)