RubyCrypto / x25519

Public key cryptography library for Ruby providing the X25519 Diffie-Hellman function
https://cr.yp.to/ecdh.html
Other
46 stars 10 forks source link

Support for arm #28

Closed MadiZz closed 2 years ago

MadiZz commented 2 years ago

Currently trying to bundle on arm architecture fails.

Log:

current directory: /Users/user/.rvm/gems/ruby-2.6.3@app/gems/x25519-1.0.9/ext/x25519_precomputed
/Users/user/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20220301-87556-p5uwsb.rb extconf.rb
creating Makefile

current directory: /Users/user/.rvm/gems/ruby-2.6.3@app/gems/x25519-1.0.9/ext/x25519_precomputed
make "DESTDIR=" clean

current directory: /Users/user/.rvm/gems/ruby-2.6.3@app/gems/x25519-1.0.9/ext/x25519_precomputed
make "DESTDIR="
compiling cputest.c
clang: error: the clang compiler does not support '-march=haswell'
make: *** [cputest.o] Error 1

make failed, exit code 2
/Users/user/.rvm/gems/ruby-2.6.3@app/extensions/-darwin-20/2.6.0/x25519-1.0.9/gem_make.out
tarcieri commented 2 years ago

See #4

Charizard commented 2 years ago

@tarcieri I am getting this error on an M1 Mac with Monterey but not in an M1 with Big Sur.

@MadiZz Did you manage to get this working? Thanks!

tarcieri commented 2 years ago

I'm not sure how it could ever have been working given it's passing -march=haswell and trying to build code containing inline x86 assembly.

extconf.rb needs to detect it's being build on a non-x86 architecture and build the portable version only, which is what #4 is about.

tarcieri commented 2 years ago

Closing this in favor of #4.