-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
PyKCS11 in error when installing on Ubuntu 24.04 (Noble) #107
Comments
What happens if you follow the documentation to build PyKCS11? |
Got the same error if building with this commands in a virtual python env (following the unix-build-howto). If compairing generated pykcs11_wrap.cpp from ubuntu 22.04 and 24.04, I see the following difference: That can explain that SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t definition is not found. At this state, I can't figure out if this is a swig 4.2.0 (or swig 4.1.1) change or something else. In swig #defines seem's to be generated here: But this doesn't help much to understand I replaced SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t by SWIGTYPE_p_std__vectorT_unsigned_char_t in pykcs11.i file. |
We had a similar error using swig==4.2.0 (latest) and pykcs==1.5.12 Workaround: use swig==4.1.1.post1
|
If I follow the sequence below on an official ubuntu 24.04 image, I can confirm that your work-around is working to build PyKCS11 for Ubuntu 24.04:
But If I simply want to install PyKCS11 to the system, I can't find a simple way :
It's weird that swig module is not found, in this case. |
The error was: src/pykcs11_wrap.cpp:15849:64: error: ‘SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t’ was not declared in this scope 15849 | if (SWIG_IsOK(SWIG_ConvertPtr(swig_obj[1], (void **)&vect, SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t, 0))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks to SixK for the bug report " PyKCS11 in error when installing on Ubuntu 24.04 (Noble) #107 " Closes: LudovicRousseau/PyKCS11#107
Thanks for the bug report. |
New release available https://blog.apdu.fr/posts/2024/02/new-version-of-pykcs11-1514/ |
Thank's for new release, corresponding swig issue: |
I tried with |
Fixed in 808199f The correct fix is to use |
PyKCS11 seem's to not install on Ubuntu 24.04 (Noble) anymore (seem's it was working about a week ago)
The problem can be reproduced using Ubuntu 24.04 docker image like this:
Note that v1.5.0 also finish with the same error:
pip install PyKCS11==1.5.0 --break-system-packages --verbose
But this command work:
pip install PyKCS11==1.4.4 --break-system-packages --verbose
SWIG library version is 4.2.0 on Ubuntu 24.04.
PyKCS11 installation work with Ubuntu 22.04 (Swig 4.0.2) and Debian Bookworm (Swig 4.1.0)
Problem seem's to be related to this variable:
SWIGTYPE_p_std__vectorT_unsigned_char_std__allocatorT_unsigned_char_t_t
Corresponding error seem's to be in the following file near line 281:
https://github.com/LudovicRousseau/PyKCS11/blob/master/src/pykcs11.i
Find below full log:
The text was updated successfully, but these errors were encountered: