tpm2-pk11
tpm2-pk11 copied to clipboard
Compilation error: duplicate case value
I checked out the latest master branch and compilation (with make
) fails with:
/opt/tpm2-pk11/src/sessions.c:58:5: error: duplicate case value
case TPM_TYPE_SOCKET:
^
/opt/tpm2-pk11/src/sessions.c:53:5: error: previously used here
case TPM_TYPE_SOCKET:
^
/opt/tpm2-pk11/src/sessions.c:59:12: warning: implicit declaration of function ‘Tss2_Tcti_Mssim_Init’ [-Wimplicit-function-declaration]
rc = Tss2_Tcti_Mssim_Init(NULL, &size, NULL);
^
/opt/tpm2-pk11/src/sessions.c:99:5: error: duplicate case value
case TPM_TYPE_SOCKET:
^
/opt/tpm2-pk11/src/sessions.c:93:5: error: previously used here
case TPM_TYPE_SOCKET:
^
CMakeFiles/tpm2-pk11.dir/build.make:230: recipe for target 'CMakeFiles/tpm2-pk11.dir/src/sessions.c.o' failed
make[2]: *** [CMakeFiles/tpm2-pk11.dir/src/sessions.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tpm2-pk11.dir/all' failed
make[1]: *** [CMakeFiles/tpm2-pk11.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error
Is this a configuration error of mine or a bug?
Edit: Regarding my build environment:
- Ubuntu 16.04.4 xenial
- C compiler: /usr/bin/cc (also tried clang-3.8, same error)
- cmake 3.5.1
- make 4.1