pythongssapi / pythongssapi/python-gssapi

cannot build on NixOS due to undefined C functions in `ext_s4u`

Open
#373 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
116
Forks
55
Avg merge
1d 24m
Merged PRs (30d)
2

Description

On NixOS installing gssapi fails with some GCC errors "implicit declaration of function ‘gss_acquire_cred_impersonate_name’" and "implicit declaration of function ‘gss_add_cred_impersonate_name’" when compiling ext_s4u.c:

      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPy_LIMITED_API=51052544 -Igssapi/raw -I/home/lp/.cache/pypoetry/virtualenvs/dipex-GkntI14x-py3.13/include -I/nix/store/qwb5ygz9k8gs5ql9bpxbrsrv12r1icgm-python3-3.13.12/include/python3.13 -c gssapi/raw/ext_s4u.c -o build/temp.linux-x86_64-cpython-313/gssapi/raw/ext_s4u.o -I/nix/store/9jsgjswa0jmgbwk3l8ha2dy45yr4dz62-krb5-1.22.1-dev/include
      gssapi/raw/ext_s4u.c: In function ‘__pyx_pf_6gssapi_3raw_7ext_s4u_acquire_cred_impersonate_name’:
      gssapi/raw/ext_s4u.c:3282:28: error: implicit declaration of function ‘gss_acquire_cred_impersonate_name’ [-Wimplicit-function-declaration]
       3282 |         __pyx_v_maj_stat = gss_acquire_cred_impersonate_name((&__pyx_v_min_stat), __pyx_v_impersonator_cred->raw_creds, __pyx_v_name->raw_name, __pyx_v_input_ttl, __pyx_v_desired_mechs, __pyx_v_c_usage, (&__pyx_v_creds), (&__pyx_v_actual_mechs), (&__pyx_v_actual_ttl));
            |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      gssapi/raw/ext_s4u.c: In function ‘__pyx_pf_6gssapi_3raw_7ext_s4u_2add_cred_impersonate_name’:
      gssapi/raw/ext_s4u.c:3945:28: error: implicit declaration of function ‘gss_add_cred_impersonate_name’ [-Wimplicit-function-declaration]
       3945 |         __pyx_v_maj_stat = gss_add_cred_impersonate_name((&__pyx_v_min_stat), __pyx_v_raw_input_cred, __pyx_v_impersonator_cred->raw_creds, __pyx_v_name->raw_name, (&__pyx_v_mech->raw_oid), __pyx_v_c_usage, __pyx_v_input_initiator_ttl, __pyx_v_input_acceptor_ttl, (&__pyx_v_creds), (&__pyx_v_actual_mechs), (&__pyx_v_actual_initiator_ttl), (&__pyx_v_actual_acceptor_ttl));
            |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/run/current-system/sw/bin/gcc' failed with exit code 1

I have installed the gcc, krb5 and krb5.dev nix packages which should have all the necessary dependencies to build gssapi.

Steps to reproduce

  • Run NixOS 25.11
  • Add gcc, krb5 and krb5.dev to your system packages
  • Enable dynamically linked libraries (needed to run Python): programs.nix-ld.enable = true;
  • Rebuild
  • Create and enter a virtual environment
  • Run pip install gssapi

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the NixOS installation failure with the listed gcc, krb5, and krb5.dev packages, then inspect gssapi/raw/ext_s4u.c and the build inputs used by pip install gssapi. Confirm the change by rebuilding the extension successfully on the stated NixOS setup without the undefined-function errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, nixos, python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.