This is caused by the fact that ARM Macs aren't in the ASM_TARGETS list
--- stderr
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:21:1: error: unknown directive
.hidden GFp_aes_hw_set_encrypt_key
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:22:1: error: unknown directive
.type GFp_aes_hw_set_encrypt_key,%function
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:186:1: error: unknown directive
.size GFp_aes_hw_set_encrypt_key,.-GFp_aes_hw_set_encrypt_key
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:188:1: error: unknown directive
.hidden GFp_aes_hw_encrypt
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:189:1: error: unknown directive
.type GFp_aes_hw_encrypt,%function
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:216:1: error: unknown directive
.size GFp_aes_hw_encrypt,.-GFp_aes_hw_encrypt
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:218:1: error: unknown directive
.hidden GFp_aes_hw_decrypt
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:219:1: error: unknown directive
.type GFp_aes_hw_decrypt,%function
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:246:1: error: unknown directive
.size GFp_aes_hw_decrypt,.-GFp_aes_hw_decrypt
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:248:1: error: unknown directive
.hidden GFp_aes_hw_ctr32_encrypt_blocks
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:249:1: error: unknown directive
.type GFp_aes_hw_ctr32_encrypt_blocks,%function
^
/Users/ahmedghoneim/personal/ring/target/release/build/ring-ad93e0a461882550/out/aesv8-armx-linux64.S:428:1: error: unknown directive
.size GFp_aes_hw_ctr32_encrypt_blocks,.-GFp_aes_hw_ctr32_encrypt_blocks
^
I have a fix, but I need access to push a new branch to the repo :)
Jeremy Soller (b9352ddb) at 17 Mar 20:36
Use /dev/urandom for SecureRandom on Redox
Jeremy Soller (d4319b88) at 11 Aug 14:41
Add redox to LINUX_ABI
Jeremy Soller (c7de589d) at 10 Aug 22:06
Ignore compiler warnings
Jeremy Soller (1e177479) at 10 Aug 22:00
This fixes problems reported here: redox#1342
Tested OK with x86_64-unknown-redox and manual edits to various Cargo.toml files that relied on ring.
Ideally this should be force pushed as a branch with the same redox-unix-0.13.5 name so everything dependent on this works without mods.
Jeremy Soller (8b7dd0d4) at 10 Aug 22:00
Jeremy Soller (4b4bdfb1) at 10 Aug 21:59
Use /dev/urandom for SecureRandom on Redox
Actually - while this change would be nice, it doesn't properly fix the compilation errors...
I've fixed the compilation editors in MR !3 and hope those help.
On GCC, a compiler error occurs due to a mismatch between curve25519.c and internal.h. The function prototypes use a[32] and *s, respectively, whereas the functions themselves reverse this (*a, s[32]). This patch updates the function signatures to match their prototypes.
Error from compilation:
--- stderr
third_party/fiat/curve25519.c:1877:61: error: argument 2 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Werror=array-parameter=]
1877 | void GFp_x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t *a) {
| ~~~~~~~~~~~~~~~^
In file included from third_party/fiat/curve25519.c:43:
third_party/fiat/internal.h:129:60: note: previously declared as an array ‘const uint8_t[32]’ {aka ‘const unsigned char[32]’}
129 | void GFp_x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]);
| ~~~~~~~~~~~~~~^~~~~
third_party/fiat/curve25519.c:3013:36: error: argument 1 of type ‘uint8_t[32]’ {aka ‘unsigned char[32]’} with mismatched bound [-Werror=array-parameter=]
3013 | void GFp_x25519_fe_tobytes(uint8_t s[32], const fe *h) {
| ~~~~~~~~^~~~~
In file included from third_party/fiat/curve25519.c:43:
third_party/fiat/internal.h:124:37: note: previously declared as ‘uint8_t *’ {aka ‘unsigned char *’}
124 | void GFp_x25519_fe_tobytes(uint8_t *s, const fe *h);
| ~~~~~~~~~^
cc1: all warnings being treated as errors
thread 'main' panicked at 'execution failed', /home/amy/.cargo/git/checkouts/ring-673443d3342e1630/e10e9b8/build.rs:644:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
On GCC, a compiler error occurs due to a mismatch between curve25519.c and internal.h. The function prototypes use a[32] and *s, respectively, whereas the functions themselves reverse this (*a, s[32]). This patch updates the function signatures to match their prototypes.
Error from compilation:
--- stderr
third_party/fiat/curve25519.c:1877:61: error: argument 2 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Werror=array-parameter=]
1877 | void GFp_x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t *a) {
| ~~~~~~~~~~~~~~~^
In file included from third_party/fiat/curve25519.c:43:
third_party/fiat/internal.h:129:60: note: previously declared as an array ‘const uint8_t[32]’ {aka ‘const unsigned char[32]’}
129 | void GFp_x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]);
| ~~~~~~~~~~~~~~^~~~~
third_party/fiat/curve25519.c:3013:36: error: argument 1 of type ‘uint8_t[32]’ {aka ‘unsigned char[32]’} with mismatched bound [-Werror=array-parameter=]
3013 | void GFp_x25519_fe_tobytes(uint8_t s[32], const fe *h) {
| ~~~~~~~~^~~~~
In file included from third_party/fiat/curve25519.c:43:
third_party/fiat/internal.h:124:37: note: previously declared as ‘uint8_t *’ {aka ‘unsigned char *’}
124 | void GFp_x25519_fe_tobytes(uint8_t *s, const fe *h);
| ~~~~~~~~~^
cc1: all warnings being treated as errors
thread 'main' panicked at 'execution failed', /home/amy/.cargo/git/checkouts/ring-673443d3342e1630/e10e9b8/build.rs:644:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This fixes problems reported here: redox#1342
Tested OK with x86_64-unknown-redox and manual edits to various Cargo.toml files that relied on ring.
Ideally this should be force pushed as a branch with the same redox-unix-0.13.5 name so everything dependent on this works without mods.
Robin Randhawa (8b7dd0d4) at 16 Jul 18:16
Remove special casing for Redox, as it is now supported by Unix tar...
... and 1466 more commits
cc
warnings are errors by default when using git.
This could solve issue #1342 on main redox repo.