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

Failing to build (python3.12-python-kadmin-0.2.0 failing) #41

Open
Lgmrszd opened this issue Jan 2, 2025 · 3 comments
Open

Failing to build (python3.12-python-kadmin-0.2.0 failing) #41

Lgmrszd opened this issue Jan 2, 2025 · 3 comments

Comments

@Lgmrszd
Copy link

Lgmrszd commented Jan 2, 2025

At first I thought this has to do with me overriding nixpkgs input, but without override it still fails.

Using nixpkgs-unstable

Fails at the build stage, so this is not duplicate of #37

Log:

Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/w4bick3132qm56vry2znzsmwpxsk1mja-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/test/valgrind-python.supp
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Removing path dependencies
Finished removing path dependencies
Removing git dependencies
Finished removing git dependencies
Removing wheel-url dependencies
Finished removing wheel-url dependencies
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing pipBuildPhase
Creating a wheel...
�[33mWARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.�[0m�[33m
�[0mProcessing /build/source
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml) ... �[?25l�[?25hdone
Building wheels for collected packages: python-kadmin
  Running command Building wheel for python-kadmin (pyproject.toml)
  running build
  running build_py
  creating /build/source/build/lib.linux-x86_64-cpython-312/python_kadmin
  copying python_kadmin/__init__.py -> /build/source/build/lib.linux-x86_64-cpython-312/python_kadmin
  running build_ext
  building 'kadmin' extension
  creating /build/source/build/temp.linux-x86_64-cpython-312/src
  gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/6cr0spsvymmrp1hj5n0kbaxw55w1lqyp-libxcrypt-4.4.36/include -fPIC -I/usr/include/ -I/usr/include/et/ -I/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/include/python3.12 -c src/PyKAdminCommon.c -o /build/source/build/temp.linux-x86_64-cpython-312/src/PyKAdminCommon.o
  gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/6cr0spsvymmrp1hj5n0kbaxw55w1lqyp-libxcrypt-4.4.36/include -fPIC -I/usr/include/ -I/usr/include/et/ -I/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/include/python3.12 -c src/PyKAdminErrors.c -o /build/source/build/temp.linux-x86_64-cpython-312/src/PyKAdminErrors.o
  gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/6cr0spsvymmrp1hj5n0kbaxw55w1lqyp-libxcrypt-4.4.36/include -fPIC -I/usr/include/ -I/usr/include/et/ -I/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/include/python3.12 -c src/PyKAdminIterator.c -o /build/source/build/temp.linux-x86_64-cpython-312/src/PyKAdminIterator.o
  src/PyKAdminIterator.c:17:12: warning: ‘PyKAdminIterator_init’ defined but not used [-Wunused-function]
     17 | static int PyKAdminIterator_init(PyKAdminIterator *self, PyObject *args, PyObject *kwds) {
        |            ^~~~~~~~~~~~~~~~~~~~~
  gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/6cr0spsvymmrp1hj5n0kbaxw55w1lqyp-libxcrypt-4.4.36/include -fPIC -I/usr/include/ -I/usr/include/et/ -I/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/include/python3.12 -c src/PyKAdminObject.c -o /build/source/build/temp.linux-x86_64-cpython-312/src/PyKAdminObject.o
  src/PyKAdminObject.c: In function ‘PyKAdminObject_new’:
  src/PyKAdminObject.c:43:21: warning: variable ‘code’ set but not used [-Wunused-but-set-variable]
     43 |     krb5_error_code code = 0;
        |                     ^~~~
  gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/6cr0spsvymmrp1hj5n0kbaxw55w1lqyp-libxcrypt-4.4.36/include -fPIC -I/usr/include/ -I/usr/include/et/ -I/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/include/python3.12 -c src/PyKAdminPolicyObject.c -o /build/source/build/temp.linux-x86_64-cpython-312/src/PyKAdminPolicyObject.o
  src/PyKAdminPolicyObject.c:123:5: error: initialization of ‘long int’ from ‘int (*)(PyKAdminPolicyObject *, FILE *, int)’ makes integer from pointer without a cast [-Wint-conversion]
    123 |     KAdminPolicyObject_print,                         /*tp_print*/
        |     ^~~~~~~~~~~~~~~~~~~~~~~~
  src/PyKAdminPolicyObject.c:123:5: note: (near initialization for ‘PyKAdminPolicyObject_Type.tp_vectorcall_offset’)
  error: command '/nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/bin/gcc' failed with exit code 1
  Traceback (most recent call last):
    File "/nix/store/0b83d75slv47hx4q9wgzzm5wi74adal3-python3.12-pip-24.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/nix/store/0b83d75slv47hx4q9wgzzm5wi74adal3-python3.12-pip-24.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/nix/store/0b83d75slv47hx4q9wgzzm5wi74adal3-python3.12-pip-24.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/nix/store/kq8s0wxaq5l930l8l7m9glb50hg6l3mm-python3.12-poetry-core-1.9.1/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
             ^^^^^^^^^^^^^^^^^^^^^
    File "/nix/store/kq8s0wxaq5l930l8l7m9glb50hg6l3mm-python3.12-poetry-core-1.9.1/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "/nix/store/kq8s0wxaq5l930l8l7m9glb50hg6l3mm-python3.12-poetry-core-1.9.1/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 121, in build
      self._build(zip_file)
    File "/nix/store/kq8s0wxaq5l930l8l7m9glb50hg6l3mm-python3.12-poetry-core-1.9.1/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 182, in _build
      self._run_build_command(setup)
    File "/nix/store/kq8s0wxaq5l930l8l7m9glb50hg6l3mm-python3.12-poetry-core-1.9.1/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 248, in _run_build_command
      subprocess.check_call([
    File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12', '/build/source/setup.py', 'build', '-b', '/build/source/build', '--build-purelib', '/build/source/build/lib', '--build-platlib', '/build/source/build/lib.linux-x86_64-cpython-312']' returned non-zero exit status 1.
  �[1;31merror�[0m: �[1msubprocess-exited-with-error�[0m
  
  �[31m�[0m �[32mBuilding wheel for python-kadmin �[0m�[1;32m(�[0m�[32mpyproject.toml�[0m�[1;32m)�[0m did not run successfully.
  �[31m│�[0m exit code: �[1;36m1�[0m
  �[31m╰─>�[0m See above for output.
  
  �[1;35mnote�[0m: This error originates from a subprocess, and is likely not a problem with pip.
  �[1;35mfull command�[0m: �[34m/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12 /nix/store/0b83d75slv47hx4q9wgzzm5wi74adal3-python3.12-pip-24.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /build/tmp2w3quc73�[0m
  �[1;35mcwd�[0m: /build/source
  Building wheel for python-kadmin (pyproject.toml) ... �[?25l�[?25herror
�[31m  ERROR: Failed building wheel for python-kadmin�[0m�[31m
�[0mFailed to build python-kadmin
�[31mERROR: Failed to build one or more wheels�[0m�[31m
�[0m
@kilimnik
Copy link

kilimnik commented Jan 3, 2025

Not a great solution, but I just set the error to be ignored kilimnik@e8da59b.
There are other packages which recently had the same issue https://discourse.nixos.org/t/error-builder-for-jack1-0-125-0-drv-failed-with-exit-code-2/58186.

@Lgmrszd
Copy link
Author

Lgmrszd commented Jan 4, 2025

Thanks for the workaround. Have you attempted to add that flag using authentikComponents? I don't want to keep authentik fork around so I tried to do that but to no avail.

@WilliButz
Copy link
Member

WilliButz commented Jan 4, 2025

Should no longer be relevant after the latest release switched to kadmin-rs, but for xmlsec a fix is now included here 5db6f77.

(I edited the top message to use ``` instead of <code> for the log output)

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

3 participants