Closed DilanCaro closed 10 months ago
Hi,
This preset includes Assembly for Intel machines, so it will not work on the M1 without writing dedicated ASM. You can try downgrading the arithmetic backend to GMP, but that's about it. :(
Hi, thank you for your quick response and this great library. It is worth nothing that I was the library worked with default settings using x86_64 terminal using rosseta translation.
However, now I was able to get a macOS intel machine, the processes to install the presets seem to go further
MacOS Big Sur, 2.7 GHz Dual-Core Intel Core i5
Running
$../preset/x64-pbc-bls12-381.sh ../
$make
[ 72%] Building C object src/CMakeFiles/relic_s_type3.dir/low/gmp/relic_bn_add_low.c.o
clang: warning: optimization flag '-finline-small-functions' is not supported [-Wignored-optimization-argument]
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/gmp/relic_bn_add_low.c:43:19: warning: incompatible pointer types passing 'dig_t ' (aka 'unsigned long long ') to parameter of type 'mp_ptr' (aka 'unsigned long ') [-Wincompatible-pointer-types]
return mpn_add_1(c, a, size, digit);
More errors ...
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_inv_low.c:68:43: warning: incompatible pointer types passing 'const dig_t ' (aka 'const unsigned long long ') to parameter of type 'mp_srcptr' (aka 'const unsigned long ') [-Wincompatible-pointer-types]
mpn_tdiv_qr(u, c, 0, t, 2 * RLC_FP_DIGS, fp_prime_get(), RLC_FP_DIGS);
^~~~~~
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/include/relic_label.h:553:23: note: expanded from macro 'fp_prime_get'
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:57:1: error: unknown directive .hidden p1 ^ /Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:58:1: error: unknown directive .hidden p2
Sorry, but unfortunately I don't have an M1 machine to attempt to reproduce. It looks like the compiler toolchain does not support recursive Assembly macros, however.
Hello, I have tried installing the relic library with presets on an M1 ARM64 chip, running MacOS ventura 13.3.1 (a) , but I have not been able to. I tried the x64-pbc-bls12-381.sh preset., but after running the $make command , I get [ 0%] Built target arith_objs [ 0%] Building C object src/CMakeFiles/relic_s.dir/relic_err.c.o clang: warning: optimization flag '-finline-small-functions' is not supported [-Wignored-optimization-argument] // accompanied with a different type to pointers errors with the gmp library. Important to note , I was able to install the relic library with its defaults. I am trying to use the BLS12-P381 or any other curve with better security to run a bilinear pairing program . The default option is initialized with BN-P256 which is not secure enough for my purposes. Any help would be greatly appreciated.