Skip to content

u2f fails to build on macos #9

@Firstyear

Description

@Firstyear

commit 449b9e5 fails to build on macos with:

[william@amethyst 16:16] ~/development/tomu-chopstx-u2f/u2f I0> make

arm-none-eabi-gcc -c -mcpu=cortex-m0plus -O3 -Os -fstack-usage -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/u2f-apdu.lst -DMAKE_ENTRY_PUBLIC -DUSE_SYS3 -DFREE_STANDING -DMHZ=21 -DENFORCE_DEBUG_LOCK -mthumb -mno-thumb-interwork -DTHUMB -MD -MP -MF .dep/u2f-apdu.o.d -I. -I.. u2f-apdu.c -o build/u2f-apdu.o
u2f-apdu.c:101:21: error: 'ATTESTATION_DER_LEN' undeclared here (not in a function)
     uint8_t attCert[ATTESTATION_DER_LEN]; // Attestation certificate
                     ^~~~~~~~~~~~~~~~~~~
u2f-apdu.c: In function 'u2f_register':
u2f-apdu.c:337:26: error: 'attestation_der' undeclared (first use in this function)
   memcpy (resp->attCert, attestation_der, ATTESTATION_DER_LEN);
                          ^~~~~~~~~~~~~~~
u2f-apdu.c:337:26: note: each undeclared identifier is reported only once for each function it appears in
u2f-apdu.c:341:37: error: 'attestation_key' undeclared (first use in this function)
   if (ecdsa_sign_p256r1 (hash, sig, attestation_key))
                                     ^~~~~~~~~~~~~~~
u2f-apdu.c:352:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [build/u2f-apdu.o] Error 1

This appears to be a missing header file.

Other tomu examples and code builds (ie toboot, examples, quickstart). So I suspect there is a missing dependency for macos that provides the header, or there is an un-commited header that is required.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions