Closed mouse07410 closed 2 years ago
With workaround shown above, Cabal and Stack builds all pass tests:
$ stack test
. . .
All 1548 tests passed (16.48s)
cryptonite> Test suite test-cryptonite passed
Completed 2 action(s).
$
$ cabal test
. . .
Building test suite 'test-cryptonite' for cryptonite-0.29..
Linking /Users/ur20980/src/cryptonite/dist-newstyle/build/x86_64-osx/ghc-9.0.2/cryptonite-0.29/t/test-cryptonite/build/test-cryptonite/test-cryptonite ...
Running 1 test suites...
Test suite test-cryptonite: RUNNING...
Test suite test-cryptonite: PASS
Test suite logged to:
/Users/ur20980/src/cryptonite/dist-newstyle/build/x86_64-osx/ghc-9.0.2/cryptonite-0.29/t/test-cryptonite/test/cryptonite-0.29-test-cryptonite.log
1 of 1 test suites (1 of 1 test cases) passed.
I think that the PR linked above should resolve this issues (PR #359 ). If you could check that it works for you as well, that'd be great.
I confirm that the master builds successfully now, and passes the test. Thank you!
P.S. Now - to consider adding Post-Quantum algorithms from NIST PQC. My personal vote is on Lattice-based (Kyber, NTRU, Saber).
Ping... Any chance to see, e.g., Kyber added to cryptonite?
MacOS 11.6.2, Xcode-13.2.1.
Tried with Cabal-3.6.2.0 (GHC-9.0.1 and 9.0.2), and Stack-2.7.3 (GHC-8.10.7).
With Cabal, building tests fails:
WIth Stack, linking tests fails:
Would complete test log help? I'll post it if so.
Update
On newer Intel CPUs with extended instruction set, SSE gets turned on. Blake2 SSE code does not have the proper functions implemented, or doesn't name them properly - I did not dive into this.
Here's a workaround that makes all the tests run correctly even when you explicitly set
support_sse
toTrue
(I also had to bump GHC resolver/version for Stack, because my environment does not include GHC-8.6.5). Note: I had to replace reference to non-workingcbits/blake2/sse/blake2s.c
with one to workingbits/blake2/ref/blake2s-ref.c
.