Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal hardware instruction on Mac OS if using C++ witness calculator #31

Closed
alxkzmn opened this issue Jan 20, 2022 · 4 comments
Closed

Comments

@alxkzmn
Copy link

alxkzmn commented Jan 20, 2022

I was trying to follow the example from the official documentation https://docs.circom.io/getting-started/computing-the-witness/#computing-the-witness-with-c. I was able to compile the C++ witness calculator on Mac OS thanks to #12. However, when I tried to generate the witness I got an error:

zsh: illegal hardware instruction  ./circuit input.json witness.wtns

The code to reproduce the issue is in the repo: alxkzmn/zk-wordle@5690ffc

Steps to reproduce:

cd circuit_cpp
make
./circuit input.json witness.wtns
@lispc
Copy link
Contributor

lispc commented Feb 5, 2022

what is your CPU? both M1(even Rosetta2) and old x64 cpus are not supported. ADX and BMI2 cpu features needed in circom x64 assembly.

It is a tool used by myself to work with circom, here is the cpu detect part: https://github.com/fluidex/snarkit2/blob/70142d8bbc5ec79cfa6869205263ff77e8423975/src/witness_generator.ts#L119

@alxkzmn
Copy link
Author

alxkzmn commented Feb 5, 2022

I'm on x64 i7.

@alrubio
Copy link
Collaborator

alrubio commented Mar 10, 2022

Are you still having this problem? I've been able to run circuits on a Mac with x86_64 using PR #12 without errors.

@alrubio
Copy link
Collaborator

alrubio commented Mar 14, 2022

If there are no further comments, I'll proceed to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants