Skip to content
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

Compilation error on i386: passing argument 3 of 'p11_asn1_read' from incompatible pointer type #638

Closed
dschepler opened this issue Jun 28, 2024 · 2 comments

Comments

@dschepler
Copy link

When I try building p11-kit (version 0.25.3) for i386, I get errors such as this one:

[95/416] Compiling C object p11-kit/p11-kit.p/import-object.c.o
FAILED: p11-kit/p11-kit.p/import-object.c.o 
cc -Ip11-kit/p11-kit.p -Ip11-kit -I../../p11-kit -I. -I../.. -Icommon -I../../common -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -D_GNU_SOURCE -DP11_KIT_FUTURE_UNSTABLE_API '-DBINDIR="/usr/bin"' '-DPRIVATEDIR="/usr/libexec/p11-kit"' '-DSYSCONFDIR="/etc"' '-DP11_SYSTEM_CONFIG_FILE="/etc/pkcs11/pkcs11.conf"' '-DP11_SYSTEM_CONFIG_MODULES="/etc/pkcs11/modules"' '-DP11_PACKAGE_CONFIG_MODULES="/usr/share/p11-kit/modules"' '-DP11_USER_CONFIG_FILE="~/.config/pkcs11/pkcs11.conf"' '-DP11_USER_CONFIG_MODULES="~/.config/pkcs11/modules"' '-DP11_MODULE_PATH="/usr/lib/pkcs11"' -MD -MQ p11-kit/p11-kit.p/import-object.c.o -MF p11-kit/p11-kit.p/import-object.c.o.d -o p11-kit/p11-kit.p/import-object.c.o -c ../../p11-kit/import-object.c
../../p11-kit/import-object.c: In function 'add_attrs_pubkey_rsa':
../../p11-kit/import-object.c:223:62: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
  223 |         attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen);
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                              |
      |                                                              long unsigned int *
In file included from ../../p11-kit/import-object.c:53:
../../common/asn1.h:60:62: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
   60 |                                                      size_t *length);
      |                                                      ~~~~~~~~^~~~~~
../../p11-kit/import-object.c:229:70: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
  229 |         attr_exponent.pValue = p11_asn1_read (asn, "publicExponent", &attr_exponent.ulValueLen);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      long unsigned int *
../../common/asn1.h:60:62: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
   60 |                                                      size_t *length);
      |                                                      ~~~~~~~~^~~~~~
../../p11-kit/import-object.c: In function 'add_attrs_pubkey_ec':
../../p11-kit/import-object.c:264:78: error: passing argument 3 of 'p11_asn1_read' from incompatible pointer type [-Wincompatible-pointer-types]
  264 |         attr_ec_params.pValue = p11_asn1_read (info, "algorithm.parameters", &attr_ec_params.ulValueLen);
      |                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                              |
      |                                                                              long unsigned int *
../../common/asn1.h:60:62: note: expected 'size_t *' {aka 'unsigned int *'} but argument is of type 'long unsigned int *'
   60 |                                                      size_t *length);
      |                                                      ~~~~~~~~^~~~~~
@ueno
Copy link
Member

ueno commented Jun 28, 2024

This is #608 (fixed by #609), though apparently we haven't made any new release since then.

@dschepler
Copy link
Author

OK, sorry for the duplicate. I had tried looking at recent issues including the closed ones, but I guess I didn't look far enough down the list.

@ueno ueno closed this as completed Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants