Created attachment 195082 [details]
Does not actually invoke sse flags now, builds just fine on aarch64.
I do not have the environment to test it. Could you please provide a log file for aarch64? Thanks!
Created attachment 195559 [details]
(In reply to Sunpoet Po-Chuan Hsieh from comment #1)
Hmmm, I've tried to also test that the gem actually works — well, gem.mk do-install is *deleting* the extension! Because it ends up in the 'ext' directory together with the source.
So currently this is broken on any platform, the .so is not getting installed
Without deleting 'ext', on aarch64 it also can't resolve type 'size_t'.
Also NO_ARCH shouldn't be set here.
I'll try to fix everything now
Created attachment 195563 [details]
So something like 'gems/scrypt-3.0.5/ext/scrypt/aarch64-freebsd/libscrypt_ext.so' is a completely valid location for a native extension. https://github.com/ffi/ffi-compiler is pretty much hardcoded to use that kind of location.
Let's update gems.mk to keep *.so files in /ext instead of removing everything!
Created attachment 195567 [details]
For the scrypt gem itself, patch is pretty much the same as original, plus -NO_ARCH
About the 'size_t' thing: that's in rubygem-ffi. They don't have type definitions for non-x86 FreeBSD. Simple fix:
ln -s x86_64-freebsd /usr/local/lib/ruby/gems/2.4/gems/ffi-1.9.25/lib/ffi/platform/aarch64-freebsd
(I'll try doing that in the ffi port)
So with both patches uploaded here, plus the one from bug 230147, it works on both armv7 and aarch64.
A commit references this bug:
Date: Sun Jul 29 19:28:29 UTC 2018
New revision: 475848
Submitted by: Greg V <email@example.com>
Regarding the gem.mk patch, I would suggest having a review (https://reviews.freebsd.org/) and exp-run before it lands.
Okay, created https://reviews.freebsd.org/D16506