0

I am running a fresh install of Ubuntu Desktop 18.04 LTS, and I'm coming from the Windows side of the world.

I'm trying to create a new logical volume and use TPM and LUKS to secure it.

I'm following the instructions here, but I am getting errors when I run the ./configure command when installing tpm2-tss-1.2.0.

Where do I start with my troubleshooting? Here are the cryptic errors I'm getting:

`test -f 'tcti/tcti_socket.cpp' || echo './'`tcti/tcti_socket.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\"tpm2-tss\" -DPACKAGE_TARNAME=\"tpm2-tss\" -DPACKAGE_VERSION=\"1.2.0\" "-DPACKAGE_STRING=\"tpm2-tss 1.2.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DPACKAGE=\"tpm2-tss\" -DVERSION=\"1.2.0\" -I. -I./include -I./sysapi/include -Wall -Werror -Wformat -Wformat-security -fstack-protector-all -fpic -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-missing-braces -g -O2 -MT tcti/tcti_libtcti_socket_la-tcti_socket.lo -MD -MP -MF tcti/.deps/tcti_libtcti_socket_la-tcti_socket.Tpo -c tcti/tcti_socket.cpp  -fPIC -DPIC -o tcti/.libs/tcti_libtcti_socket_la-tcti_socket.o
In file included from ./include/sapi/tpm20.h:43:0,
                 from tcti/tcti_socket.cpp:31:
./include/sapi/implementation.h:159:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECDH_ZGen                     (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1271:23: note: in expansion of macro 'CC_ECDH_ZGen'
        + (ADD_FILL || CC_ECDH_ZGen)                  /* 0x00000154 */ \
                       ^~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:229:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_RSA_Decrypt                   (CC_YES*ALG_RSA)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1276:23: note: in expansion of macro 'CC_RSA_Decrypt'
        + (ADD_FILL || CC_RSA_Decrypt)                /* 0x00000159 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:158:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECDH_KeyGen                   (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1286:23: note: in expansion of macro 'CC_ECDH_KeyGen'
        + (ADD_FILL || CC_ECDH_KeyGen)                /* 0x00000163 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:230:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_RSA_Encrypt                   (CC_YES*ALG_RSA)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1303:23: note: in expansion of macro 'CC_RSA_Encrypt'
        + (ADD_FILL || CC_RSA_Encrypt)                /* 0x00000174 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:157:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECC_Parameters                (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1307:23: note: in expansion of macro 'CC_ECC_Parameters'
        + (ADD_FILL || CC_ECC_Parameters)             /* 0x00000178 */ \
                       ^~~~~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:149:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_Commit                        (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1326:23: note: in expansion of macro 'CC_Commit'
        + (ADD_FILL || CC_Commit)                     /* 0x0000018b */ \
                       ^~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:245:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ZGen_2Phase                   (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1328:23: note: in expansion of macro 'CC_ZGen_2Phase'
        + (ADD_FILL || CC_ZGen_2Phase)                /* 0x0000018d */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:246:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_EC_Ephemeral                  (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1329:23: note: in expansion of macro 'CC_EC_Ephemeral'
        + (ADD_FILL || CC_EC_Ephemeral)               /* 0x0000018e */ \
                       ^~~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1119:22: note: in expansion of macro 'MAX_CAP_CC'
  TPM_CC commandCodes[MAX_CAP_CC];  /* a list of command codesThe maximum only applies to a command code list in a command. The response size is limited only by the size of the parameter buffer.  */
                      ^~~~~~~~~~
./include/sapi/implementation.h:159:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECDH_ZGen                     (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1271:23: note: in expansion of macro 'CC_ECDH_ZGen'
        + (ADD_FILL || CC_ECDH_ZGen)                  /* 0x00000154 */ \
                       ^~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:229:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_RSA_Decrypt                   (CC_YES*ALG_RSA)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1276:23: note: in expansion of macro 'CC_RSA_Decrypt'
        + (ADD_FILL || CC_RSA_Decrypt)                /* 0x00000159 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:158:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECDH_KeyGen                   (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1286:23: note: in expansion of macro 'CC_ECDH_KeyGen'
        + (ADD_FILL || CC_ECDH_KeyGen)                /* 0x00000163 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:230:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_RSA_Encrypt                   (CC_YES*ALG_RSA)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1303:23: note: in expansion of macro 'CC_RSA_Encrypt'
        + (ADD_FILL || CC_RSA_Encrypt)                /* 0x00000174 */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:157:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ECC_Parameters                (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1307:23: note: in expansion of macro 'CC_ECC_Parameters'
        + (ADD_FILL || CC_ECC_Parameters)             /* 0x00000178 */ \
                       ^~~~~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:149:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_Commit                        (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1326:23: note: in expansion of macro 'CC_Commit'
        + (ADD_FILL || CC_Commit)                     /* 0x0000018b */ \
                       ^~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:245:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_ZGen_2Phase                   (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1328:23: note: in expansion of macro 'CC_ZGen_2Phase'
        + (ADD_FILL || CC_ZGen_2Phase)                /* 0x0000018d */ \
                       ^~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
./include/sapi/implementation.h:246:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
 #define  CC_EC_Ephemeral                  (CC_YES*ALG_ECC)
                                           ~~~~~~~^~~~~~~~~
./include/sapi/implementation.h:1329:23: note: in expansion of macro 'CC_EC_Ephemeral'
        + (ADD_FILL || CC_EC_Ephemeral)               /* 0x0000018e */ \
                       ^~~~~~~~~~~~~~~
./include/sapi/implementation.h:1338:6: note: in expansion of macro 'LIBRARY_COMMAND_ARRAY_SIZE'
     (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:46:34: note: in expansion of macro 'COMMAND_COUNT'
 #define    MAX_CAP_CC           (COMMAND_COUNT)
                                  ^~~~~~~~~~~~~
./include/sapi/tss2_tpm2_types.h:1125:28: note: in expansion of macro 'MAX_CAP_CC'
  TPMA_CC commandAttributes[MAX_CAP_CC];  /* a list of command codes attributes  */
                            ^~~~~~~~~~
cc1plus: all warnings being treated as errors
Makefile:4456: recipe for target 'tcti/tcti_libtcti_socket_la-tcti_socket.lo' failed
make: *** [tcti/tcti_libtcti_socket_la-tcti_socket.lo] Error 1

Errors like these are the things that have turned me off from running Linux on my main machine for all these years. I don't consider myself to have any real coding abilities.

  • See if it works using an older gcc/g++ version e.g. install the sudo apt install gcc-6 g++-6 and then make clean followed by ./configure CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6 – steeldriver Mar 3 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.