Skip to content
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

Problem with digest-sha3 gem on Ubuntu 16.04 #11

Closed
Eugenpaul opened this issue Jul 6, 2017 · 8 comments
Closed

Problem with digest-sha3 gem on Ubuntu 16.04 #11

Eugenpaul opened this issue Jul 6, 2017 · 8 comments

Comments

@Eugenpaul
Copy link
Contributor

Hello
It seems that you have a dependency, that causes this error at least on Ubuntu 16.04:

Building native extensions.  This could take a while...
ERROR:  Error installing digest-sha3:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/digest-sha3-1.1.0/ext/digest
/usr/bin/ruby2.3 -r ./siteconf20170706-6882-10kgp7b.rb extconf.rb
checking for ruby/digest.h... yes
checking for rb_str_set_len()... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/digest-sha3-1.1.0/mkmf.log

current directory: /var/lib/gems/2.3.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR=" clean

current directory: /var/lib/gems/2.3.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: In function ‘displayText’:
displayIntermediateValues.c:113:9: error: format not a string literal and no format arguments [-Werror=format-security]
         fprintf(intermediateValueFile, text);
         ^
cc1: some warnings being treated as errors
Makefile:239: recipe for target 'displayIntermediateValues.o' failed
make: *** [displayIntermediateValues.o] Error 1

make failed, exit code 2

The gem is no longer maintained. But looks like solution proposed here by lmX2015 works: phusion/digest-sha3-ruby#7

@marekkirejczyk
Copy link
Contributor

Thank you for research. Would you be interested in doing PR?

@Eugenpaul
Copy link
Contributor Author

The fix should be added in the other gem. I tried creating a pull request there, but don't know if the maintainer accepts it anytime soon.

@adrianov
Copy link

I can suggest replacing digest-sha3 with sha3 gem, which doesn't have this issue.

@litch
Copy link

litch commented Oct 1, 2017

This is also an issue for ubuntu 14.04, FWIW.

@marekkirejczyk
Copy link
Contributor

@adrianov Would you like to do a PR?

@se3000
Copy link

se3000 commented Oct 24, 2017

Was looking into this for ruby-eth, and unfortunately the sha3 gem is not a simple drop in to replace for digest-sha3. Specifically, sha3 is FIPS-202 compliant, but Ethereum uses a non FIPS-202 compliant version which digest-sha3 also uses.

More detail on the differences here, but I believe Ethereum chose their algo before the SHA3 standard was finalized.

@kurotaky
Copy link
Collaborator

I think this library(digest-sha3) is not maintained 😢

@q9f
Copy link
Contributor

q9f commented Sep 30, 2021

Was looking into this for ruby-eth, and unfortunately the sha3 gem is not a simple drop in to replace for digest-sha3. Specifically, sha3 is FIPS-202 compliant, but Ethereum uses a non FIPS-202 compliant version which digest-sha3 also uses.

You can use keccak: https://github.com/q9f/keccak.rb

I think this library(digest-sha3) is not maintained cry

It's the same gem but maintained by me. https://rubygems.org/gems/keccak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants