Added script to make nmatrix-fftw gem compile on Windows (ruby -v: ru… #616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…by 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]) using MSYS2 MINGW64 for testing purposes.
This pull request is to mainly get feedback (related to #600). It contains a manual fix (you have to run a shell script
sh manual_fftw_compilation.sh
in the root of the directory and it only works for the mingw64 ruby version installed using msys2 (pacman -S mingw-w64-x86_64-ruby
) from the mingw64 command line) for the nmatrix-fftw gem to compile (all tests pass by the way). It is based on the second part of the feedback given in #600 (comment) by @larskanis.The fix applied to nmatrix-fftw should work for nmatrix-lapacke and nmatrix-atlas (but I encountered installing the C/C++/Fortran dependencies for these on Windows) as they are affected by the same dynamic loading issues. These issues could be resolved if the C extension components of the nmatrix-fftw, nmatrix-lapacke and nmatrix-atlas gems did not rely on dynamically linking with the C extension component of nmatrix at runtime (is dynamic linking used for performance reasons?). I'm not aware of any other gem that relies on its C extension component dynamically linking with another gem's C extension's during runtime (an example of a gem that relies on this behaviour and works on Windows would be useful).
Also
nmatrix/lib/nmatrix/mkmf.rb
Lines 56 to 58 in 293e2fb
Also note that I had installed fftw with the command
pacman -S mingw-w64-x86_64-fftw
.Proof that the test suite passes for nmatrix-fftw passes on Windows: