Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed on MacOS #8

Open
crackerli opened this issue Feb 22, 2021 · 0 comments
Open

Build failed on MacOS #8

crackerli opened this issue Feb 22, 2021 · 0 comments

Comments

@crackerli
Copy link

The failed info is below:

cc -Wall -Werror base10.c -c
cc -c -o base58.o base58.c
cc -c -o blake2b-ref.o blake2b-ref.c
cc -Wall -Werror sha256.c -c
cc -Wall -Werror crypto.c -c
cc -Wall -Werror pasta_fp.c -c
cc -Wall -Werror pasta_fq.c -c
cc -Wall -Werror poseidon.c -c
cc -Wall -Werror utils.c -c
cc -Wall -Werror curve_checks.c -c
cc -Wall -Werror reference_signer.c -o reference_signer base10.o base58.o blake2b-ref.o sha256.o crypto.o pasta_fp.o pasta_fq.o poseidon.o utils.o curve_checks.o -lm
cc -Wall -Werror unit_tests.c -o unit_tests base10.o base58.o blake2b-ref.o sha256.o crypto.o pasta_fp.o pasta_fq.o poseidon.o utils.o curve_checks.o -lm
unit_tests.c:99:41: error: implicit declaration of function 'htole64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
sprintf(&hex[16*(4 - i)], "%016lx", htole64(words[i - 1]));
^
unit_tests.c:99:41: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
sprintf(&hex[16*(4 - i)], "%016lx", htole64(words[i - 1]));
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
%016x
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), VA_ARGS)
^~~~~~~~~~~
unit_tests.c:103:46: error: implicit declaration of function 'htole64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
sprintf(&hex[64 + 16*(4 - i)], "%016lx", htole64(words[i - 1]));
^
unit_tests.c:103:46: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
sprintf(&hex[64 + 16*(4 - i)], "%016lx", htole64(words[i - 1]));
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
%016x
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), VA_ARGS)
^~~~~~~~~~~
unit_tests.c:199:12: error: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'Currency' (aka 'unsigned long long') [-Werror,-Wformat]
amount,
^~~~~~
unit_tests.c:200:12: error: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'Currency' (aka 'unsigned long long') [-Werror,-Wformat]
fee,
^~~
unit_tests.c:254:26: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printf("0x%016lx, ", x[i]);
~~~~~~ ^~~~
%016llx
unit_tests.c:264:26: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printf("0x%016lx, ", a->x[i]);
~~~~~~ ^~~~~~~
%016llx
unit_tests.c:269:26: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
printf("0x%016lx, ", a->y[i]);
~~~~~~ ^~~~~~~
%016llx
unit_tests.c:354:3: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
explicit_bzero(s0, sizeof(s0));
^
10 errors generated.
make: *** [unit_tests] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant