pepper-project / pequin

A system for verifying outsourced computations, and applying SNARKs. Simplified release of the main Pepper codebase.
Other
122 stars 46 forks source link

I can't make "bin/pepper_prover_mm_pure_arith" in tutorial #14

Open SoraSuegami opened 6 years ago

SoraSuegami commented 6 years ago

I installed pequin and tried the tutorial in "GETTINGSTARTED.md". However, when executing "./pepper_compile_and_setup_V.sh mm_pure_arith mm_pure_arith.vkey mm_pure_arith.pkey", this error was thrown.

+ compiling common objs  

=== Compiling computation to constraints ===

  + compile apps/mm_pure_arith.c --metrics -b 0 -w 10240 -t ZAATAR -db-hash-func ggh -db-num-addresses 1024 -ram-cell-num-bits 32 -db-hash-n um-bits 1216 -db-thr-num-addresses-naive 32768 -fast-ram-address-width 32 -fast-ram-word-width 64 metric_num_lines_in_sfdl mm_pure_arith 46 metric_num_lines_in_source mm_pure_arith 46 make[1]: Entering directory '/root/pequin/compiler/frontend' ant compile Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar Buildfile: /root/pequin/compiler/frontend/build.xml

compile:

BUILD FAILED /root/pequin/compiler/frontend/build.xml:14: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "/usr/lib/jvm/java-8-openjdk-amd64/jre"

Total time: 0 seconds Makefile:38: recipe for target 'geninterp' failed make[1]: [geninterp] Error 1 make[1]: Leaving directory '/root/pequin/compiler/frontend' Error: Could not find or load main class zcc.ZCC Makefile:115: recipe for target 'bin/mm_pure_arith.params' failed make: [bin/mm_pure_arith.params] Error 1

========================================== ===== Running setup (key generation) =====

./pepper_compile_and_setup_V.sh: line 35: bin/pepper_verifier_mm_pure_arith: No such file or directory

Of course there were no file in pequin/pepper/bin. Please teach me how we can solve this problem. (English is not my native language, so please let me know if you can't understand my explanation.)

maxhowald commented 6 years ago

From the log you posted, it looks like there's something wrong with your java installation. What operating system are you using? What is the output of running:

javac -version

You might want to start by making sure that your system can compile simple java programs.

SoraSuegami commented 6 years ago

Oh, It worked! Thank you! I checked javac -version and installed openjdk-9-jdk-headless, then commands in tutorials worked very well. Finally, when executing "bin/pepper_verifier_mm_pure_arith verify mm_pure_arith.vkey mm_pure_arith.inputs mm_pure_arith.outputs mm_pure_arith.proof", it returned "VERIFICATION SUCCESSFUL"! I'm very happy😂 It was easy mistake. I'll be more careful. Thank you very much.