Giter VIP home page Giter VIP logo

Comments (3)

dfaranha avatar dfaranha commented on July 19, 2024

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.

DilanCaro avatar DilanCaro commented on July 19, 2024

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, 8
1((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.

dfaranha avatar dfaranha commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.