[quoted lines by Bruce Dawson on 2021/03/29 at 02:46 -0700]
>Autoninja itself will run fine with Python 2 (used by default on Linux)
That was before, but now, on modern systems, there either isn't /usr/bin/python at all or it symlinks to python3. The move is on for things to say what they want, e.g. explicitly say python2 or python3. Perhaps you could change all your python references to python2. That would've helped and, except maybe for very old systems, shouldn't break anything.
>We are working on transitioning to Python 3 but this is a slow process.
No doubt. :-(
>The steps that require Python 2 are tagged as such so that
>ninja will properly run them under Python 2.
I guess not all of them yet. My /usr/bin/ has all three, i.e. python, python2, and python3. It was only when changing the python symlink to point to python2 (instead of python3) that things started to work. Now, of course, who knows what else on the system I've broken.
>1) What Chromium hash are you synced to? You may be synced to the tree at a
>point where we are in the middle of an experimental change of Python
>versions. Syncing to latest may fix things.
I'm new at this so I'm not sure how to get you the answer or how to sync to something else. Is it just running gclient sync? If so, I did that about a week ago.
>2) What was the full error message when you ran autoninja using python3?
It was: Could not run pkg-config.
As I now know, this message is misleading. What it really was looking for is pkg-config with a cross-build prefix even though it's a native build, i.e. it was looking for x86_64-pc-gnu-linux-pkg-config. It turns out that this actually does exist on Debian but not on Fedora. I personally think it's a Python 3 bug.
>3) How are you changing what version of python is invoked? Chromium's build
>expects (I think) that python refers to python2, and that python3 refers to
>python3, so having python refer to python3 is likely to cause issues (I
>think).
Yes, I finally changed the symlink and all became well. As sugested above, perhaps there are more things that still need to be chagned from python to python2.
Well, all became almost well. There's a required package - python2-setuptools - that isn't listed in the Fedora section of the document. The error of course didn't say that. It was complaining that pkg_resources wasn't defined.
>It's all a bit messy due to the complexity of the situation, but we are
>making progress.
Thanks for answering and explaining.