blackwinter / ruby-filemagic

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

Several incompatibilities with RubyInstaller-2.4 #27

Open larskanis opened 7 years ago

larskanis commented 7 years ago

The ruby-filemagic gem has several incompatibilities with RubyInstaller-2.4.

  1. The ruby_filemagic.so load error in the binary gem can probably be fixed per RubyInstaller::Runtime.add_dll_directory - see here.
  2. The gem should add a msys2 library dependency to the mingw-w64-file package to support native builds. I already opened a PR to make it available in the MSYS2 repo.
  3. The gem should not search in /usr/include or /usr/lib on MINGW. These directories contain CYGWIN/MSYS2 related files, which can not be used together with RubyInstaller. For RubyInstaller-2.4 it's enough to use the predefined library paths, provided the file package is installed. dir_config is usually not necessary.
  4. As a recommendation: rake-compiler-dock is maybe a more standardized way to build binary Windows gems. It can replace the project specific Dockerfile and docker handling.

This came up due to the following issue on RubyInstaller: https://github.com/oneclick/rubyinstaller2/issues/64

ghost commented 6 years ago

Yep, got bitten by this today too.

blackwinter commented 6 years ago

I'm sorry but I'm no longer using this library nor RubyInstaller/Windows. Hence, I've decided to give up maintainership. Please contact me if somebody wants to take over.