zcash-hackworks / pay-to-sudoku

Pay for the solution to a sudoku puzzle with a zero-knowledge contingent payment
MIT License
99 stars 20 forks source link

Compile Error #1

Open babyhead opened 8 years ago

babyhead commented 8 years ago

OS: Ubuntu 14.04 ./get-libsnark fails with below errors g++ -o snark/lib.o snark/lib.cpp -c -g -Wall -Wextra -Wno-unused-parameter -std=c++11 -fPIC -Wno-unused-variable -I depinst/include -I depinst/include/libsnark -DUSE_ASM -DCURVE_ALT_BN128 In file included from depinst/include/libsnark/gadgetlib1/pb_variable.hpp:14:0, from depinst/include/libsnark/gadgetlib1/protoboard.hpp:16, from depinst/include/libsnark/gadgetlib1/gadget.hpp:11, from depinst/include/libsnark/gadgetlib1/gadgets/basic_gadgets.hpp:14, from snark/snark.hpp:1, from snark/lib.cpp:2: snark/gadget.tcc: In constructor ‘sudoku_encryption_key::sudoku_encryption_key(libsnark::protoboard&, unsigned int, libsnark::pb_variable_array&)’: snark/gadget.tcc:5:75: error: ‘annotation_prefix’ was not declared in this scope ) : gadget(pb, FMT(annotation_prefix, " sudoku_closure_gadget")), ^ depinst/include/libsnark/common/utils.hpp:46:26: note: in definition of macro ‘FMT’

define FMT(...) (UNUSED(VA_ARGS), "")

                      ^

snark/gadget.tcc: In constructor ‘sudoku_closure_gadget::sudoku_closure_gadget(libsnark::protoboard&, unsigned int, std::vectorlibsnark::pb_variable_array&)’: snark/gadget.tcc:99:75: error: ‘annotation_prefix’ was not declared in this scope ) : gadget(pb, FMT(annotation_prefix, " sudoku_closure_gadget")), ^ depinst/include/libsnark/common/utils.hpp:46:26: note: in definition of macro ‘FMT’

define FMT(...) (UNUSED(VA_ARGS), "")

                      ^

snark/gadget.tcc: In constructor ‘sudoku_cell_gadget::sudoku_cell_gadget(libsnark::protoboard&, unsigned int, libsnark::pb_linear_combination&)’: snark/gadget.tcc:131:75: error: ‘annotation_prefix’ was not declared in this scope ) : gadget(pb, FMT(annotation_prefix, " sudoku_cell_gadget")), ^ depinst/include/libsnark/common/utils.hpp:46:26: note: in definition of macro ‘FMT’

define FMT(...) (UNUSED(VA_ARGS), "")

                      ^

snark/gadget.tcc: In constructor ‘sudoku_gadget::sudoku_gadget(libsnark::protoboard&, unsigned int)’: snark/gadget.tcc:163:32: error: ‘annotation_prefix’ was not declared in this scope gadget(pb, FMT(annotation_prefix, " l_gadget")) ^ depinst/include/libsnark/common/utils.hpp:46:26: note: in definition of macro ‘FMT’

define FMT(...) (UNUSED(VA_ARGS), "")

                      ^

make: *\ [all] Error 1

andrewmilson commented 8 years ago

+1

nicola commented 7 years ago

same here!

lightning-li commented 7 years ago

@ebfull same error!!

nicola commented 7 years ago

ping @madars (?)

lightning-li commented 7 years ago

ping @ebfull

nicola commented 7 years ago

By looking at the code, I have a feeling that that is an old way to use libsnark

ebfull commented 7 years ago

Is this working now?

lightning-li commented 7 years ago

@ebfull It does not work. same error happened. Then I add "git checkout 0b928a7b36717db6f67ff7e1e34dfa3bfaee1c97" (old version of libsnark) in get-libsnark, it make successfully. but when i run "cargo run gen 2", it failed, error is "error: failed to run custom build command for unicase v1.2.1".

pay-to-sudoku
sgoldfed commented 7 years ago

@ebfull Any update on this? I got the same error.

3for commented 5 years ago

Replace annotation_prefix with this->annotation_prefix works.