obynio / anki-japanese-furigana

Anki add-on providing support for adding furigana on Japanese text
https://ankiweb.net/shared/info/678316993
GNU General Public License v3.0
17 stars 5 forks source link

64 bit binary support M1 Mac #26

Open Roxiun opened 1 year ago

Roxiun commented 1 year ago

See: https://github.com/ripose-jp/Memento/issues/140

This module seems to throw "Please ensure your Linux system has 64 bit binary support.", on my M1 macbook air (macOS 13.1)

obynio commented 1 year ago

Hello, there is no trace log, no detailed issue, and a single link to an external repository that does not have anything to do with this project. Closing the issue.

ahlec commented 1 year ago

The linked issue says that the error we're throwing is being piped through to Memento. Presumably, there might be something wrong with the process open command when it's being done as a child process of Memento.

@Roxiun, I've never used Memento before. I might be able to get it set up at some point over the next week or two to investigate the issue, but I'll need to read the install settings. Did you do anything special for your installation? Or is your setup just the basic Memento setup I'd be able to reproduce by following their guide?

Roxiun commented 1 year ago

The linked issue says that the error we're throwing is being piped through to Memento. Presumably, there might be something wrong with the process open command when it's being done as a child process of Memento.

Did you do anything special for your installation? Or is your setup just the basic Memento setup I'd be able to reproduce by following their guide?

@ahlec No I just have installed it normally. However the one thing I have a hunch it may be is that I'm using a M1 MacBook without Rosetta installed. I'm going to try installing it and see if that makes a difference

Roxiun commented 1 year ago

Yep installing rosetta instantly fixed the problem

ahlec commented 1 year ago

Gotcha, that gives a lot of information to work with, thank you!

In this case, the plugin is probably functioning as well as it can in the situation, and the change is just to tailor the "Please ensure your Linux system has 64 bit binary support." error message to be something more actionable/specific on OSX. Something like Your M1 OSX installation doesn't have 64bit support. Please install Rosetta and restart Anki. ought to help users resolve their issues more easily than what we made you need to do.

ahlec commented 1 year ago

Actually on second thought, could we do more? This is a bit out of my area of expertise so I'll need to do more research/experimentation, but could we have a 32bit compilation of Mecab for ARM systems? Or try and use a different version if we're M1 but don't have Rosetta installed? Finding out those two facts ("Are we ARM? Is Rosetta installed?") should be pretty easy, so if we have somewhere to go, we'd just need to modify mungeForPlatform (which needs a refactor anyways).