NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.07k stars 14.05k forks source link

`python39Packages.apipkg` build failure on x86_64-linux as of `e3f7ddd4` #236949

Open samuela opened 1 year ago

samuela commented 1 year ago

Issue description

Build of python39Packages.apipkg failed on x86_64-linux as of e3f7ddd4554c6b1a1d9b72a6c74e15d5027f8a91. This is currently breaking python39Packages.tensorflow-datasets.

error: builder for '/nix/store/9yj5r3cj6knyp8grpk27wjsk962p7070-python3.9-apipkg-3.0.1.drv' failed with exit code 1;
       last 10 log lines:
       > /nix/store/33izrpqni4a0b9zf4nlcg5hwy29xk7sm-python3.9-apipkg-3.0.1/lib/python3.9/site-packages/apipkg/_importing.py:33: ModuleNotFoundError
       > ----------------------------- Captured stdout call -----------------------------
       > {'__doc__': ('_xyz.testmodule', '__doc__'), 'mytest0': ('_xyz.testmodule', 'mytest0'), 'mytest1': ('_xyz.testmodule', 'mytest1'), 'MyTest': ('_xyz.testmodule', 'MyTest')}
       > =========================== short test summary info ============================
       > FAILED test_apipkg.py::TestRealModule::test_realmodule - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule_from - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule_dict_import - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule___doc__ - ModuleNotFoundError: No module named '_xyz'
       > ========================= 4 failed, 40 passed in 1.47s =========================
       > /nix/store/74l4x6m97bvry7ccxv51h952ayvg2j46-stdenv-linux/setup: line 1596: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/9yj5r3cj6knyp8grpk27wjsk962p7070-python3.9-apipkg-3.0.1.drv'.
error: 1 dependencies of derivation '/nix/store/mx71xfwm0wk9hijvx59xp2l6a72a3waz-python3.9-execnet-1.9.0.drv' failed to build
building '/nix/store/w5r8cs354sra6f81lwx8h2s7mapnxvqy-python3.9-astor-0.8.1.drv'...
error: 1 dependencies of derivation '/nix/store/iy5llzwm5jc62dj22yv5z1wz64ww2z4b-python3.9-pytest-xdist-3.2.1.drv' failed to build
building '/nix/store/i7mgrrs0x1h4lh2v0fqk76n2109730k3-python3.9-python-mimeparse-1.6.0.drv'...
error: 1 dependencies of derivation '/nix/store/pyzn9xf86ck9bv9zplbzf1gkk688qii1-python3.9-tensorflow-datasets-4.8.2.drv' failed to build

full build log

python39Packages.tensorflow-datasets maintainers cc: @ndl python39Packages.apipkg maintainers cc: Other cc: n/a

Steps to reproduce

  1. Checkout nixpkgs at commit e3f7ddd4554c6b1a1d9b72a6c74e15d5027f8a91
  2. Run nix-build -A python39Packages.apipkg

Technical details

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.0-1038-azure, Ubuntu, 22.04.2 LTS (Jammy Jellyfish), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.16.1`
 - nixpkgs: `/nix/store/9yxg9i76gr4qcil43v7px6ss1yy74ivi-source`

Contents of ~/.config/nixpkgs/config.nix:

{ allowUnfree = true; cudaSupport = true; cudaCapabilities = ["8.0"]; }

Misc.

This issue was automatically generated by nixpkgs-upkeep.

mausch commented 1 year ago

This is breaking https://github.com/NixOS/nixpkgs/pull/237197 too.

A-dead-pixel commented 1 year ago

A git bisect shows that 02c6a5257f254f3c61a2f70d7785a7a6f26e9f1c broke this package.

Another python package that fails to build because of apipkg is requests.

samuela commented 1 year ago

@mweinelt can you please investigate and fix or revert https://github.com/NixOS/nixpkgs/commit/02c6a5257f254f3c61a2f70d7785a7a6f26e9f1c?

mweinelt commented 1 year ago

python39.pkgs.apipkg and requests both build fine for me on x86_64-linux on b80586e5cfa435e451c368aca4f9fbbaa4f2eaa9.

A-dead-pixel commented 1 year ago

Okay, this may have something to do with non-nixos setups, as it does work for me on a nixos machine when I turn off the non-nixos builder. Alternatively, I may have something messed up in the system, as I run nix-daemon with just doas nix-daemon. As for my nix.conf, the build still fails even with just these 2 lines:

build-users-group = nixbld
experimental-features = nix-command flakes
samuela commented 1 year ago

Ah, sorry for the false alarm @mweinelt... perhaps the test suite is flaky?

mweinelt commented 1 year ago

That one also builds.

/nix/store/ms8i9w0vqbly4zcan8xgdnmrfw7wfiqr-python3.9-tensorflow-datasets-4.8.2

ModuleNotFoundError: No module named '_xyz'

Not sure what it would be trying to import here. I don't understand the code from a quick glance.

MTRNord commented 1 year ago

Hi I am getting this on my arm server now as well and it makes it impossible to install or upgrade anything as the nixos switch is failing entirely now.

Edit the error output I get is:

error: builder for '/nix/store/rk0fq285vzx1mspdjcwnz65g9wrghbs9-python3.9-apipkg-3.0.1.drv' failed with exit code 1;
       last 10 log lines:
       > /nix/store/wz96q4vqafd47nf6y312vfcg6jiywr8x-python3.9-apipkg-3.0.1/lib/python3.9/site-packages/apipkg/_importing.py:33: ModuleNotFoundError
       > ----------------------------- Captured stdout call -----------------------------
       > {'__doc__': ('_xyz.testmodule', '__doc__'), 'mytest0': ('_xyz.testmodule', 'mytest0'), 'mytest1': ('_xyz.testmodule', 'mytest1'), 'MyTest': ('_xyz.testmodule', 'MyTest')}
       > =========================== short test summary info ============================
       > FAILED test_apipkg.py::TestRealModule::test_realmodule - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule_from - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule_dict_import - ModuleNotFoundError: No module named '_xyz'
       > FAILED test_apipkg.py::TestRealModule::test_realmodule___doc__ - ModuleNotFoundError: No module named '_xyz'
       > ========================= 4 failed, 40 passed in 0.86s =========================
       > /nix/store/mw4zb7nz2asmw883xr70zbb3a38agfjg-stdenv-linux/setup: line 1604: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/rk0fq285vzx1mspdjcwnz65g9wrghbs9-python3.9-apipkg-3.0.1.drv'.
error: 1 dependencies of derivation '/nix/store/n9yc922yr64farzfwxjjrqhrnp7b99zk-python3.9-execnet-1.9.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xbhh8f7322v59ajyy94c4ns8zs4y8543-python3.9-pytest-xdist-3.2.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k36x2ga3kvazyy34d7vpvgz9xpxj7hfc-python3.9-build-0.10.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0bmz2p4q51z72gkzxxl7p4868shq34dp-python3.9-hypothesis-6.68.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ybdzzw2vk2ynyq0cw42rlp47gdp697j2-python3.9-hypothesis-6.68.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9d1b8bwyr79w3lj3f6flpkhyp53qprhm-python3.9-pytest-randomly-3.12.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4x513d9qdn7kj6ir7ik5fs4a4py1hprv-python3.9-requests-2.29.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/lv2vmiwdbih7sgy03sm1habsr0qmi0wl-patroni-2.1.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/i6z1vmn5pppkzv9ckzjknawp1jqy4k4f-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/q9d0lziisgy7bm53jr8qxv3zqckz8vlh-unit-script-patroni-start.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4fw5vplwap6fzxwk7bz3sq9nrv30sk09-nixos-system-worker-1-23.05.20230924.261abe8.drv' failed to build
MTRNord commented 1 year ago

My guess is that https://github.com/NixOS/nixpkgs/commit/9ffff4d5403e0e5ce46862578d9872763aa86e72 pulled this package into my tree. I will see if downgrading helps me.