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

Build failure: python311Packages.keyutils #263482

Closed
vancluever opened this issue Oct 26, 2023 · 3 comments · Fixed by #263500
Closed

Build failure: python311Packages.keyutils #263482

vancluever opened this issue Oct 26, 2023 · 3 comments · Fixed by #263500
Labels
0.kind: build failure A package fails to build

Comments

@vancluever
Copy link
Contributor

Steps To Reproduce

Steps to reproduce the behavior:

  1. build 'github:NixOS/nixpkgs/8efd5d1e283604f75a808a20e6cde0ef313d07d4'#python311Packages.keyutils, or anything depending on it (my failure specifically was triggered by udiskie).

Build log

❯ nix build 'github:NixOS/nixpkgs/8efd5d1e283604f75a808a20e6cde0ef313d07d4'#python311Packages.keyutils
error: builder for '/nix/store/lhcwvc1d9ihdnxn455wb5q9mvhg5c8j1-python3.11-keyutils-0.6.drv' failed with exit code 1;
       last 10 log lines:
       > building 'keyutils._keyutils' extension
       > creating build/temp.linux-aarch64-cpython-311
       > creating build/temp.linux-aarch64-cpython-311/keyutils
       > gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/45307rq4fz0cy70f1s07wpy82rd8shy3-libxcrypt-4.4.36/include -fPIC -I/nix/store/nxxghhhia9x1skpqfak4z407yy0mbnnd-python3-3.11.5/include/python3.11 -c keyutils/_keyutils.c -o build/temp.linux-aarch64-cpython-311/keyutils/_keyutils.o
       > keyutils/_keyutils.c:196:12: fatal error: longintrepr.h: No such file or directory
       >   196 |   #include "longintrepr.h"
       >       |            ^~~~~~~~~~~~~~~
       > compilation terminated.
       > error: command '/nix/store/pnq8ll8ayvlkw6p0xh9fmqn94v4lfi78-gcc-wrapper-12.3.0/bin/gcc' failed with exit code 1
       > /nix/store/j4w7yj8c4z7zg5y6bhhypnl456dwmrc5-stdenv-linux/setup: line 1596: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/lhcwvc1d9ihdnxn455wb5q9mvhg5c8j1-python3.11-keyutils-0.6.drv'.

Looks like the exact same issue that is being reported in Hydra, on the same hash: https://hydra.nixos.org/build/239103890/nixlog/1

Additional context

Seems similar to #239816. https://github.com/sassoftware/python-keyutils/blob/5e6d2af113f6f6d2f0278ba700be23c79a08ef4b/keyutils/_keyutils.c#L1 reports that it was generated with cython 0.29.3.

Unfortunately https://github.com/sassoftware/python-keyutils also seems to be archived and a cursory check does not seem to show a fork floating around.

Notify maintainers

@primeos

Metadata

nix run nixpkgs#nix-info -- -m
 - system: `"aarch64-linux"`
 - host os: `Linux 6.1.57, NixOS, 23.11 (Tapir), 23.11.20231013.a9f8820`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - nixpkgs: `/nix/store/sv86xgs5nm17i5b0kv14151f3yhv57cx-source`
@vancluever vancluever added the 0.kind: build failure A package fails to build label Oct 26, 2023
@vancluever
Copy link
Contributor Author

Related: Failing Hydra job for udiskie

@vancluever
Copy link
Contributor Author

vancluever commented Oct 26, 2023

Update: I was able to rebuild udiskie successfully by changing its python3 build input (and all respective downstream references) to python310, so I'm guessing this might have only surfaced now with the recent cut to python 3.11 (maybe #251878?)

@vancluever
Copy link
Contributor Author

vancluever commented Oct 26, 2023

Another comment 😆 looks like Arch re-generates the C code during the packaging process. I'm guessing we could do the same here.

vancluever added a commit to vancluever/nixpkgs that referenced this issue Oct 26, 2023
This fixes the build for keyutils on Python 3.11 and higher.

It appears this package is affected by changes that were made to CPython
that were causing code generated by certain earlier versions of Cython
to fail.

This update simply re-generates the relevant code with the up-to-date
Cython 0.29.x series during the pre-build phase, allowing the build to
succeed.

Fixes NixOS#263482.
Fixes NixOS#263506.

Co-authored-by: Robert Schütz <[email protected]>
Co-authored-by: Martin Weinelt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant