blackwinter / ruby-filemagic

Ruby bindings to the magic(4) library, revised.
https://blackwinter.github.iom/ruby-filemagic
146 stars 34 forks source link

Compiling on Windows x86_64 #11

Closed mscharley closed 9 years ago

mscharley commented 9 years ago

Similar to #10, if fat binary gem's are fine by the maintainers, it'd be great to get x86_64 pre-compiled versions as well for those using the 64 bit releases of ruby.

irb(main):001:0> RUBY_PLATFORM
=> "x64-mingw32"
blackwinter commented 9 years ago

Thanks for opening this issue. Now I don't want to let you down, but I'm not entirely sure what this entails. Up until now I've only built binary versions of my gems for 32-bit Windows and judging from sparklemotion/nokogiri#864 and sparklemotion/sqlite3-ruby#90 64-bit support doesn't seem utterly straightforward. Also, I'm only rudimentarily testing them on a 32-bit Windows 7 VM; neither am I a Windows user nor do I feel the urge to spend more time on that platform than necessary (sad but true).

If you can come up with instructions or, better yet, a pull request for the changes necessary to support fat binary gems on 64-bit Windows based on rake-compiler (including cross-ruby parameters required to cross-compile 64-bit Ruby on Linux), I'm willing to include them in future releases. If you, or someone else, would also step up to offer Windows testing before each release, I'd be even more motivated :)

mscharley commented 9 years ago

I'd be more than happy to look at it sometime soonish if you're happy to give me a quick rundown of how the current fat 32 bit releases work as I usually work with pure-ruby applications. I can't imagine how it'd be harder though (from the nokogiri guys, it's an issue with their build system, not an issue with 64b per ce) unless perhaps there's not a 64b version of the library available (not sure if/how that'd affect things).

blackwinter commented 9 years ago

Sure, let me give it a shot:

I concede that this is a heavily customized workflow which might not be easy to reproduce.

mscharley commented 9 years ago

I'm running Arch and Windows 8 currently, and Arch only has mingw-w64 which does 32 and 64 bit. So lets see if I can take a crack at this... From the brief look at rake-compiler I had it should be possible though.