Open jab opened 5 months ago
hi, I cant reproduce the issue on nixos
git checkout 2284e61bd9df081fb2d4cc162b1d6b3d9752b02d
nix-build -A pypy310
./result/bin/pypy3 -m sysconfig
Platform: "linux-x86_64"
Python version: "3.10"
Current installation scheme: "posix_prefix"
Paths:
data = "/home/kirillvr/nixpkgs/result/pypy3.10-c"
include = "/home/kirillvr/nixpkgs/result/pypy3.10-c/include/pypy3.10"
platinclude = "/home/kirillvr/nixpkgs/result/pypy3.10-c/include/pypy3.10"
platlib = "/home/kirillvr/nixpkgs/result/pypy3.10-c/lib/pypy3.10/site-packages"
platstdlib = "/home/kirillvr/nixpkgs/result/pypy3.10-c/lib/pypy3.10"
purelib = "/home/kirillvr/nixpkgs/result/pypy3.10-c/lib/pypy3.10/site-packages"
scripts = "/home/kirillvr/nixpkgs/result/pypy3.10-c/bin"
stdlib = "/home/kirillvr/nixpkgs/result/pypy3.10-c/lib/pypy3.10"
Thanks for testing. Can you share your nix-shell -p nix-info --run "nix-info -m"
output, and is there any chance you're getting different results due to a difference there?
nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 6.6.11, NixOS, 24.05 (Uakari), 24.05.20240113.7e6aa7e`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- channels(kirillvr): `""`
- channels(root): `"nixos"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
It's now
nix-repl> pypy3
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'pypy3.9-7.3.12'
whose name attribute is located at /nix/store/pw3hllgllk54qir2zvahrdb0a5rrmih4-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'C_INCLUDE_PATH' of derivation 'pypy3.9-7.3.12'
at /nix/store/pw3hllgllk54qir2zvahrdb0a5rrmih4-source/pkgs/development/interpreters/python/pypy/default.nix:74:3:
73|
74| C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" buildInputs;
| ^
75| LIBRARY_PATH = lib.makeLibraryPath buildInputs;
(stack trace truncated; use '--show-trace' to show the full trace)
error: pycparser-2.22 not supported for interpreter pypy
«derivation
on rev ac34158a823c7596e0106c806d0b7df47885fa73.
Seeing a similar error as @undefined-moe on mac os.
❯ nix-shell -p pypy
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'shell'
whose name attribute is located at /nix/store/y4p1bzzriaprvvy6fd9nz3kifjdiblq8-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'buildInputs' of derivation 'shell'
at /nix/store/y4p1bzzriaprvvy6fd9nz3kifjdiblq8-source/pkgs/stdenv/generic/make-derivation.nix:378:7:
377| depsHostHost = elemAt (elemAt dependencies 1) 0;
378| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
379| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full trace)
error: pycparser-2.22 not supported for interpreter pypy
❯ nix-shell -p nix-info --run "nix-info -m"
these 3 paths will be fetched (1.03 MiB download, 8.17 MiB unpacked):
/nix/store/598vvx2b3lk4p6gh90329mv0fh0a4inm-DarwinTools-1
/nix/store/x2hwnm42a41wgf8zk53aay78vrklrsxq-bash-interactive-5.2p26
/nix/store/1ysw4h9l4gclh46sk1jmvsh8jxjnwmk9-nix-info
copying path '/nix/store/x2hwnm42a41wgf8zk53aay78vrklrsxq-bash-interactive-5.2p26' from 'https://cache.nixos.org'...
copying path '/nix/store/598vvx2b3lk4p6gh90329mv0fh0a4inm-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/1ysw4h9l4gclh46sk1jmvsh8jxjnwmk9-nix-info' from 'https://cache.nixos.org'...
- system: `"aarch64-darwin"`
- host os: `Darwin 23.4.0, macOS 14.4.1`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.18.1`
- nixpkgs: `/nix/store/y4p1bzzriaprvvy6fd9nz3kifjdiblq8-source`
Issue description
The
x86_64-linux
pypy installations provided by thepypy3.10
andpypy3.9
derivations are broken such thatpython -m sysconfig
(or equivalentlypypy3 -m sysconfig
) fails with:This causes lots of other functionality in the standard library to fail, e.g.
python -m venv foo
,python -m ensurepip
, etc.(Click to toggle example trace from a GitHub Actions 'ubuntu-latest' runner)
``` (nix:nix-shell-env) runner@fv-az1498-25:~$ pypy3.10 -VV Python 3.10.12 (af44d0b8114cb82c40a07bb9ee9c1ca8a1b3688c, Jan 03 2024, 06:33:26) [PyPy 7.3.12 with GCC 13.2.0] (nix:nix-shell-env) runner@fv-az1498-25:~$ pypy3.10 -m sysconfig Platform: "linux-x86_64" Python version: "3.10" Current installation scheme: "posix_prefix" Traceback (most recent call last): File "/nix/store/m9iaqdg9qhj2qja69g0ni103ds6dax10-pypy3.10-7.3.12/pypy3.10-c/lib-python/3/runpy.py", line 199, in _run_module_as_main return _run_code(code, main_globals, None, File "/nix/store/m9iaqdg9qhj2qja69g0ni103ds6dax10-pypy3.10-7.3.12/pypy3.10-c/lib-python/3/runpy.py", line 86, in _run_code exec(code, run_globals) File "/nix/store/m9iaqdg9qhj2qja69g0ni103ds6dax10-pypy3.10-7.3.12/pypy3.10-c/lib-python/3/sysconfig.py", line 832, inSteps to reproduce
Locally I can only test on 'aarch64-darwin' and this does not occur there, but I consistently reproduce this in GitHub Actions' 'ubuntu-latest' runners (which are x86_64) with Nix installed via https://github.com/DeterminateSystems/nix-installer-action, by running the following in an SSH session:
nix-shell -p pypy3.10 -p pypy3.9
pypy3.10 -m sysconfig
pypy3.9 -m sysconfig
(Here is an associated `flake.lock` as well)
```json { "nodes": { "nixpkgs": { "locked": { "lastModified": 1705175803, "narHash": "sha256-u+WX/r8j+jKef3IAVNWW8fznj7pn9kkaMtzjten2Qec=", "owner": "NixOS", "repo": "nixpkgs", "rev": "2284e61bd9df081fb2d4cc162b1d6b3d9752b02d", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { "nixpkgs": "nixpkgs" } } }, "root": "root", "version": 7 } ```Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.