Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ninja --version returns a nonzero error code in a shell on Linux. #2212

Closed
WarrenWeckesser opened this issue Nov 5, 2022 · 4 comments
Closed

Comments

@WarrenWeckesser
Copy link

WarrenWeckesser commented Nov 5, 2022

I just upgraded to 1.11.1, and I get a nonzero return code when I run ninja --version:

$ ninja --version
1.11.1.git.kitware.jobserver-1
$ echo $?
245

This is on a Linux system.

With 1.10.2.4, the return code is 0, as expected:

$ ninja --version
1.10.2.git.kitware.jobserver-1
$ echo $?
0

This breaks meson, which expects the return code of ninja --version to be 0. And the failure of meson breaks the builds any package that depend on meson. I noticed this because the CI builds of SciPy are currently failing.

@eli-schwartz
Copy link

eli-schwartz commented Nov 6, 2022

Note that the ninja project itself doesn't actually release those PyPI binaries, it's done totally unofficially by a third-party project that also adds various patches.

On a fresh clone and build of ninja:

$ ./ninja --version
1.12.0.git
$ echo $?
0

So the bug was most likely introduced downstream... see scikit-build/ninja-python-distributions#157

@WarrenWeckesser
Copy link
Author

I'll close this, as it is a duplicate of #2211.

@WarrenWeckesser WarrenWeckesser closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
@henryiii
Copy link

henryiii commented Nov 6, 2022

Can you retry? I uploaded a manylinux2010 wheel for 64-bit Intel.

@kairin
Copy link

kairin commented Aug 18, 2024

hi, it is giving a non 0 code even after uninstall and reinstall

'
C:\Users\kairi>pip --version
pip 24.2 from C:\Program Files\Python312\Lib\site-packages\pip (python 3.12)

C:\Users\kairi>pip install packaging
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting packaging
Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Downloading packaging-24.1-py3-none-any.whl (53 kB)
Installing collected packages: packaging
Successfully installed packaging-24.1

C:\Users\kairi>pip install ninja
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting ninja
Downloading ninja-1.11.1.1-py2.py3-none-win_amd64.whl.metadata (5.4 kB)
Downloading ninja-1.11.1.1-py2.py3-none-win_amd64.whl (312 kB)
Installing collected packages: ninja
Successfully installed ninja-1.11.1.1

C:\Users\kairi>ninja --version
1.11.1.git.kitware.jobserver-1

C:\Users\kairi>echo $?
$?

C:\Users\kairi>pip uninstall -y ninja && pip install ninja
Found existing installation: ninja 1.11.1.1
Uninstalling ninja-1.11.1.1:
Successfully uninstalled ninja-1.11.1.1
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting ninja
Downloading ninja-1.11.1.1-py2.py3-none-win_amd64.whl.metadata (5.4 kB)
Downloading ninja-1.11.1.1-py2.py3-none-win_amd64.whl (312 kB)
Installing collected packages: ninja
Successfully installed ninja-1.11.1.1

C:\Users\kairi>ninja --version
1.11.1.git.kitware.jobserver-1

C:\Users\kairi>echo $?
$?

C:\Users\kairi>
'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants