herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
458 stars 157 forks source link

Build to golang #51

Closed alexkazancew closed 5 years ago

alexkazancew commented 5 years ago

Hello. When I import ffi/go/mcl.go to own project and then build, I have that error

# github.com/herumi/mcl/ffi/go/mcl
In file included from vendor/src/github.com/herumi/mcl/ffi/go/mcl/mcl.go:10:
/usr/local/include/mcl/bn.h:13:3: error: #error "define MCLBN_FP_UNIT_SIZE 4(, 6 or 8)"
  #error "define MCLBN_FP_UNIT_SIZE 4(, 6 or 8)"
   ^~~~~

Compilation finished with exit code 2

How correct build mcl to using in golang? Thanks!!!

herumi commented 5 years ago

Please use -tag {bn256|bn384|bn384_256} according to link libbn{256|384|384_256} . cf. https://github.com/herumi/mcl/blob/master/Makefile#L213-L220

alexkazancew commented 5 years ago

Thank you so much! It helps me!!!