Giter Club home page Giter Club logo

Comments (10)

wbharding avatar wbharding commented on May 21, 2024 1

Well that fixed it proper quick. Thanks for the legendary response time! Next time I'll Google the version history first 😄

from argon2-kdf.

ankane avatar ankane commented on May 21, 2024

Hey @hcatlin, thanks for reporting. I tried adding support on master, but don't have an M1 to test. Can you follow the instructions here and try running the tests with and without Rosetta 2? (want to make sure it works with both)

from argon2-kdf.

ankane avatar ankane commented on May 21, 2024

Sorry for the noise. Moved it to a branch for now. The mac-arm64 branch includes a separate shared library for arm64 and the mac-universal branch includes a universal shared library that should work for both (not sure which approach to take yet). You can test them both with:

git clone https://github.com/ankane/argon2-kdf.git
cd argon2-kdf
bundle install

git checkout mac-arm64
bundle exec rake vendor:mac
bundle exec rake test

git checkout mac-universal
bundle exec rake vendor:mac
bundle exec rake test

from argon2-kdf.

HamptonMakes avatar HamptonMakes commented on May 21, 2024

Both were fabulous runs!

hcatlin@Hamptons-MacBook-Air argon2-kdf % git checkout mac-arm64
Branch 'mac-arm64' set up to track remote branch 'mac-arm64' from 'origin'.
Switched to a new branch 'mac-arm64'
hcatlin@Hamptons-MacBook-Air argon2-kdf % bundle exec rake vendor:mac
Downloading libargon2.dylib...
Saved vendor/libargon2.dylib
Downloading libargon2.arm64.dylib...
Saved vendor/libargon2.arm64.dylib
hcatlin@Hamptons-MacBook-Air argon2-kdf % bundle exec rake test
Run options: --seed 39033

# Running:

.........

Fabulous run in 0.584312s, 15.4027 runs/s, 23.9598 assertions/s.

9 runs, 14 assertions, 0 failures, 0 errors, 0 skips
hcatlin@Hamptons-MacBook-Air argon2-kdf % git checkout mac-universal
Branch 'mac-universal' set up to track remote branch 'mac-universal' from 'origin'.
Switched to a new branch 'mac-universal'
hcatlin@Hamptons-MacBook-Air argon2-kdf % bundle exec rake vendor:mac
bundle exec rake test
Downloading libargon2.universal.dylib...
Saved vendor/libargon2.universal.dylib
Run options: --seed 21

# Running:

.........

Fabulous run in 0.540578s, 16.6488 runs/s, 25.8982 assertions/s.

9 runs, 14 assertions, 0 failures, 0 errors, 0 skips```

from argon2-kdf.

HamptonMakes avatar HamptonMakes commented on May 21, 2024

Oh, and I ran the universal build in Rosetta 2.

Downloading libargon2.universal.dylib...
Saved vendor/libargon2.universal.dylib
>% arch -x86_64 rake test      
Run options: --seed 29031

# Running:

.........

Fabulous run in 0.524818s, 17.1488 runs/s, 26.6759 assertions/s.

9 runs, 14 assertions, 0 failures, 0 errors, 0 skips```

from argon2-kdf.

ankane avatar ankane commented on May 21, 2024

Great, thanks @hcatlin! Can you try running the mac-arm64 branch with Rosetta 2? Also, can you share the output of the following with and without Rosetta 2?

ruby -e "puts RbConfig::CONFIG['arch']"

(trying to understand how it affects Ruby, if at all)

from argon2-kdf.

HamptonMakes avatar HamptonMakes commented on May 21, 2024
Your branch is up to date with 'origin/mac-arm64'.
>% rake vendor:mac
Downloading libargon2.dylib...
Saved vendor/libargon2.dylib
Downloading libargon2.arm64.dylib...
Saved vendor/libargon2.arm64.dylib
>% arch -x86_64 rake test  
Run options: --seed 33246

# Running:

.........

Fabulous run in 0.595237s, 15.1200 runs/s, 23.5200 assertions/s.

9 runs, 14 assertions, 0 failures, 0 errors, 0 skips

And then, on the arch tests for Ruby... my ruby is compiled for arm64, so here is showing the rosetta and non-rosetta runs, plus your requested outputs

>% arch -x86_64 ruby -e "puts RbConfig::CONFIG['arch']"
arch: posix_spawnp: ruby: Bad CPU type in executable
>% ruby -e "puts RbConfig::CONFIG['arch']"
arm64-darwin20

from argon2-kdf.

ankane avatar ankane commented on May 21, 2024

Great, thanks again @hcatlin. Just pushed a new release. Decided to go with separate shared libraries for now (instead of universal), as keeping them separate makes building simpler (and there doesn't seem to be much benefit to combining them).

from argon2-kdf.

wbharding avatar wbharding commented on May 21, 2024

Are there any install options needed when installing the gem to ensure the arm64 version of libargon2.dylib is picked over the x86_64 version? My M1 Mac is currently protesting

dlopen(~/.rvm/gems/ruby-2.6.9@gitclear/gems/argon2-kdf-0.1.6/vendor/libargon2.dylib, 0x0009): tried: '~/.rvm/gems/ruby-2.6.9@gitclear/gems/argon2-kdf-0.1.6/vendor/libargon2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

My ruby -v is

ruby 2.6.9p207 (2021-11-24 revision 67954) [arm64-darwin21]

So it seems I'm missing something about how to install argon2-kdf 0.1.6 such that the arm64 libargon2.dylib is selected...any tips would be much appreciated. 🙏 I'll update my post if I figure this out myself.

To answer a Q from a prior message in this thread, my ruby -e "puts RbConfig::CONFIG['arch']" is arm64-darwin21

from argon2-kdf.

ankane avatar ankane commented on May 21, 2024

Hey @wbharding, try 0.1.7 (#6).

from argon2-kdf.

Related Issues (5)

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.