-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible magic.mgc version on OSX #59
Comments
Do you try to cleanup/rebuild project? Or just clear our Debug directory? All magic.mgc files in "runtimes/*" should have same version, because it's same file from repo https://github.com/hey-red/Mime/blob/master/src/Mime/content/magic.mgc |
The issue was encountered on first installation of the package, using v3.7.0. No previous version of the package was installed prior. I created an MRE here https://github.com/jorimvanhove/heyred-mime-issue59 I can confirm that the |
Using the MRE https://github.com/jorimvanhove/heyred-mime-issue59, I was able to reproduce the same issue on osx-x64. I decompiled the binaries that ship with Mime. ![]() The libmagic-1.dylib binary that ships with v3.6.0 checks for the number 18: ![]() Examining the linux-x64 binaries it appears for File 5.45 the required magic file version is 18, and 19 for 5.46 ![]() ![]() I compared the magic.mgc file that ships with the homebrew libmagic package, and it differs from the magic.mgc file shipped with Mime. Setting the MimeGuesser.MagicFilePath to the homebrew magic.mgc file all is good, and the test is green. https://formulae.brew.sh/formula/libmagic#default It appears likely that for macOS (x64 & arm64) it is necessary to ship the magic.mgc file that comes with the homebrew package. |
Method call: MimeGuesser.GuessMimeType
Using v3.7.0, I get this error on macOS Sequoia 15.1.1 (M2 Pro)
HeyRed.Mime.MagicException: File 5.46 supports only version 20 magic files. '/{{project}}/bin/Debug/net8.0/runtimes/osx-arm64/native/magic.mgc' is version 19
v3.6.0 appears to work as expected.
The text was updated successfully, but these errors were encountered: