Closed astounding closed 5 years ago
Can you advise if the official Argon2 source compiles successfully?
https://github.com/P-H-C/phc-winner-argon2
My Makefile was modelled on that one, and I barely have any C code on top.
If I clone the Argon2 repo and run make in it, it to errors. However if I switch from BSD's built-in /usr/bin/make (BSD make) to the FreeBSD port of GNU make (I have installed the gmake port), it builds just fine. This leads me to think the issue is that the gem's Makefile(s) use features that are only compatible with GNU make.
I don't know how to update the gem to use gmake on FreeBSD IF it is installed. That could be a solution IF the gem documentation notes a dependency upon FreeBSD users having installed the gmake port. Likewise I'm unfamiliar with how other gem maintainers may have dealt with this issue, because I'm sure it has happened with other native extension code before.
If I clone the Argon2 repo and run make in it, it to errors.
Unfortunately that part makes it an upstream issue. I'm certainly keen to resolve this, but I'm not familiar with BSD make and the upstream makefile is already full of "if os = x then y" patterns. I do suggest raising a ticket there.
There are however several Google hits involving "extconf.rb" which talk about similar issues, and I'll continue to see if I can work around anything up on my side.
@astounding Based on a nokogiri thread, would you mind running it as:
MAKE=gmake gem install argon2
Or "bundle install" as appropriate.
Success! MAKE=gmake worked like a charm. Thanks!
Thanks @astounding - I'll document this in the README shortly.
I have the same error message when I install with "gem install argon2" under FreeBSD 12.1. Sorry for the stupid question, but where do I have to enter MAKE=gmake gem install argon2
@woschwarz I'm not enough of a FreeBSD user to know a "proper" fix, but the short is that running "gem install" on this particular gem uses make, and FreeBSD's "make" isn't the "gmake" that gems expect.
If you're currently just typing "gem install argon2", I would expect you could just type "MAKE=gmake gem install argon2"
This gem fails to build under FreeBSD 12.0. I've included the FreeBSD build errors below:
`current directory: /usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap /usr/local/bin/ruby24 -r ./siteconf20190723-30514-1iieq5p.rb extconf.rb
current directory: /usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap make "DESTDIR=" clean make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 19: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 21: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 24: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 31: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 32: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 34: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 35: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 36: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 36: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 37: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 37: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 38: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 39: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 40: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 40: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 41: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 41: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 42: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 43: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 44: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 44: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 45: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 45: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 46: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 47: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 48: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 48: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 49: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 49: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 50: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 51: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 56: Need an operator make: Fatal errors encountered -- cannot continue make: stopped in /usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap
current directory: /usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap make "DESTDIR=" make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 19: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 21: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 24: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 31: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 32: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 34: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 35: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 36: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 36: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 37: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 37: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 38: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 39: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 40: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 40: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 41: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 41: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 42: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 43: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 44: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 44: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 45: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 45: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 46: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 47: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 48: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 48: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 49: warning: duplicate script for target "ifeq" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 33: warning: using previous script for "ifeq" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 49: warning: duplicate script for target "(,)" ignored make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 20: warning: using previous script for "(,)" defined here make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 50: Need an operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 51: Missing dependency operator make: "/usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap/Makefile" line 56: Need an operator make: Fatal errors encountered -- cannot continue make: stopped in /usr/local/lib/ruby/gems/2.4/gems/argon2-2.0.2/ext/argon2_wrap
make failed, exit code 1`