Comments (3)
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. :(
from relic.
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'
#define fp_prime_get RLC_PREFIX(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
:1:10: error: expected register here
movq 81((381/64+1)-1)(%rsi), %r10
^
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:88:2: note: while in macro instantiation
ADD1 1 ((381/64 + 1) - 1)
^
:3:17: error: expected register here
movq %r10, 81((381/64+1)-1)(%rdi)
^
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:88:2: note: while in macro instantiation
ADD1 1 ((381/64 + 1) - 1)
^
:4:7: error: unexpected token in '.if' directive
.if 1((381/64+1)-1) -
^
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:88:2: note: while in macro instantiation
ADD1 1 ((381/64 + 1) - 1)
^
:1:10: error: expected ')' in parentheses expression
movq 8*(1((381/64+1)-1) + 1)(%rsi), %r10
^
:5:3: note: while in macro instantiation
ADD1 "(1((381/64+1)-1) + 1)"
/Users/userbilinearity/Desktop/Bilinear Pairing/relic/src/low/x64-asm-6l/relic_fp_add_low.s:88:2: note: while in macro instantiation
ADD1 1 ((381/64 + 1) - 1)
^
:1:24: error: expected ')' in parentheses expression
movq 8*(((((((((((((((1((381/64+1)-1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1) + 1)(%rsi), %r10
make[2]: *** [src/CMakeFiles/relic_s_type3.dir/low/x64-asm-6l/relic_fp_add_low.s.o] Error 1
make[1]: *** [src/CMakeFiles/relic_s_type3.dir/all] Error 2
make: *** [all] Error 2
//
it seems to be the assembly code as well? Not sure,
Also tried
$../preset/gmp-pbc-bls381.sh ../
$make
[ 81%] Linking C static library ../lib/librelic_s_type3.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/librelic_s_type3.a(relic_dv_mem.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/librelic_s_type3.a(relic_dv_mem.c.o) has no symbols
[ 81%] Built target relic_s_type3
[ 82%] Building C object test/CMakeFiles/test_bn.dir/test_bn.c.o
[ 82%] Linking C executable ../bin/test_bn
clang: error: no such file or directory: 'Pairing/relic/src/low/gmp/'
make[2]: *** [bin/test_bn] Error 1
make[1]: *** [test/CMakeFiles/test_bn.dir/all] Error 2
make: *** [all] Error 2
Any help or guidance will be greatly appreciated.
from relic.
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.
from relic.
Related Issues (20)
- RISCV64 Support HOT 1
- How to convert a fp12_t value into bn_t HOT 6
- Error thrown in Optimal Ate Pairing HOT 2
- bench_rand.c not compiling with RAND=CALL HOT 1
- Error in the KSS-18-638 curve initialization function HOT 5
- Error in ep_param_set() HOT 8
- can not deduce the macro WSIZE on Apple M2 HOT 4
- BLS signatures with point compression HOT 2
- Want to use BN_254 curve HOT 1
- Build failure since recent commit HOT 1
- Compile failure on recent master HOT 4
- Compiling on M1 Mac HOT 1
- Compile Failue with x64-ecc-128 preset HOT 3
- cmake error the target not found HOT 2
- Homegaming HOT 1
- Leak the Secret Key of BBS Short Signature in Relic via Rowhammer HOT 4
- /demo/ers-etrs code running error HOT 3
- `bn_gcd_ext_binar` returns different Bezout coefficients HOT 2
- Problem while compiling HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relic.