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

0.24.0: is not gcc 14.x ready #2998

Closed
kloczek opened this issue Jan 25, 2024 · 1 comment
Closed

0.24.0: is not gcc 14.x ready #2998

kloczek opened this issue Jan 25, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Jan 25, 2024

Looks like last version build fails with latest gcc 14.x which is now used in fedora rawhide.

Build fails with
Making all in libopensc
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/libopensc'
  CC       libopensc_la-pkcs15-data.lo
pkcs15-data.c: In function 'sc_pkcs15_read_data_object':
pkcs15-data.c:64:37: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
   64 |         data_object = calloc(sizeof(struct sc_pkcs15_data), 1);
      |                                     ^~~~~~
pkcs15-data.c:64:37: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [Makefile:1598: libopensc_la-pkcs15-data.lo] Error 1
  CC       libopensc_la-pkcs15-algo.lo
pkcs15-algo.c: In function 'asn1_decode_ec_params':
pkcs15-algo.c:289:29: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  289 |         ecp = calloc(sizeof(struct sc_ec_parameters), 1);
      |                             ^~~~~~
pkcs15-algo.c:289:29: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [Makefile:1640: libopensc_la-pkcs15-algo.lo] Error 1
  CC       libopensc_la-card-authentic.lo
card-authentic.c: In function 'authentic_init':
card-authentic.c:495:74: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  495 |         card->drv_data = (struct authentic_private_data *) calloc(sizeof(struct authentic_private_data), 1);
      |                                                                          ^~~~~~
card-authentic.c:495:74: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [Makefile:1920: libopensc_la-card-authentic.lo] Error 1
  CC       libopensc_la-pkcs15-oberthur.lo
pkcs15-oberthur.c: In function 'sc_oberthur_parse_containers':
pkcs15-oberthur.c:422:58: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  422 |                 cont = (struct container *)calloc(sizeof(struct container), 1);
      |                                                          ^~~~~~
pkcs15-oberthur.c:422:58: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [Makefile:2151: libopensc_la-pkcs15-oberthur.lo] Error 1
make[3]: Target 'all' not remade because of errors.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/libopensc'
Making all in pkcs11
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/pkcs11'
make[3]: *** No rule to make target '../../src/libopensc/libopensc.la', needed by 'opensc-pkcs11.la'.
make[3]: Target 'all' not remade because of errors.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/pkcs11'
Making all in tools
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/tools'
  CCLD     opensc-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:976: opensc-tool] Error 1
  CCLD     opensc-explorer
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:968: opensc-explorer] Error 1
  CCLD     opensc-asn1
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:964: opensc-asn1] Error 1
  CCLD     pkcs15-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:1008: pkcs15-tool] Error 1
  CCLD     pkcs15-crypt
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:992: pkcs15-crypt] Error 1
  CC       pkcs11_tool-pkcs11-tool.o
pkcs11-tool.c: In function ‘get_iv’:
pkcs11-tool.c:8270:28: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
 8270 |         iv = calloc(sizeof(CK_BYTE), *iv_size);
      |                            ^~~~~~~
pkcs11-tool.c:8270:28: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [Makefile:1373: pkcs11_tool-pkcs11-tool.o] Error 1
  CCLD     pkcs11-register
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:984: pkcs11-register] Error 1
  CCLD     cardos-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:920: cardos-tool] Error 1
  CCLD     eidenv
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:936: eidenv] Error 1
  CCLD     openpgp-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:960: openpgp-tool] Error 1
  CCLD     iasecc-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:948: iasecc-tool] Error 1
  CCLD     egk-tool
libtool:   error: cannot find the library '../../src/libopensc/libopensc.la' or unhandled argument '../../src/libopensc/libopensc.la'
make[3]: *** [Makefile:932: egk-tool] Error 1
  CC       goid_tool-goid-tool.o
goid-tool.c: In function ‘paccess_main’:
goid-tool.c:586:31: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  586 |         certs = calloc(sizeof *certs, cmdline->certificate_given + 1);
      |                               ^
goid-tool.c:586:31: note: earlier argument should specify number of elements, later size of each element
goid-tool.c:587:36: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  587 |         certs_lens = calloc(sizeof *certs_lens,
      |                                    ^
goid-tool.c:587:36: note: earlier argument should specify number of elements, later size of each element
Making all in p11test
make[4]: Entering directory '/home/tkloczko/rpmbuild/BUILD/OpenSC-0.24.0/src/tests/p11test'
  CC       p11test-p11test_helpers.o
p11test_helpers.c: In function ‘group_setup’:
p11test_helpers.c:108:45: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  108 |         token_info_t * info = calloc(sizeof(token_info_t), 1);
      |                                             ^~~~~~~~~~~~
p11test_helpers.c:108:45: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make[4]: *** [Makefile:807: p11test-p11test_helpers.o] Error 1
@frankmorgner
Copy link
Member

See #2996

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