pythongssapi / pythongssapi/python-gssapi

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

未关闭
#373 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
116
派生
55
平均合并
1 天 24 分钟
30 天内合并 PR
2

描述

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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用列出的 gcc、krb5 和 krb5.dev 软件包重现 NixOS 安装失败,然后检查 gssapi/raw/ext_s4u.c 以及 pip install gssapi 使用的构建输入。通过在所述 NixOS 设置上成功重新构建扩展且不出现未定义函数错误,确认此更改。

由索引模型根据 Issue 内容生成。

评估

技术栈
c, nixos, python
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。