-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Digest framework support #1390
Comments
Is How are you using the header from a C extension gem, from outside the gem? |
Hi, I can't install
gem install digest-sha3
Building native extensions. This could take a while...
ERROR: Error installing digest-sha3:
ERROR: Failed to build gem native extension.
current directory: /Users/jiangjinyang/.rbenv/versions/truffleruby-1.0.0-rc2/lib/ruby/gems/2.4.0/gems/digest-sha3-1.1.0/ext/digest
/Users/jiangjinyang/.rbenv/versions/truffleruby-1.0.0-rc2/bin/truffleruby -r ./siteconf20180713-62285-35w684.rb extconf.rb
checking for ruby/digest.h... no
checking for rb_str_set_len()... yes
creating Makefile
current directory: /Users/jiangjinyang/.rbenv/versions/truffleruby-1.0.0-rc2/lib/ruby/gems/2.4.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR=" clean
current directory: /Users/jiangjinyang/.rbenv/versions/truffleruby-1.0.0-rc2/lib/ruby/gems/2.4.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR="
compiling KeccakF-1600-reference.c
compiling KeccakNISTInterface.c
compiling KeccakSponge.c
compiling displayIntermediateValues.c
displayIntermediateValues.c:113:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
fprintf(intermediateValueFile, text);
^~~~
displayIntermediateValues.c:113:40: note: treat the string as an argument to avoid this
fprintf(intermediateValueFile, text);
^
"%s",
1 warning generated.
compiling sha3.c
sha3.c:5:10: fatal error: 'digest.h' file not found
#include "digest.h"
^~~~~~~~~~
1 error generated.
make: *** [sha3.bc] Error 1
make failed, exit code 2 |
I'll have to look into how this header is found in MRI, as it's not part of the normal |
FWIW it seems there is a fallback in the code if there is no MRI seems to ship |
@chrisseaton This is currently what I recall and re-observed: Digest is basically composed of three parts, one forms the abstract structure ( One of my gems makes use of My gems also check the API version ( |
Probably the easiest to support usages of |
Fixed in ed2974c |
Hi,
Please consider adding Digest framework with C extension support (ruby/digest.h). There are a couple of gems that work on top of it, including my two gems.
The text was updated successfully, but these errors were encountered: