-
Notifications
You must be signed in to change notification settings - Fork 32
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
Building on M1/arm64 macOS – "not a string" errors (and other misc. notes) #51
Comments
Are you still running into these issues? For what it's worth, I was able to build the binary and get it to work without errors on an M1. I installed the same dependencies as specified in the CI yml, except I built hunspell and libwebp from source (and hunspell from source seems to fix the header file path issues, so changing that isn't required). I replaced the instances of
And then the ./aegisub binary was able to be opened. I wanted a .app but also wasn't having much luck with This makes it rely entirely on the rest of your system's dylibs so it's not optimal, but at least it works. And there's no image for this .app unless you set one, but that's not too much of a pain, it just involves setting the icon in the plist (which you might be able to mostly copy from the x86 released .app). |
Wow, really? Yep, still running into errors last I tried, though I could attempt it again, maybe something's been fixed. Asked others in the GJM Discord about it too though and anyone else who'd attempted it was facing the same problems, with Lua causing all these issues even if the build is successful. @arch1t3cht said he'll get access to an M2 machine soon so hopefully can start providing support here – I'd love to see arm64 builds being done via GitHub Actions & CI/CD.
Any chance you could share your build?? Would love to try it out and see if it works for me. |
Here's the binary. It's dynamically linked so you'll probably just have to play whack-a-mole with installing the right dylibs until it works. Here's the open files the binary was using when it was running: https://gist.github.com/ayypril/73ba1de0b3d87dbb8906629772be0310 And make sure luarocks is installing the dependencies in the right place for luajit (since it seems to expect version 5.1 while homebrew by default does 5.4). I might try to build it again later in a clean VM just to see what actually is and isn't necessary. But either way, good luck! |
Thanks, @ayypril!! I guess ideally it would be packaged into an .app so it can look in the bundle for the libs, but I only had to upgrade However, I'm still running into errors when the application: It looks like it can't load MoonScript/Lua because it's still looking in |
I have an M2 Mac now, so I can actually investigate these kinds of issues. I fixed the LuaJit crashes on Silicon in 4e6af75 . The moonscript loading issues are just due to the |
Rudimentary codesigning is also implemented now, so bundles should also work without extra steps now. |
Hi! Thanks so much for this great fork of Aegisub with all these fantastic features and bugfixes.
I'm trying to use a number of scripts that rely on Yutils, but the problem there is it loads up my local
fontconfig
andpangocairo
libraries, are compiled for my machine's architecture – but the latest provided release of Aegisub is for & expects x86_64, not arm64. So, I need to build it myself, since a binary for newer Apple silicon Macs is not provided. (Happy to provide you with one if you want, once this is fixed!)In following the "compilation" section of the readme, I ran into an issue during the build step that ended with
ninja: build stopped: subcommand failed.
It seemed the cause was this:I'm sure this isn't an ideal fix – please let me know what I should be doing, or if this is a fix you could make to the codebase – but by changing these two
NSUInteger
declarations tounsigned int
withinsrc/dialog_colorpicker.cpp
makes the ninja build work!!This generates an
aegisub
file in thebuild/
directory, as the readme says. Clicking on it launches Terminal, which then indeed launches the application/GUI… however, no scripts are able to load. The application starts with this error after it scans theautoload/
directory:Also seen in the Automation Manager window:
If I follow the OS X instructions under "Building Aegisub" instead (I don't really see how these two differ… since it also builds with ninja when you compile, no?) with some changes to the
export
s for M1 architecture (documented by myself years ago at that link) I get the following error in themeson compile -C build
step:This "'hunspell/hunspell.hxx' file not found" error was something I & others also ran into years ago: TypesettingTools#145
If I change the line
#include <hunspell/hunspell.hxx>
to say#include <hunspell.hxx>
instead, though, the error goes away and the build succeeds! ([486/486] Linking target aegisub
, yay!)But clicking on this resultant file, like above, gives me all the same "not a string" messages when loading my scripts. (And when compiled into an .app using
meson compile osx-bundle
& all the relevant commands, the application simply crashes upon trying to run it.)Any fixes or suggestions for achieving a build here? I'm just trying to get a working version of the .app for personal use – and feel like I'm so close to getting it working! Thanks.
The text was updated successfully, but these errors were encountered: