dugrema / millegrilles.rpipico

0 stars 1 forks source link

build error #1

Closed abuvanth closed 1 year ago

abuvanth commented 1 year ago
/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:2: /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c: In function 'python_blake2bCompute': /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:10:28: error: passing argument 2 of 'mp_obj_new_exception_msg' makes pointer from integer without a cast [-Werror=int-conversion] 10 #define DIGEST_BLAKE2B_LEN 64 ^~
int
/Users/abu/millegrilles.rpipico/micropython/py/obj.h:316:35: note: in definition of macro 'MP_OBJ_TO_PTR' 316 #define MP_OBJ_TO_PTR(o) ((void *)o) ^ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:51:9: note: in expansion of macro 'nlr_raise' 51 nlr_raise(mp_obj_new_exception_msg(&mp_type_Exception, DIGEST_BLAKE2B_LEN)); ^~~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:51:64: note: in expansion of macro 'DIGEST_BLAKE2B_LEN' 51 nlr_raise(mp_obj_new_exception_msg(&mp_type_Exception, DIGEST_BLAKE2B_LEN)); ^~~~~~ In file included from /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:2: /Users/abu/millegrilles.rpipico/micropython/py/obj.h:967:86: note: expected 'mp_rom_error_text_t' {aka 'const char *'} but argument is of type 'int' 967 mp_obj_t mp_obj_new_exception_msg(const mp_obj_type_t *exc_type, mp_rom_error_text_t msg); ~~~~^~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c: In function 'python_x509_read_pem_certificate': /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:186:26: error: implicit declaration of function 'pemImportCertificate' [-Werror=implicit-function-declaration] 186 error_t res_import = pemImportCertificate(pem_bufinfo.buf, pem_bufinfo.len, &der, &output_len, &consumed); ^~~~~~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c: In function 'python_x509_valider_der_certificate': /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:232:25: error: implicit declaration of function 'x509ParseCertificate' [-Werror=implicit-function-declaration] 232 error_t res_parse = x509ParseCertificate(der_bufinfo.buf, der_bufinfo.len, &certInfo); ^~~~~~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:243:30: error: implicit declaration of function 'x509ValidateCertificate' [-Werror=implicit-function-declaration] 243 error_t res_validation = x509ValidateCertificate(&certInfo, &parent_certInfo, 0); ^~~~~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c: In function 'x509CertInfo_extension': /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:336:38: error: pointer targets in passing argument 1 of 'mp_obj_new_str' differ in signedness [-Werror=pointer-sign] 336 return mp_obj_new_str(ext->value, ext->valueLen); ~^~~~~
const uint8_t {aka const unsigned char }
In file included from /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:2: /Users/abu/millegrilles.rpipico/micropython/py/obj.h:945:37: note: expected 'const char ' but argument is of type 'const uint8_t ' {aka 'const unsigned char *'} 945 mp_obj_t mp_obj_new_str(const char *data, size_t len); // will check utf-8 (raises UnicodeError) ~~^~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c: In function 'python_x509_csr_new': /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:364:29: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Werror=int-conversion] 364 const char namedCurve = "Ed22519"; ^~~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:389:25: error: assignment to 'const uint8_t ' {aka 'const unsigned char '} from incompatible pointer type 'const uint8_t ()[3]' {aka 'const unsigned char ()[3]'} [-Werror=incompatible-pointer-types] 389 signatureAlgoId.oid = &ED25519_OID; ^ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:425:42: error: assignment to 'const uint8_t ' {aka 'const unsigned char '} from incompatible pointer type 'const uint8_t ()[3]' {aka 'const unsigned char ()[3]'} [-Werror=incompatible-pointer-types] 425 certReqInfo.subjectPublicKeyInfo.oid = &ED25519_OID; ^ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:430:58: error: pointer targets in assignment from 'const char ' to 'const uint8_t ' {aka 'const unsigned char *'} differ in signedness [-Werror=pointer-sign] 430 certReqInfo.subjectPublicKeyInfo.ecParams.namedCurve = &namedCurve; ^ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:434:52: error: assignment to 'const uint8_t ' {aka 'const unsigned char '} from incompatible pointer type 'uint8_t ()[32]' {aka 'unsigned char ()[32]'} [-Werror=incompatible-pointer-types] 434 certReqInfo.subjectPublicKeyInfo.ecPublicKey.q = &cle_publique; ^ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:521:37: error: passing argument 2 of 'mpiImport' from incompatible pointer type [-Werror=incompatible-pointer-types] 521 error = mpiImport(&publicKey.q, &cle_publique, ED25519_PUBLIC_KEY_LEN, MPI_FORMAT_LITTLE_ENDIAN); ^~~~~
uint8_t ()[32] {aka unsigned char ()[32]}

In file included from /Users/abu/millegrilles.rpipico/oryx-embedded/cyclone_crypto/ecc/ec_curves.h:36, from /Users/abu/millegrilles.rpipico/oryx-embedded/cyclone_crypto/ecc/ec.h:36, from /Users/abu/millegrilles.rpipico/oryx-embedded/cyclone_crypto/ecc/eddsa.h:36, from /Users/abu/millegrilles.rpipico/millegrilles/src/../../oryx-embedded/cyclone_crypto/ecc/ed25519.h:3, from /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:6: /Users/abu/millegrilles.rpipico/oryx-embedded/cyclone_crypto/mpi/mpi.h:105:42: note: expected 'const uint8_t ' {aka 'const unsigned char '} but argument is of type 'uint8_t ()[32]' {aka 'unsigned char ()[32]'} 105 | error_t mpiImport(Mpi r, const uint8_t data, uint_t length, MpiFormat format); | ~~~^~~~ /Users/abu/millegrilles.rpipico/millegrilles/src/oryx_crypto.c:543:13: error: implicit declaration of function 'x509CreateCsr' [-Werror=implicit-function-declaration] 543 | error = x509CreateCsr(NULL, NULL,

abuvanth commented 1 year ago

solution here - https://github.com/dugrema/millegrilles.rpipico/blob/master/info.txt