krypt / krypt-core-c

C implementation of the krypt-core API.
MIT License
5 stars 2 forks source link

Fails to compile on Arch Linux #20

Open reedlaw opened 9 years ago

reedlaw commented 9 years ago

Trying to install the latest krypt gem and I get this error:

krypt_missing.c: In function ‘krypt_asn1_encode_bignum’:
krypt_missing.c:67:29: error: ‘SIZEOF_BDIGITS’ undeclared (first use in this function)
 divisor = SIZEOF_LONG / SIZEOF_BDIGITS;
                         ^
krypt_missing.c:67:29: note: each undeclared identifier is reported only once for each function it appears in                                                                                               
Makefile:237: recipe for target 'krypt_missing.o' failed```
durran commented 9 years ago

Same on OSX Yosemite and Ruby 2.2.0.

kenbod commented 9 years ago

I can confirm the problem on my version of Yosemite with Ruby 2.2.0. It appears that SIZEOF_BDIGITS is something that the gem "bigdecimal" defines . My version of 2.2.0 states via "gem list" that bigdecimal 1.2.6 is installed. At least, I found it defined in "$HOME/.rvm/src/ruby-2.2.0/ext/bigdecimal/bigdecimal.h". For whatever reason, this header file is not being included when the file krypt_missing.c is being compiled.

NexoMichael commented 9 years ago

I can also confirm that on ruby-2.1.5 and ruby-2.1.4 this gem is working but for ruby-2.2.0 error is occur. And because of this issue gem for mongo driver version 2 is not compatible with ruby-2.2.0. OS: Yosemite.