ZenGo-X / class

Rust library for building IQC: cryptography based on class groups of imaginary quadratic orders
GNU General Public License v3.0
63 stars 31 forks source link

build error #25

Closed kigawas closed 4 years ago

kigawas commented 4 years ago
Compiling class_group v0.1.4 (/home/kigawas/class-groups)
error: failed to run custom build command for `class_group v0.1.4 (/home/kigawas/class-groups)`

Caused by:
  process didn't exit successfully: `/home/kigawas/class-groups/target/debug/build/class_group-92000dd62ca4c66a/build-script-build` (exit code: 101)
--- stderr
wrapper.h:2:10: fatal error: 'pari/pari.h' file not found
wrapper.h:2:10: fatal error: 'pari/pari.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings: ()', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

ubuntu 18.04, llvm 8

omershlo commented 4 years ago

Can you check what is the path of your pari.h file please?

kigawas commented 4 years ago

in which folder? I only see it in pari-2.11.2/src/headers/

omershlo commented 4 years ago

the code suppose to first install Pari library on your machine, this results among other things with the pari.h file in one of the OS path for include files. for example on my mac, The OS knows to look in /usr/local/include. There it will find a folder name pari and inside of it there's pari.h.

Can you make sure that in your "include" path there's pari/pari.h and if not - find where it was installed and add it to your global variables ?

kigawas commented 4 years ago

Bindgen is searching

clang_args: ["-isystem", "/usr/local/include", "-isystem", "/usr/lib/clang/8.0.1/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include"], input_header: Some("wrapper.h"),

But none of them has a pari folder

kigawas commented 4 years ago

And didn't find clues in makefiles. Do you know where it's installed by default?

omershlo commented 4 years ago

can you run a find command to see where pari.h is located ? also: please check you have libpari file. (make sure Pari is installed: check that Pari was installed. https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.11.1/users.pdf appendix A: I think running gp should verify it)

kigawas commented 4 years ago

libpari is in ./depend/pari-2.11.2/Olinux-x86_64/ gp is in ./depend/pari-2.11.2/

kigawas commented 4 years ago

didn't see pari.h

omershlo commented 4 years ago

so it means it was never installed on your machine. That's weird. Can you maybe try to install it manually - see if there's any errors in the process? inside depend/pari-2.11.2 run ./Configure then make all then make install-lib-sta

kigawas commented 4 years ago

need to sudo make install first

it's related with permission, can there be an option to install to ~/.local/?

omershlo commented 4 years ago

ok, so sudo is the issue, make sense. Any idea how to solve it without asking to put your password?

kigawas commented 4 years ago

It depends on the user, if it's set without password, it won't ask, otherwise you'll need to input password

About how to configure it, see https://askubuntu.com/questions/147241/execute-sudo-without-password