Closed ColinIanKing closed 4 years ago
Thanks @ColinIanKing I tried to compile the library with gcc 10, but I don't see all these errors. Could you tell me where you got gcc 10 from? I am using Ubuntu 20.04 and I installed the gcc-10 package.
This was with gcc 10.0.1 on Ubuntu 20.10 - Ubuntu Groovy Gorilla (development branch) - it may be an issue with the new toolchain and/or glibc though.
gcc-10 -v Using built-in specs. COLLECT_GCC=gcc-10 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10-20200425-1ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,amdgcn-amdhsa,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200425 (experimental) [master revision ead1c27a530:9176ecce77f:cf3f7b309ffdd888fdd85048ac9b4bcdc2713a45] (Ubuntu 10-20200425-1ubuntu2)
I analyzed the errors and they don't make sense to me. I am building gcc 10.1 to see if I can reproduce some of them. The only one that I saw is the following (with gcc-10.0.1 on Ubuntu 20.04):
/usr/bin/ld: snow3g_test.o:test/snow3g_test.c:41: multiple definition of `vecList'; kasumi_test.o:test/kasumi_test.c:46: first defined here
I fixed this by removing these globla variables from snow3g_test.c and kasumi_test.c (they were not used anyway).
Hi @ColinIanKing, do you still see issues on gcc-10 after the changes that we have pushed?
it's improved for sure so thanks for the improvements so far. Hit this issue:
$ CC=gcc-10 make -j 8
make -C lib
make[1]: Entering directory '/home/cking/repos/intel-ipsec-mb/lib'
gcc-10 -MMD -mavx -maes -c -DLINUX -I include -I . -I no-aesni -W -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat -Wformat-security -Wunreachable-code -Wmissing-noreturn -Wsign-compare -Wno-endif-labels -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector -D_FORTIFY_SOURCE=2 -DSAFE_LOOKUP -O3 -fPIC avx/snow3g_avx.c -o obj/snow3g_avx.o
gcc-10 -MMD -mavx2 -maes -c -DLINUX -I include -I . -I no-aesni -W -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat -Wformat-security -Wunreachable-code -Wmissing-noreturn -Wsign-compare -Wno-endif-labels -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector -D_FORTIFY_SOURCE=2 -DSAFE_LOOKUP -O3 -fPIC avx2/snow3g_avx2.c -o obj/snow3g_avx2.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
./include/snow3g_common.h: In function ‘pclmulqdq_wrap’:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1664:24: note: called from here
1664 | return _mm_clmulepi64_si128(a, b, 0x00);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1666:24: note: called from here
1666 | return _mm_clmulepi64_si128(a, b, 0x01);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1668:24: note: called from here
1668 | return _mm_clmulepi64_si128(a, b, 0x10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1670:24: note: called from here
1670 | return _mm_clmulepi64_si128(a, b, 0x11);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:620: obj/snow3g_avx.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx2/snow3g_avx2.c:49:
./include/snow3g_common.h: In function ‘pclmulqdq_wrap’:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx2/snow3g_avx2.c:49:
./include/snow3g_common.h:1664:24: note: called from here
1664 | return _mm_clmulepi64_si128(a, b, 0x00);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx2/snow3g_avx2.c:49:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx2/snow3g_avx2.c:49:
./include/snow3g_common.h:1666:24: note: called from here
1666 | return _mm_clmulepi64_si128(a, b, 0x01);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx2/snow3g_avx2.c:49:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx2/snow3g_avx2.c:49:
./include/snow3g_common.h:1668:24: note: called from here
1668 | return _mm_clmulepi64_si128(a, b, 0x10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx2/snow3g_avx2.c:49:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx2/snow3g_avx2.c:49:
./include/snow3g_common.h:1670:24: note: called from here
1670 | return _mm_clmulepi64_si128(a, b, 0x11);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:630: obj/snow3g_avx2.o] Error 1
make[1]: Leaving directory '/home/cking/repos/intel-ipsec-mb/lib'
make: *** [Makefile:31: all] Error 2
Thanks Colin. Could you please check if adding EXTRA_CFLAGS="-mpclmul" solve this problem with gcc10?
FYI:
make[1]: Entering directory '/home/cking/repos/intel-ipsec-mb/test'
gcc-10 -g -DLINUX -D_GNU_SOURCE -DNO_COMPAT_IMB_API_053 -W -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat -Wformat-security -Wunreachable-code -Wmissing-noreturn -Wsign-compare -Wno-endif-labels -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -O3 -c -o main.o main.c
In file included from main.c:34:
gcm_ctr_vectors_test.h:78:21: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
78 | extern int gcm_test(IMB_MGR *p_mgr);
| ^~~~~~~
| MB_MGR
gcm_ctr_vectors_test.h:79:21: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
79 | int ctr_test(struct IMB_MGR *);
| ^~~~~~~
In file included from main.c:35:
customop_test.h:32:33: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
32 | extern int customop_test(struct IMB_MGR *state);
| ^~~~~~~
main.c:38:55: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
38 | extern int des_test(const enum arch_type arch, struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:39:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
39 | extern int ccm_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:40:29: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
40 | extern int cmac_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:41:34: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
41 | extern int hmac_sha1_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:42:43: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
42 | extern int hmac_sha256_sha512_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:43:33: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
43 | extern int hmac_md5_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:44:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
44 | extern int aes_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:45:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
45 | extern int ecb_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:46:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
46 | extern int sha_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:47:32: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
47 | extern int chained_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:48:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
48 | extern int api_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:49:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
49 | extern int pon_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:50:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
50 | extern int zuc_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:51:31: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
51 | extern int kasumi_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:52:31: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
52 | extern int snow3g_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:53:35: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
53 | extern int direct_api_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:54:34: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
54 | extern int clear_mem_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:55:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
55 | extern int hec_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
main.c:56:29: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration
56 | extern int xcbc_test(struct IMB_MGR *mb_mgr);
| ^~~~~~~
In file included from main.c:58:
do_test.h:112:19: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
112 | known_answer_test(IMB_MGR *mb_mgr)
| ^~~~~~~
| MB_MGR
do_test.h:196:15: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
196 | test_aux_func(IMB_MGR *mgr)
| ^~~~~~~
| MB_MGR
do_test.h:223:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
223 | do_test(IMB_MGR *mb_mgr)
| ^~~~~~~
| MB_MGR
main.c: In function ‘print_hw_features’:
main.c:94:19: error: ‘IMB_FEATURE_GFNI’ undeclared (first use in this function); did you mean ‘IMB_FEATURE_AESNI’?
94 | { IMB_FEATURE_GFNI, "GFNI" },
| ^~~~~~~~~~~~~~~~
| IMB_FEATURE_AESNI
main.c:94:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:96:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
96 | IMB_MGR *p_mgr = NULL;
| ^~~~~~~
| MB_MGR
main.c:101:15: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
101 | p_mgr = alloc_mb_mgr(0);
| ^
main.c:111:31: error: request for member ‘features’ in something not a structure or union
111 | ((p_mgr->features & val) == val) ? "OK" : "n/a");
| ^~
main.c:111:42: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
111 | ((p_mgr->features & val) == val) ? "OK" : "n/a");
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:111:49: warning: comparison between pointer and integer
111 | ((p_mgr->features & val) == val) ? "OK" : "n/a");
| ^~
main.c:114:21: warning: passing argument 1 of ‘free_mb_mgr’ from incompatible pointer type [-Wincompatible-pointer-types]
114 | free_mb_mgr(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1011:41: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1011 | IMB_DLL_EXPORT void free_mb_mgr(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c: In function ‘detect_arch’:
main.c:128:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
128 | IMB_MGR *p_mgr = NULL;
| ^~~~~~~
| MB_MGR
main.c:142:15: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
142 | p_mgr = alloc_mb_mgr(0);
| ^
main.c:148:19: error: request for member ‘features’ in something not a structure or union
148 | if ((p_mgr->features & detect_avx512) != detect_avx512)
| ^~
main.c:148:30: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
148 | if ((p_mgr->features & detect_avx512) != detect_avx512)
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:148:47: warning: comparison between pointer and integer
148 | if ((p_mgr->features & detect_avx512) != detect_avx512)
| ^~
main.c:151:19: error: request for member ‘features’ in something not a structure or union
151 | if ((p_mgr->features & detect_avx2) != detect_avx2)
| ^~
main.c:151:30: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
151 | if ((p_mgr->features & detect_avx2) != detect_avx2)
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:151:45: warning: comparison between pointer and integer
151 | if ((p_mgr->features & detect_avx2) != detect_avx2)
| ^~
main.c:154:19: error: request for member ‘features’ in something not a structure or union
154 | if ((p_mgr->features & detect_avx) != detect_avx)
| ^~
main.c:154:30: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
154 | if ((p_mgr->features & detect_avx) != detect_avx)
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:154:44: warning: comparison between pointer and integer
154 | if ((p_mgr->features & detect_avx) != detect_avx)
| ^~
main.c:157:19: error: request for member ‘features’ in something not a structure or union
157 | if ((p_mgr->features & detect_sse) != detect_sse)
| ^~
main.c:157:30: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
157 | if ((p_mgr->features & detect_sse) != detect_sse)
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:157:44: warning: comparison between pointer and integer
157 | if ((p_mgr->features & detect_sse) != detect_sse)
| ^~
main.c:160:19: error: request for member ‘features’ in something not a structure or union
160 | if ((p_mgr->features & detect_pclmulqdq) != detect_pclmulqdq)
| ^~
main.c:160:30: error: invalid operands to binary & (have ‘const struct <anonymous> *’ and ‘uint64_t’ {aka ‘const long unsigned int’})
160 | if ((p_mgr->features & detect_pclmulqdq) != detect_pclmulqdq)
| ~~~~~ ^
| |
| const struct <anonymous> *
main.c:160:50: warning: comparison between pointer and integer
160 | if ((p_mgr->features & detect_pclmulqdq) != detect_pclmulqdq)
| ^~
main.c:163:21: warning: passing argument 1 of ‘free_mb_mgr’ from incompatible pointer type [-Wincompatible-pointer-types]
163 | free_mb_mgr(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1011:41: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1011 | IMB_DLL_EXPORT void free_mb_mgr(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c: In function ‘main’:
main.c:178:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’?
178 | IMB_MGR *p_mgr = NULL;
| ^~~~~~~
| MB_MGR
main.c:230:31: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
230 | p_mgr = alloc_mb_mgr(flags);
| ^
main.c:235:41: warning: passing argument 1 of ‘init_mb_mgr_sse’ from incompatible pointer type [-Wincompatible-pointer-types]
235 | init_mb_mgr_sse(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1037:45: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1037 | IMB_DLL_EXPORT void init_mb_mgr_sse(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c:240:31: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
240 | p_mgr = alloc_mb_mgr(flags);
| ^
main.c:245:41: warning: passing argument 1 of ‘init_mb_mgr_avx’ from incompatible pointer type [-Wincompatible-pointer-types]
245 | init_mb_mgr_avx(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1013:45: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1013 | IMB_DLL_EXPORT void init_mb_mgr_avx(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c:250:31: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
250 | p_mgr = alloc_mb_mgr(flags);
| ^
main.c:255:42: warning: passing argument 1 of ‘init_mb_mgr_avx2’ from incompatible pointer type [-Wincompatible-pointer-types]
255 | init_mb_mgr_avx2(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1021:46: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1021 | IMB_DLL_EXPORT void init_mb_mgr_avx2(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c:260:31: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
260 | p_mgr = alloc_mb_mgr(flags);
| ^
main.c:265:44: warning: passing argument 1 of ‘init_mb_mgr_avx512’ from incompatible pointer type [-Wincompatible-pointer-types]
265 | init_mb_mgr_avx512(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1029:48: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1029 | IMB_DLL_EXPORT void init_mb_mgr_avx512(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c:270:31: warning: assignment to ‘int *’ from incompatible pointer type ‘MB_MGR *’ [-Wincompatible-pointer-types]
270 | p_mgr = alloc_mb_mgr(flags | IMB_FLAG_AESNI_OFF);
| ^
main.c:275:41: warning: passing argument 1 of ‘init_mb_mgr_sse’ from incompatible pointer type [-Wincompatible-pointer-types]
275 | init_mb_mgr_sse(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1037:45: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1037 | IMB_DLL_EXPORT void init_mb_mgr_sse(MB_MGR *state);
| ~~~~~~~~^~~~~
main.c:284:27: warning: implicit declaration of function ‘known_answer_test’ [-Wimplicit-function-declaration]
284 | errors += known_answer_test(p_mgr);
| ^~~~~~~~~~~~~~~~~
main.c:285:27: warning: implicit declaration of function ‘do_test’; did you mean ‘pon_test’? [-Wimplicit-function-declaration]
285 | errors += do_test(p_mgr);
| ^~~~~~~
| pon_test
main.c:286:36: warning: passing argument 1 of ‘ctr_test’ from incompatible pointer type [-Wincompatible-pointer-types]
286 | errors += ctr_test(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:34:
gcm_ctr_vectors_test.h:79:14: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
79 | int ctr_test(struct IMB_MGR *);
| ^~~~~~~~~~~~~~~~
main.c:287:36: warning: passing argument 1 of ‘pon_test’ from incompatible pointer type [-Wincompatible-pointer-types]
287 | errors += pon_test(p_mgr);
| ^~~~~
| |
| int *
main.c:49:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
49 | extern int pon_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:288:37: warning: passing argument 1 of ‘xcbc_test’ from incompatible pointer type [-Wincompatible-pointer-types]
288 | errors += xcbc_test(p_mgr);
| ^~~~~
| |
| int *
main.c:56:38: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
56 | extern int xcbc_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:290:35: warning: implicit declaration of function ‘gcm_test’; did you mean ‘ccm_test’? [-Wimplicit-function-declaration]
290 | errors += gcm_test(p_mgr);
| ^~~~~~~~
| ccm_test
main.c:291:41: warning: passing argument 1 of ‘customop_test’ from incompatible pointer type [-Wincompatible-pointer-types]
291 | errors += customop_test(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:35:
customop_test.h:32:42: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
32 | extern int customop_test(struct IMB_MGR *state);
| ~~~~~~~~~~~~~~~~^~~~~
main.c:292:43: warning: passing argument 2 of ‘des_test’ from incompatible pointer type [-Wincompatible-pointer-types]
292 | errors += des_test(atype, p_mgr);
| ^~~~~
| |
| int *
main.c:38:64: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
38 | extern int des_test(const enum arch_type arch, struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:293:36: warning: passing argument 1 of ‘ccm_test’ from incompatible pointer type [-Wincompatible-pointer-types]
293 | errors += ccm_test(p_mgr);
| ^~~~~
| |
| int *
main.c:39:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
39 | extern int ccm_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:294:37: warning: passing argument 1 of ‘cmac_test’ from incompatible pointer type [-Wincompatible-pointer-types]
294 | errors += cmac_test(p_mgr);
| ^~~~~
| |
| int *
main.c:40:38: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
40 | extern int cmac_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:295:36: warning: passing argument 1 of ‘zuc_test’ from incompatible pointer type [-Wincompatible-pointer-types]
295 | errors += zuc_test(p_mgr);
| ^~~~~
| |
| int *
main.c:50:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
50 | extern int zuc_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:296:39: warning: passing argument 1 of ‘kasumi_test’ from incompatible pointer type [-Wincompatible-pointer-types]
296 | errors += kasumi_test(p_mgr);
| ^~~~~
| |
| int *
main.c:51:40: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
51 | extern int kasumi_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:297:39: warning: passing argument 1 of ‘snow3g_test’ from incompatible pointer type [-Wincompatible-pointer-types]
297 | errors += snow3g_test(p_mgr);
| ^~~~~
| |
| int *
main.c:52:40: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
52 | extern int snow3g_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:298:42: warning: passing argument 1 of ‘hmac_sha1_test’ from incompatible pointer type [-Wincompatible-pointer-types]
298 | errors += hmac_sha1_test(p_mgr);
| ^~~~~
| |
| int *
main.c:41:43: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
41 | extern int hmac_sha1_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:299:51: warning: passing argument 1 of ‘hmac_sha256_sha512_test’ from incompatible pointer type [-Wincompatible-pointer-types]
299 | errors += hmac_sha256_sha512_test(p_mgr);
| ^~~~~
| |
| int *
main.c:42:52: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
42 | extern int hmac_sha256_sha512_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:300:41: warning: passing argument 1 of ‘hmac_md5_test’ from incompatible pointer type [-Wincompatible-pointer-types]
300 | errors += hmac_md5_test(p_mgr);
| ^~~~~
| |
| int *
main.c:43:42: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
43 | extern int hmac_md5_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:301:36: warning: passing argument 1 of ‘aes_test’ from incompatible pointer type [-Wincompatible-pointer-types]
301 | errors += aes_test(p_mgr);
| ^~~~~
| |
| int *
main.c:44:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
44 | extern int aes_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:302:36: warning: passing argument 1 of ‘ecb_test’ from incompatible pointer type [-Wincompatible-pointer-types]
302 | errors += ecb_test(p_mgr);
| ^~~~~
| |
| int *
main.c:45:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
45 | extern int ecb_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:303:36: warning: passing argument 1 of ‘sha_test’ from incompatible pointer type [-Wincompatible-pointer-types]
303 | errors += sha_test(p_mgr);
| ^~~~~
| |
| int *
main.c:46:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
46 | extern int sha_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:304:40: warning: passing argument 1 of ‘chained_test’ from incompatible pointer type [-Wincompatible-pointer-types]
304 | errors += chained_test(p_mgr);
| ^~~~~
| |
| int *
main.c:47:41: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
47 | extern int chained_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:305:36: warning: passing argument 1 of ‘hec_test’ from incompatible pointer type [-Wincompatible-pointer-types]
305 | errors += hec_test(p_mgr);
| ^~~~~
| |
| int *
main.c:55:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
55 | extern int hec_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:306:36: warning: passing argument 1 of ‘api_test’ from incompatible pointer type [-Wincompatible-pointer-types]
306 | errors += api_test(p_mgr);
| ^~~~~
| |
| int *
main.c:48:37: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
48 | extern int api_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:307:43: warning: passing argument 1 of ‘direct_api_test’ from incompatible pointer type [-Wincompatible-pointer-types]
307 | errors += direct_api_test(p_mgr);
| ^~~~~
| |
| int *
main.c:53:44: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
53 | extern int direct_api_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:308:42: warning: passing argument 1 of ‘clear_mem_test’ from incompatible pointer type [-Wincompatible-pointer-types]
308 | errors += clear_mem_test(p_mgr);
| ^~~~~
| |
| int *
main.c:54:43: note: expected ‘struct IMB_MGR *’ but argument is of type ‘int *’
54 | extern int clear_mem_test(struct IMB_MGR *mb_mgr);
| ~~~~~~~~~~~~~~~~^~~~~~
main.c:309:29: warning: passing argument 1 of ‘free_mb_mgr’ from incompatible pointer type [-Wincompatible-pointer-types]
309 | free_mb_mgr(p_mgr);
| ^~~~~
| |
| int *
In file included from main.c:32:
/usr/include/intel-ipsec-mb.h:1011:41: note: expected ‘MB_MGR *’ but argument is of type ‘int *’
1011 | IMB_DLL_EXPORT void free_mb_mgr(MB_MGR *state);
| ~~~~~~~~^~~~~
In file included from main.c:58:
At top level:
do_test.h:85:22: warning: ‘cipherCBC128’ defined but not used [-Wunused-variable]
85 | static unsigned char cipherCBC128[] = {
| ^~~~~~~~~~~~
do_test.h:80:22: warning: ‘ic’ defined but not used [-Wunused-variable]
80 | static unsigned char ic[] = {
| ^~
do_test.h:68:22: warning: ‘key128’ defined but not used [-Wunused-variable]
68 | static unsigned char key128[] = {
| ^~~~~~
do_test.h:57:22: warning: ‘plain’ defined but not used [-Wunused-variable]
57 | static unsigned char plain[] = {
| ^~~~~
do_test.h:50:22: warning: ‘hmac12’ defined but not used [-Wunused-variable]
50 | static unsigned char hmac12[] = {
| ^~~~~~
do_test.h:46:22: warning: ‘text’ defined but not used [-Wunused-variable]
46 | static unsigned char text[] = {
| ^~~~
do_test.h:36:22: warning: ‘key’ defined but not used [-Wunused-variable]
36 | static unsigned char key[] = {
| ^~~
make[1]: *** [<builtin>: main.o] Error 1
make[1]: Leaving directory '/home/cking/repos/intel-ipsec-mb/test'
make: *** [Makefile:32: all] Error 2
The last one is weird. Is there any chance that there is a different version of the library installed somewhere in the system already? and wrong header file is picked up?
Ah, I'll remove the installed library and rebuild
OK, removed the libs + headers, rebuilt I get:
gcc-10 -MMD -mavx -maes -c -DLINUX -I include -I . -I no-aesni -W -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat -Wformat-security -Wunreachable-code -Wmissing-noreturn -Wsign-compare -Wno-endif-labels -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector -D_FORTIFY_SOURCE=2 -DSAFE_LOOKUP -O3 -fPIC avx/snow3g_avx.c -o obj/snow3g_avx.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
./include/snow3g_common.h: In function ‘pclmulqdq_wrap’:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1664:24: note: called from here
1664 | return _mm_clmulepi64_si128(a, b, 0x00);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1666:24: note: called from here
1666 | return _mm_clmulepi64_si128(a, b, 0x01);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1668:24: note: called from here
1668 | return _mm_clmulepi64_si128(a, b, 0x10);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:39,
from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
from ./include/constant_lookup.h:35,
from ./include/snow3g_common.h:42,
from avx/snow3g_avx.c:42:
/usr/lib/gcc/x86_64-linux-gnu/10/include/wmmintrin.h:116:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
| ^~~~~~~~~~~~~~~~~~~~
In file included from avx/snow3g_avx.c:42:
./include/snow3g_common.h:1670:24: note: called from here
1670 | return _mm_clmulepi64_si128(a, b, 0x11);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:620: obj/snow3g_avx.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/cking/repos/intel-ipsec-mb/lib'
make: *** [Makefile:31: all] Error 2
It complains about use of intrinsic for pclmulqdq instruction ... problems like this remind me why I like programming in assembly :) Could you please check if adding EXTRA_CFLAGS="-mpclmul" solve this problem with gcc10?
Yep, now got a clean build \o/ thanks!
Thanks a mil Colin! I'll add this flag for every arch in order to be on the safe side.
No problem. I can now at least get it to the point where I can do some static analysis on the project again. BTW, is there a planned release coming up?
Thanks! Looking forward to seeing results of the static analysis :) No, the next release will be ~ start of Q4. Still plenty to implement before that.
Building with gcc-10 I get lots of build errors:
gcc-10 -v Using built-in specs. COLLECT_GCC=gcc-10 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10-20200425-1ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,amdgcn-amdhsa,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200425 (experimental) [master revision ead1c27a530:9176ecce77f:cf3f7b309ffdd888fdd85048ac9b4bcdc2713a45] (Ubuntu 10-20200425-1ubuntu2)
Using: CC=gcc-10 make
~~~~ In file included from main.c:35: customop_test.h:32:33: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 32~~ main.c:38:55: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 38~~ main.c:39:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 39~~ main.c:40:29: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 40~~ main.c:41:34: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 41~~ main.c:42:43: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 42~~ main.c:43:33: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 43~~ main.c:44:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 44~~ main.c:45:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 45~~ main.c:46:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 46~~ main.c:47:32: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 47~~ main.c:48:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 48~~ main.c:49:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 49~~ main.c:50:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 50~~ main.c:51:31: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 51~~ main.c:52:31: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 52~~ main.c:53:35: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 53~~ main.c:54:34: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 54~~ main.c:55:28: warning: ‘struct IMB_MGR’ declared inside parameter list will not be visible outside of this definition or declaration 55~~ In file included from main.c:57: do_test.h:112:19: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’? 112~~~~~~~~~~~~^~~^~~ main.c: In function ‘detect_arch’: main.c:127:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’? 127~~~^~^~^~^~^~~^~~ main.c: In function ‘main’: main.c:177:9: error: unknown type name ‘IMB_MGR’; did you mean ‘MB_MGR’? 177~~~~^~~ main.c:239:31: warning: assignment to ‘int ’ from incompatible pointer type ‘MB_MGR ’ [-Wincompatible-pointer-types] 239~~^~~ main.c:249:31: warning: assignment to ‘int ’ from incompatible pointer type ‘MB_MGR ’ [-Wincompatible-pointer-types] 249~~^~~ main.c:259:31: warning: assignment to ‘int ’ from incompatible pointer type ‘MB_MGR ’ [-Wincompatible-pointer-types] 259~~^~~ main.c:269:31: warning: assignment to ‘int ’ from incompatible pointer type ‘MB_MGR ’ [-Wincompatible-pointer-types] 269~~^~~ main.c:283:27: warning: implicit declaration of function ‘known_answer_test’ [-Wimplicit-function-declaration] 283~~~~ main.c:284:27: warning: implicit declaration of function ‘do_test’; did you mean ‘pon_test’? [-Wimplicit-function-declaration] 284~~~~~main.c:286:36: warning: passing argument 1 of ‘pon_test’ from incompatible pointer type [-Wincompatible-pointer-types] 286~~~~^~main.c:288:35: warning: implicit declaration of function ‘gcm_test’; did you mean ‘ccm_test’? [-Wimplicit-function-declaration] 288~~~~~~~^~~~~ main.c:290:43: warning: passing argument 2 of ‘des_test’ from incompatible pointer type [-Wincompatible-pointer-types] 290~~~~^~main.c:291:36: warning: passing argument 1 of ‘ccm_test’ from incompatible pointer type [-Wincompatible-pointer-types] 291~~~~^~main.c:292:37: warning: passing argument 1 of ‘cmac_test’ from incompatible pointer type [-Wincompatible-pointer-types] 292~~~~^~main.c:293:36: warning: passing argument 1 of ‘zuc_test’ from incompatible pointer type [-Wincompatible-pointer-types] 293~~~~^~main.c:294:39: warning: passing argument 1 of ‘kasumi_test’ from incompatible pointer type [-Wincompatible-pointer-types] 294~~~~^~main.c:295:39: warning: passing argument 1 of ‘snow3g_test’ from incompatible pointer type [-Wincompatible-pointer-types] 295~~~~^~main.c:296:42: warning: passing argument 1 of ‘hmac_sha1_test’ from incompatible pointer type [-Wincompatible-pointer-types] 296~~~~^~main.c:297:51: warning: passing argument 1 of ‘hmac_sha256_sha512_test’ from incompatible pointer type [-Wincompatible-pointer-types] 297~~~~^~main.c:298:41: warning: passing argument 1 of ‘hmac_md5_test’ from incompatible pointer type [-Wincompatible-pointer-types] 298~~~~^~main.c:299:36: warning: passing argument 1 of ‘aes_test’ from incompatible pointer type [-Wincompatible-pointer-types] 299~~~~^~main.c:300:36: warning: passing argument 1 of ‘ecb_test’ from incompatible pointer type [-Wincompatible-pointer-types] 300~~~~^~main.c:301:36: warning: passing argument 1 of ‘sha_test’ from incompatible pointer type [-Wincompatible-pointer-types] 301~~~~^~main.c:302:40: warning: passing argument 1 of ‘chained_test’ from incompatible pointer type [-Wincompatible-pointer-types] 302~~~~^~main.c:303:36: warning: passing argument 1 of ‘hec_test’ from incompatible pointer type [-Wincompatible-pointer-types] 303~~~~^~main.c:304:36: warning: passing argument 1 of ‘api_test’ from incompatible pointer type [-Wincompatible-pointer-types] 304~~~~^~main.c:305:43: warning: passing argument 1 of ‘direct_api_test’ from incompatible pointer type [-Wincompatible-pointer-types] 305~~~~^~main.c:306:42: warning: passing argument 1 of ‘clear_mem_test’ from incompatible pointer type [-Wincompatible-pointer-types] 306~~~~^~main.c:307:29: warning: passing argument 1 of ‘free_mb_mgr’ from incompatible pointer type [-Wincompatible-pointer-types] 307In file included from main.c:32: /usr/include/intel-ipsec-mb.h:1011:41: note: expected ‘MB_MGR ’ but argument is of type ‘int ’ 1011 | IMB_DLL_EXPORT void free_mb_mgr(MB_MGR *state); |: main.o] Error 1
make[1]: Leaving directory '/home/cking/repos/intel-ipsec-mb/test'
make: [Makefile:32: all] Error 2
~~^~~ In file included from main.c:57: At top level: do_test.h:85:22: warning: ‘cipherCBC128’ defined but not used [-Wunused-variable] 85 | static unsigned char cipherCBC128[] = { | ^~~~ do_test.h:80:22: warning: ‘ic’ defined but not used [-Wunused-variable] 80 | static unsigned char ic[] = { | ^~ do_test.h:68:22: warning: ‘key128’ defined but not used [-Wunused-variable] 68 | static unsigned char key128[] = { | ^~do_test.h:57:22: warning: ‘plain’ defined but not used [-Wunused-variable] 57 | static unsigned char plain[] = { | ^~~~~ do_test.h:50:22: warning: ‘hmac12’ defined but not used [-Wunused-variable] 50 | static unsigned char hmac12[] = { | ^~do_test.h:46:22: warning: ‘text’ defined but not used [-Wunused-variable] 46 | static unsigned char text[] = { | ^~~~ do_test.h:36:22: warning: ‘key’ defined but not used [-Wunused-variable] 36 | static unsigned char key[] = { | ^~~ make[1]: [