Skip to content

cannot build on NixOS due to undefined C functions in ext_s4u #373

@lp-magenta

Description

@lp-magenta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions