bcoin-org / bcrypto

JS crypto library
Other
99 stars 41 forks source link

libgmp - check library availability. #16

Closed nodech closed 5 years ago

nodech commented 5 years ago

On CI builds I noticed that bcrypto build failed, so the problem is in library availibility check: ./utils/has_lib.sh checks if gmp is available that sets true for with_gmp in bindings, but that does not mean gmp.h will be available (no libgmp-dev), so it incorrectly tries to build with gmp.h.

Previously(3.1.2) there were two checks that should have passed gmp and gmpxx. CI Environment only has libgmp and does not have gmpxx so it returned false and "correctly" set with_gmp=false and used USE_NUM_NONE=1.

We could either fix has_lib to look for header files or Include gmp.h in the project and link to libgmp.so.