Giter VIP home page Giter VIP logo

Comments (6)

thomwiggers avatar thomwiggers commented on September 13, 2024

Hi, can you try just building the native libraries (so in this case crypto_kem/kyber512-90s/aarch64) in PQClean?

from pqcrypto.

rozbb avatar rozbb commented on September 13, 2024

Got it. The bug was simpler than expected: there simply is no kyber512-90s/aarch64 to speak of!

There's only clean and avx2 impls. So something in the build script is not checking whether the target exists.

from pqcrypto.

thomwiggers avatar thomwiggers commented on September 13, 2024

Ah, right! The code isn't detected but we have a Yaml file that keeps track of all the available implementations for which we need to generate code. Clearly I accidentally claimed support for Aarch64 for Kyber-90s, even though there was no implementation.

(If you need it, there's probably a reasonable way to patch the Kyber-aarch64 code in PQClean to use the 90s crypto and we would merge that PR)

from pqcrypto.

rjzak avatar rjzak commented on September 13, 2024

This issue seems to be unresolved, as I'm getting similar errors on freshly checkout code.

The following warnings were emitted during compilation:

warning: error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: can't open file: /Users/rjzak/Documents/Projects/Profian/pqcrypto/target/debug/build/pqcrypto-kyber-a38dc4006de060ee/out/libkyber512_clean.a (No such file or directory)
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed

error: failed to run custom build command for `pqcrypto-kyber v0.7.6 (/Users/rjzak/Documents/Projects/Profian/pqcrypto/pqcrypto-kyber)`

Caused by:
  process didn't exit successfully: `/Users/rjzak/Documents/Projects/Profian/pqcrypto/target/debug/build/pqcrypto-kyber-2c033184f04cff93/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("aarch64-apple-darwin")
  HOST = Some("aarch64-apple-darwin")
  AR_aarch64-apple-darwin = None
  AR_aarch64_apple_darwin = None
  HOST_AR = None
  AR = None
  running: "ar" "s" "/Users/rjzak/Documents/Projects/Profian/pqcrypto/target/debug/build/pqcrypto-kyber-a38dc4006de060ee/out/libkyber512_clean.a"
  cargo:warning=error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: can't open file: /Users/rjzak/Documents/Projects/Profian/pqcrypto/target/debug/build/pqcrypto-kyber-a38dc4006de060ee/out/libkyber512_clean.a (No such file or directory)
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed
  exit status: 1

  --- stderr


  error occurred: Command "ar" "s" "/Users/rjzak/Documents/Projects/Profian/pqcrypto/target/debug/build/pqcrypto-kyber-a38dc4006de060ee/out/libkyber512_clean.a" with args "ar" did not execute successfully (status code exit status: 1).

Looks like a .a file should be been created but wasn't, but I don't know what code was run to try to compile something.

from pqcrypto.

rjzak avatar rjzak commented on September 13, 2024

Seems to work, I had forgotten about the submodules (git submodule update --init).

I am confused though, as pgcrypto-kyber is a dependency of wasi-crypto, and wasi-crypto is a dependency of Wasmtime when compiling with cargo build --features wasi-crypto. Yet for some reason, it (compiling Wasmtime with Wasi-Crypto) works on Linux but fails on macOS with an error similar to one above. Maybe cargo isn't checking out the submodule used by a dependency as it should? But would it work on one OS but not the other?

from pqcrypto.

thomwiggers avatar thomwiggers commented on September 13, 2024

Okay there's not exactly enough information to go on here, and I don't really know how WASI works. I'm also afraid that I have time to get in to that I'm afraid.

However, if you or anyone else does manage to figure out what's going on with your problem there, I'm very welcoming to contributions that make the crates more reliable.

from pqcrypto.

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.