scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.81k stars 579 forks source link

build fail archlinux #82

Closed nolash closed 7 years ago

nolash commented 7 years ago

The local install shell script executed without errors. But when trying to make libs or make install I get the error below. What am I missing, please?

Using:

[…]
g++ -o src/common/default_types/tinyram_ppzksnark_pp.o   src/common/default_types/tinyram_ppzksnark_pp.cpp -c -MMD -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=native -mtune=native -DUSE_ASM -DMONTGOMERY_OUTPUT -DCURVE_BN128 -Idepinst/include -Isrc -DBN_SUPPORT_SNARK -fPIC
In file included from src/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.hpp:682:0,
                 from src/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_gadget.hpp:1 ,
                 from src/gadgetlib1/gadgets/cpu_checkers/tinyram/tinyram_cpu_checker.hpp:19,
                 from src/relations/ram_computations/rams/tinyram/tinyram_params.hpp:17,
                 from src/common/default_types/tinyram_ppzksnark_pp.hpp:17,
                 from src/common/default_types/tinyram_ppzksnark_pp.cpp:12:
src/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc:29:10: error: ‘function’ in namespace ‘std’ does not name a template type
     std::function<T*
          ^~~~~~~~
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:227: src/common/default_types/tinyram_ppzksnark_pp.o] Error 1
madars commented 7 years ago

Whoops, there is #include <functional> missing in src/gadgetlib1/gadgets/cpu_checkers/tinyram/components/alu_arithmetic.tcc. This has been fixed on candidate-master branch.

nolash commented 7 years ago

Indeed! Thank you :)