italia / cie-middleware-linux

Middleware della CIE (Carta di Identità Elettronica) per Linux
BSD 3-Clause "New" or "Revised" License
40 stars 12 forks source link

Errore build cie_sign_sdk su ARM #42

Open amusarra opened 2 years ago

amusarra commented 2 years ago

Sistema Operativo: 5.10.92-v8+ (Debian 11) Architettura: aarch64 CPU: BCM2835 (ARM) Raspberry Pi 4 Model B Rev 1.4
cmake: versione 3.18.4-2+rpt1+rpi1 g++: versione 10.2.1-1 pcsc-lite-ccid: versione 1.4.36


Ho provato a seguire il README per la build del progetto ma purtroppo sono stato subito bloccato dall'errore in fase di build del modulo cie_sign_sdk. L'errore accade a fronte del comando cmake --build build/. A seguire la sezione degli errori.

Scanning dependencies of target cie_sign_sdk
[  0%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/Base64.cpp.o
[  1%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/BigInteger.cpp.o
[  2%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/BigIntegerAlgorithms.cpp.o
[  3%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/BigIntegerUtils.cpp.o
[  4%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/BigUnsigned.cpp.o
[  5%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/BigUnsignedInABase.cpp.o
[  6%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/CIESigner.cpp.o
[  7%] Building C object CMakeFiles/cie_sign_sdk.dir/src/CIEEngine.c.o
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c: In function ‘cie_pkey_rsa_sign’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:280:29: warning: passing argument 2 of ‘makeDigestInfo’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  280 |     makeDigestInfo(md_type, tbs, tbslen, digestinfo, &digestinfolen);
      |                             ^~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:60:50: note: expected ‘unsigned char *’ but argument is of type ‘const unsigned char *’
   60 |     int makeDigestInfo(int algid, unsigned char* pbtDigest, size_t btDigestLen, unsigned char* pbtDigestInfo, size_t* pbtDigestInfoLen)
      |                                   ~~~~~~~~~~~~~~~^~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c: In function ‘cie_get_ec_key_method’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:348:54: warning: passing argument 4 of ‘EC_KEY_METHOD_set_sign’ from incompatible pointer type [-Wincompatible-pointer-types]
  348 |         EC_KEY_METHOD_set_sign(ops, orig_sign, NULL, &orig_sign);
      |                                                      ^~~~~~~~~~
      |                                                      |
      |                                                      int (**)(int,  const unsigned char *, int,  unsigned char *, unsigned int *, const BIGNUM *, const BIGNUM *, EC_KEY *) {aka int (**)(int,  const unsigned char *, int,  unsigned char *, unsigned int *, const struct bignum_st *, const struct bignum_st *, struct ec_key_st *)}
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/engine.h:22,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/CIEEngine.h:14,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:10:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/ec.h:1309:42: note: expected ‘ECDSA_SIG * (*)(const unsigned char *, int,  const BIGNUM *, const BIGNUM *, EC_KEY *)’ {aka ‘struct ECDSA_SIG_st * (*)(const unsigned char *, int,  const struct bignum_st *, const struct bignum_st *, struct ec_key_st *)’} but argument is of type ‘int (**)(int,  const unsigned char *, int,  unsigned char *, unsigned int *, const BIGNUM *, const BIGNUM *, EC_KEY *)’ {aka ‘int (**)(int,  const unsigned char *, int,  unsigned char *, unsigned int *, const struct bignum_st *, const struct bignum_st *, struct ec_key_st *)’}
 1309 |                             ECDSA_SIG *(*sign_sig)(const unsigned char *dgst,
      |                             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1310 |                                                    int dgst_len,
      |                                                    ~~~~~~~~~~~~~
 1311 |                                                    const BIGNUM *in_kinv,
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~
 1312 |                                                    const BIGNUM *in_r,
      |                                                    ~~~~~~~~~~~~~~~~~~~
 1313 |                                                    EC_KEY *eckey));
      |                                                    ~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c: In function ‘cie_engine_ctrl’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:425:55: warning: passing argument 2 of ‘d2i_X509’ from incompatible pointer type [-Wincompatible-pointer-types]
  425 |                 cie_x509_certificate = d2i_X509(NULL, &cie_certificate, cie_certlen);
      |                                                       ^~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       unsigned char **
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/objects.h:15,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/CIEEngine.h:13,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:10:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/asn1.h:231:58: note: expected ‘const unsigned char **’ but argument is of type ‘unsigned char **’
  231 |         type *d2i_##name(type **a, const unsigned char **in, long len); \
      |                                    ~~~~~~~~~~~~~~~~~~~~~~^~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/asn1.h:224:9: note: in expansion of macro ‘DECLARE_ASN1_ENCODE_FUNCTIONS’
  224 |         DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/asn1.h:217:39: note: in expansion of macro ‘DECLARE_ASN1_FUNCTIONS_name’
  217 | # define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/openssl/include/openssl/x509.h:552:1: note: in expansion of macro ‘DECLARE_ASN1_FUNCTIONS’
  552 | DECLARE_ASN1_FUNCTIONS(X509)
      | ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c: In function ‘cie_load_pubkey’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CIEEngine.c:472:12: warning: returning ‘int’ from a function with return type ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} makes pointer from integer without a cast [-Wint-conversion]
  472 |     return 1;
      |            ^
[  8%] Building C object CMakeFiles/cie_sign_sdk.dir/src/CIEEngineHelper.c.o
[  9%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/CertStore.cpp.o
[ 10%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/CounterSignatureGenerator.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/UUCByteArray.h:21,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/CounterSignatureGenerator.h:11,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CounterSignatureGenerator.cpp:10:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CounterSignatureGenerator.cpp: In member function ‘void CounterSignatureGenerator::toByteArray(UUCByteArray&)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:103:29: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  103 | #define szSignedDataOID     "1.2.840.113549.1.7.2"
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CounterSignatureGenerator.cpp:102:27: note: in expansion of macro ‘szSignedDataOID’
  102 |  CContentInfo contentInfo(szSignedDataOID, signedData);
      |                           ^~~~~~~~~~~~~~~
[ 11%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/SignatureGenerator.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/SignatureGenerator.h:3,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignatureGenerator.cpp:2:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignatureGenerator.cpp: In member function ‘virtual long int CSignatureGenerator::Generate(UUCByteArray&, BOOL, BOOL)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:98:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   98 | #define szDataOID      "1.2.840.113549.1.7.1"
      |                        ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignatureGenerator.cpp:402:28: note: in expansion of macro ‘szDataOID’
  402 |   CContentType contentType(szDataOID);
      |                            ^~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:103:29: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  103 | #define szSignedDataOID     "1.2.840.113549.1.7.2"
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignatureGenerator.cpp:423:27: note: in expansion of macro ‘szSignedDataOID’
  423 |  CContentInfo contentInfo(szSignedDataOID, *pSignedData);
      |                           ^~~~~~~~~~~~~~~
[ 12%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/LdapCrl.cpp.o
[ 13%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/M7MParser.cpp.o
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/M7MParser.cpp: In member function ‘int M7MParser::Load(const char*, int)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/M7MParser.cpp:71:17: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   71 |  char* toFind = "\r\n\r\n";
      |                 ^~~~~~~~~~
[ 14%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/PdfSignatureGenerator.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfSignatureGenerator.h:13,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/PdfSignatureGenerator.cpp:10:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:444:17: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  444 |     static std::auto_ptr<PdfFilter> Create( const EPdfFilter eFilter );
      |                 ^~~~~~~~
In file included from /usr/include/c++/10/memory:83,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:24,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfSignatureGenerator.h:13,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/PdfSignatureGenerator.cpp:10:
/usr/include/c++/10/bits/unique_ptr.h:57:28: note: declared here
   57 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
[ 15%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/PdfVerifier.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfVerifier.h:14,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/PdfVerifier.cpp:12:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:444:17: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  444 |     static std::auto_ptr<PdfFilter> Create( const EPdfFilter eFilter );
      |                 ^~~~~~~~
In file included from /usr/include/c++/10/memory:83,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:24,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfVerifier.h:14,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/PdfVerifier.cpp:12:
/usr/include/c++/10/bits/unique_ptr.h:57:28: note: declared here
   57 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
[ 16%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/SignedDataGeneratorEx.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/UUCByteArray.h:21,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/SignedDataGeneratorEx.h:11,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignedDataGeneratorEx.cpp:10:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignedDataGeneratorEx.cpp: In member function ‘void SignedDataGeneratorEx::toByteArray(UUCByteArray&)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:98:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   98 | #define szDataOID      "1.2.840.113549.1.7.1"
      |                        ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignedDataGeneratorEx.cpp:167:28: note: in expansion of macro ‘szDataOID’
  167 |   CContentType contentType(szDataOID);
      |                            ^~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:103:29: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  103 | #define szSignedDataOID     "1.2.840.113549.1.7.2"
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/SignedDataGeneratorEx.cpp:184:27: note: in expansion of macro ‘szSignedDataOID’
  184 |  CContentInfo contentInfo(szSignedDataOID, *pSignedData);
      |                           ^~~~~~~~~~~~~~~
[ 17%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/SignedDocument.cpp.o
[ 18%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/SignerInfoGenerator.cpp.o
[ 19%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/TSAClient.cpp.o
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/TSAClient.cpp: In constructor ‘CTSAClient::CTSAClient()’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/TSAClient.cpp:24:23: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
   24 |  m_szTSAUsername[0] = NULL;
      |                       ^~~~
[ 20%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/UUCLogger.cpp.o
[ 21%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/UUCProperties.cpp.o
[ 22%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/UUCStringTable.cpp.o
[ 23%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/UUCTextFileReader.cpp.o
[ 24%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/UUCTextFileWriter.cpp.o
[ 25%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/XAdESGenerator.cpp.o
[ 25%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/XAdESVerifier.cpp.o
[ 26%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/definitions.cpp.o
[ 27%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/disigonsdk.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfVerifier.h:14,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:11:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:444:17: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  444 |     static std::auto_ptr<PdfFilter> Create( const EPdfFilter eFilter );
      |                 ^~~~~~~~
In file included from /usr/include/c++/10/memory:83,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFilter.h:24,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfStream.h:27,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/base/PdfFileStream.h:26,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo-base.h:41,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/Dependencies/podofo/include/podofo/podofo.h:34,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/PdfVerifier.h:14,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:11:
/usr/include/c++/10/bits/unique_ptr.h:57:28: note: declared here
   57 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:21: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                     ^~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:35: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                   ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:47: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                               ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:59: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                                           ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:71: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                                                       ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:83: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                                                                   ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:117:95: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  117 | char* FILETYPE[] = {"PKCS7 file", "PDF file", "M7M file", "TSR file", "TST file", "TSD file", "XML file"};
      |                                                                                               ^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘long int disigon_set_int(int, int)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:155:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  155 |     return disigon_set(option, (void*)value);
      |                                ^~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘void* disigon_sign_init()’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:191:34: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
  191 |     pContext->szPdfLocation[0] = NULL;
      |                                  ^~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:192:32: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
  192 |     pContext->szPdfReason[0] = NULL;
      |                                ^~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:193:30: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
  193 |     pContext->szPdfName[0] = NULL;
      |                              ^~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:194:26: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
  194 |     pContext->szPIN[0] = NULL;
      |                          ^~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘long int disigon_sign_set_int(DISIGON_CTX, int, int)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:234:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  234 |     return disigon_sign_set(ctx, option, (void*)value);
      |                                          ^~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘long int disigon_verify_set_int(DISIGON_CTX, int, int)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:635:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  635 |     return disigon_verify_set(ctx, option, (void*)value);
      |                                            ^~~~~~~~~~~~
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/include/disigonsdk.h:21,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:6:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘long int disigon_verify_cleanup_result(VERIFY_RESULT*)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:853:83: warning: deleting ‘void*’ is undefined [-Wdelete-incomplete]
  853 |                 SAFEDELETE(pVerifyResult->verifyInfo.pSignerInfos->pSignerInfo[i].pTimeStamp);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:139:56: note: in definition of macro ‘SAFEDELETE’
  139 | #define SAFEDELETE(pointer) try { if(pointer) { delete pointer; pointer = NULL;}} catch(...) {}
      |                                                        ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp: In function ‘long int verify_xml(DISIGON_VERIFY_CONTEXT*, VERIFY_INFO*)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/disigonsdk.cpp:1080:33: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
 1080 |         pSI->szSigningTime[0] = NULL;
      |                                 ^~~~
[ 28%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1BitString.cpp.o
[ 29%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Boolean.cpp.o
[ 30%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1GenericSequence.cpp.o
[ 31%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Integer.cpp.o
[ 32%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Null.cpp.o
[ 33%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Object.cpp.o
[ 34%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1ObjectIdentifier.cpp.o
[ 35%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Octetstring.cpp.o
[ 36%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1OptionalField.cpp.o
[ 37%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Sequence.cpp.o
[ 38%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1Setof.cpp.o
[ 39%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ASN1UTCTime.cpp.o
[ 40%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/AlgorithmIdentifier.cpp.o
[ 41%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/Certificate.cpp.o
[ 42%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/CertificateInfo.cpp.o
[ 43%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ContentInfo.cpp.o
[ 44%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/ContentType.cpp.o
[ 45%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/Crl.cpp.o
[ 46%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/DigestInfo.cpp.o
[ 47%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/IssuerAndSerialNumber.cpp.o
[ 48%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/Name.cpp.o
[ 49%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/OCSPRequest.cpp.o
[ 50%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/PKIStatusInfo.cpp.o
[ 50%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/RSAPrivateKey.cpp.o
[ 51%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/RSAPublicKey.cpp.o
[ 52%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/RelativeDistinguishedName.cpp.o
[ 53%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/SignedData.cpp.o
[ 54%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/SignerInfo.cpp.o
[ 55%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/SubjectPublicKeyInfo.cpp.o
[ 56%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/TSTInfo.cpp.o
[ 57%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/TimeStampData.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/ASN1Object.h:5,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/ASN1GenericSequence.h:5,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/ASN1Sequence.h:5,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/ContentInfo.h:5,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/TimeStampToken.h:15,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/TimeStampData.h:10,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/TimeStampData.cpp:61:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/TimeStampData.cpp: In constructor ‘CTimeStampData::CTimeStampData(UUCByteArray&, CTimeStampToken&)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:114:31: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  114 | #define szTimeStampDataOID    "1.2.840.113549.1.9.16.1.31"
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/ASN1/TimeStampData.cpp:80:29: note: in expansion of macro ‘szTimeStampDataOID’
   80 | : CContentInfo(CContentType(szTimeStampDataOID))
      |                             ^~~~~~~~~~~~~~~~~~
[ 58%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/TimeStampRequest.cpp.o
[ 59%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/TimeStampResponse.cpp.o
[ 60%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/TimeStampToken.cpp.o
[ 61%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/UUCBufferedReader.cpp.o
[ 62%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/ASN1/UUCByteArray.cpp.o
[ 63%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/desc.c.o
[ 64%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/nn.c.o
[ 65%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/r_encode.c.o
[ 66%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/r_stdlib.c.o
[ 67%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/rc2.c.o
[ 68%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/rsa.c.o
[ 69%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/sha1.c.o
[ 70%] Building C object CMakeFiles/cie_sign_sdk.dir/src/RSA/sha2.c.o
[ 71%] Building CXX object CMakeFiles/cie_sign_sdk.dir/src/CSP/IAS.cpp.o
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/Token.h:9,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.h:2,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:1:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:9:14: error: expected ‘)’ before ‘CLA’
    9 |  APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData,uint8_t LE);
      |      ~       ^~~~
      |              )
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:10:14: error: expected ‘)’ before ‘CLA’
   10 |  APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData);
      |      ~       ^~~~
      |              )
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:11:14: error: expected ‘)’ before ‘CLA’
   11 |  APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LE);
      |      ~       ^~~~
      |              )
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:12:14: error: expected ‘)’ before ‘CLA’
   12 |  APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2);
      |      ~       ^~~~
      |              )
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:15:2: error: ‘uint8_t’ does not name a type
   15 |  uint8_t btINS; //INS dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:16:2: error: ‘uint8_t’ does not name a type
   16 |  uint8_t btCLA; //CLA dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:17:2: error: ‘uint8_t’ does not name a type
   17 |  uint8_t btP1; //P1 dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:18:2: error: ‘uint8_t’ does not name a type
   18 |  uint8_t btP2; //P2 dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:19:2: error: ‘uint8_t’ does not name a type
   19 |  uint8_t btLC; //LC dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:21:2: error: ‘uint8_t’ does not name a type
   21 |  uint8_t *pbtData; //campo dati dell'APDU
      |  ^~~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/APDU.h:22:2: error: ‘uint8_t’ does not name a type
   22 |  uint8_t btLE; //flag: LE � da includere? (caso 2 e 4)
      |  ^~~~~~~
In file included from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/../Util/util.h:4,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/../Util/SyncroMutex.h:2,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/../PCSC/Token.h:10,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.h:2,
                 from /home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:1:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp: In member function ‘void IAS::readfile(uint16_t, ByteDynArray&)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:51:29: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)(id >> 8))) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   51 |  #define HIBYTE(l) (l >> 8) & 0xFF
      |                    ~~~~~~~~~^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:170:23: note: in expansion of macro ‘HIBYTE’
  170 |  uint8_t fileId[] = { HIBYTE(id), LOBYTE(id) };
      |                       ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:50:22: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)id)) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   50 |  #define LOBYTE(l) l & 0xFF
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:170:35: note: in expansion of macro ‘LOBYTE’
  170 |  uint8_t fileId[] = { HIBYTE(id), LOBYTE(id) };
      |                                   ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:51:29: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)(cnt >> 8))) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   51 |  #define HIBYTE(l) (l >> 8) & 0xFF
      |                    ~~~~~~~~~^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:180:38: note: in expansion of macro ‘HIBYTE’
  180 |   uint8_t readFile[] = { 0x00, 0xb0, HIBYTE(cnt), LOBYTE(cnt) };
      |                                      ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:50:22: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)cnt)) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   50 |  #define LOBYTE(l) l & 0xFF
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:180:51: note: in expansion of macro ‘LOBYTE’
  180 |   uint8_t readFile[] = { 0x00, 0xb0, HIBYTE(cnt), LOBYTE(cnt) };
      |                                                   ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp: In member function ‘void IAS::readfile_SM(uint16_t, ByteDynArray&)’:
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:51:29: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)(id >> 8))) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   51 |  #define HIBYTE(l) (l >> 8) & 0xFF
      |                    ~~~~~~~~~^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:210:23: note: in expansion of macro ‘HIBYTE’
  210 |  uint8_t fileId[] = { HIBYTE(id), LOBYTE(id) };
      |                       ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:50:22: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)id)) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   50 |  #define LOBYTE(l) l & 0xFF
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:210:35: note: in expansion of macro ‘LOBYTE’
  210 |  uint8_t fileId[] = { HIBYTE(id), LOBYTE(id) };
      |                                   ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:51:29: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)(cnt >> 8))) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   51 |  #define HIBYTE(l) (l >> 8) & 0xFF
      |                    ~~~~~~~~~^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:220:38: note: in expansion of macro ‘HIBYTE’
  220 |   uint8_t readFile[] = { 0x00, 0xb0, HIBYTE(cnt), LOBYTE(cnt) };
      |                                      ^~~~~~
/home/amusarra/cie-middleware-linux/cie_sign_sdk/include/definitions.h:50:22: warning: narrowing conversion of ‘(int)(((short unsigned int)((int)cnt)) & 255)’ from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} [-Wnarrowing]
   50 |  #define LOBYTE(l) l & 0xFF
/home/amusarra/cie-middleware-linux/cie_sign_sdk/src/CSP/IAS.cpp:220:51: note: in expansion of macro ‘LOBYTE’
  220 |   uint8_t readFile[] = { 0x00, 0xb0, HIBYTE(cnt), LOBYTE(cnt) };
      |                                                   ^~~~~~
gmake[2]: *** [CMakeFiles/cie_sign_sdk.dir/build.make:1031: CMakeFiles/cie_sign_sdk.dir/src/CSP/IAS.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/cie_sign_sdk.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

Ho seguito pedissequamente il README e mi aspettavo che andasse tutto liscio. Potreste fare delle verifiche.

Grazie.

giovannicandotti commented 1 year ago

stesso problema, risolto aggiungendo

include \<cstdin>

in cie_sign_sdk/src/PCSC/APDU.h Testato su Ubuntu 22.04 tramite Parallels, su Mac M1.

amusarra commented 1 year ago

Ciao @giovannicandotti ottimo. Su processori ARM come quello indicato nella issue (BCM2835) il problema persiste anche perché di altra natura.

amusarra commented 1 year ago

Ciao @giovannicandotti Sul tema ARM/RPI avevo aperto un thread su Forum Italia https://forum.italia.it/t/compilazione-cie-middleware-linux-su-raspberry-pi/28942