intel / ipp-crypto

Apache License 2.0
314 stars 85 forks source link

Warnings with GCC 12.2.1 #47

Open bkmgit opened 1 year ago

bkmgit commented 1 year ago

When building with GCC 12.2.1 get the following warnings:

In file included from /home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:32:
In function ‘PadBlock’,
    inlined from ‘n0_ippsAES_CMACGetTag’ at /home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:82:10:
/home/user/ipp-crypto-ippcp_2021.6/sources/ippcp/pcptool.h:94:12: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]       
   94 |       d[k] = paddingByte;
      |       ~~~~~^~~~~~~~~~~~~
/home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c: In function ‘n0_ippsAES_CMACGetTag’:
/home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:71:13: note: at offset 16 into destination object ‘locBuffer’ of size 16
   71 |       Ipp8u locBuffer[MBS_RIJ128];
      |             ^~~~~~~~~
In function ‘PadBlock’,
    inlined from ‘n0_ippsAES_CMACGetTag’ at /home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:82:10:
/home/user/ipp-crypto-ippcp_2021.6/sources/ippcp/pcptool.h:94:12: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
   94 |       d[k] = paddingByte;
      |       ~~~~~^~~~~~~~~~~~~
/home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c: In function ‘n0_ippsAES_CMACGetTag’:
/home/user/ipp-crypto-ippcp_2021.6/build/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c:71:13: note: at offset [32, 48] into destination object ‘locBuffer’ of size 16 
   71 |       Ipp8u locBuffer[MBS_RIJ128];
      |             ^~~~~~~~~ 
cc1: all warnings being treated as errors
make[2]: *** [sources/ippcp/CMakeFiles/ippcp_s_n0.dir/build.make:1602: sources/ippcp/CMakeFiles/ippcp_s_n0.dir/__/__/c_sources/n0/c_intel64/n0_pcpaes_cmacgettag.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:426: sources/ippcp/CMakeFiles/ippcp_s_n0.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
bkmgit commented 1 year ago

This is with release 2021.6

ElenaTyuleneva commented 1 year ago

Hi @bkmgit , IPP Crypto doesn't support the build with gcc12 now. Please, refer to software requirements.

bkmgit commented 1 year ago

Hi @ElenaTyuleneva Thanks for feedback. Got it to build with Clang 14.0.5 Would pull requests: a) to use GitHub actions CI to do test builds be considered? b) to fixe the above warnings with GCC 12 be considered?

bkmgit commented 1 year ago

There seems to have been a related issue https://github.com/intel/ipp-crypto/issues/16 my builds have been on Fedora 36

andreyfe1 commented 1 year ago

Hi @bkmgit. Sorry for delay... a) It's a great idea. Currently we don't have GitHub actions CI, but we can prioritize. b) We are planning to add GCC12 in one of the next releases. Any pull requests are welcome!

paveldyakov commented 5 months ago

Hi @bkmgit,

Could you please try to build again with GCC 12.2? N0 build was disabled in IPP Crypto in the latest releases. Now I see no issue with GCC 12.2

bkmgit commented 5 months ago

Thanks. Will check this, hopefully will also work with GCC 13.