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

Build faild on macos m2max cmd :circom fibonacci.circom --r1cs --wasm --sym #280

Open
lipangit opened this issue Jul 28, 2024 · 1 comment

Comments

@lipangit
Copy link

pragma circom 2.0.6;
template fibonacci(n) {
signal input fib1;
signal input fib2;
signal output fibn;
var a = fib1;
var b = fib2;
var c;
for (var i = 2; i[angle brackets]n; i++) {
c = a + b;
a = b;
b = c;
}
// Set the output
fibn [angle brackets]== c * fib1;
log();
}
component main = fibonacci(1000);

log :
Error: Parse error on line 1:
pragma circom 2.0.6;template fibon
----------------^
Expecting 'EOF', 'function', 'IDENTIFIER', '(', ')', 'template', ',', 'if', 'else', 'for', ';', 'while', 'do', 'compute', 'return', 'include', '{', '}', '==>', '-->', '===', '?', ':', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<', '>', '<<', '>>', '+', '-', '', '/', '\', '%', '**', '++', '--', '!', '~', 'DECNUMBER', 'HEXNUMBER', 'var', 'signal', 'component', '[', ']', got '.'
at Parser.parseError (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/parser/jaz.js:620:21)
at Parser.parse (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/parser/jaz.js:687:22)
at constructionPhase (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/src/construction_phase.js:79:22)
at compile (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/src/compiler.js:71:5)
at run (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/cli.js:119:11)
at Object. (/Users/lipan/.nvm/versions/node/v18.20.3/lib/node_modules/circom/cli.js:140:1)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
Parse error on line 1:
pragma circom 2.0.6;template fibon
----------------^
Expecting 'EOF', 'function', 'IDENTIFIER', '(', ')', 'template', ',', 'if', 'else', 'for', ';', 'while', 'do', 'compute', 'return', 'include', '{', '}', '==>', '-->', '===', '?', ':', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<', '>', '<<', '>>', '+', '-', '
', '/', '\', '%', '**', '++', '--', '!', '~', 'DECNUMBER', 'HEXNUMBER', 'var', 'signal', 'component', '[', ']', got '.'

I can not build any circom file on my computer, quick start can not build, remix.ethereum.org works well.

@lishiqian2333
Copy link

I removed the first line and it compiled:
“pragma circom 2.0.6;”
But after deleting it and compiling again no corresponding js file is generated

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

2 participants