privacyidea / privacyidea

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)
http://www.privacyidea.org
GNU Affero General Public License v3.0
1.54k stars 321 forks source link

Installation of requirement pykcs 1.5.11 for HSM failed #4127

Open gpappsoft opened 4 weeks ago

gpappsoft commented 4 weeks ago

Top-level intent

Installation of the hsm requirement pykcs11 from requirements-hsm.txt on Ubunut 24.04 LTS failed.

Please support pycks11==1.5.14

It's more a feature-request/enhancement than a bug. Sorry for the wrong label.

Steps to reproduce

  1. apt-get install swig
  2. pip3 -m venv pykcs ; cd pykcs ; source bin/activate
  3. pip install -v pykcs11==1.5.11

Expected outcome

Installation of pykcs version 1.5.11

Actual outcome

Build failed. Ubuntu 24.04 is shipped with swig 4.2.0. There is an issue with pykcs11 regarding the change of descriptor with 4.2.0. See (https://github.com/swig/swig/issues/2793) and (https://github.com/LudovicRousseau/PyKCS11/issues/107).

IMHO this issue exists until pykcs 1.5.13. pykcs version 1.5.14 runs fine on Ubuntu 24.04 and also tested in WolfiOS(latest) which have the same issue to build the pykcs 1.5.11.

Configuration

Log file

src/pykcs11_wrap.cpp:17126:15: note: in expansion of macro ‘SWIG_ConvertPtr’
  17126 |     int res = SWIG_ConvertPtr(swig_obj[1], (void **)&vect, SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t, 0);
        |               ^~~~~~~~~~~~~~~
  error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
  error: subprocess-exited-with-error

  × Building wheel for pykcs11 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/pi/pypkc/bin/python3 /home/pi/pypkc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp_pnwasjq
  cwd: /tmp/pip-install-8yondn5g/pykcs11_a778804edc4740fb89f59d691763f3ce
  Building wheel for pykcs11 (pyproject.toml) ... error
  ERROR: Failed building wheel for pykcs11
Failed to build pykcs11
github-actions[bot] commented 4 weeks ago

Thank you for filing an issue and sharing your observations or ideas. Please be sure to provide as much information as possible to help us to work on this issue.