Closed frozenpandaman closed 10 months ago
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 NSUInteger
with size_t
since that's what those functions appear to return and ran the same setup commands the ci did:
meson setup build --buildtype=release -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true -Dvapoursynth=enabled --force-fallback-for=ffms2
cd build
ninja
And then the ./aegisub binary was able to be opened. I wanted a .app but also wasn't having much luck with meson compile osx-bundle
, but since the binary itself opened, I just made the .app folder myself, moved the binary into Contents/MacOS, and added an Info.plist inside Contents specifying the bundle executable and identifier.
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).
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.
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.
I just made the .app folder myself, moved the binary into Contents/MacOS, and added an Info.plist inside Contents specifying the bundle executable and identifier.
Any chance you could share your build?? Would love to try it out and see if it works for me.
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 icu4c
+ dependencies, and install pulseaudio
and portaudio
, to get everything I was missing.
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 /usr/local/
for them – though for Apple Silicon it should be looking in /opt/
... any ideas? I really appreciate all your help here!
I have an M2 Mac now, so I can actually investigate these kinds of issues.
I fixed the LuaJit crashes on Silicon in 4e6af75db40e5828d8a06420b32ba0504eacbd7d . The moonscript loading issues are just due to the ?data
folder not being in the right place without bundling. You can either make a folder SharedSupport
next to the executable and copy the automation
and dictionaries
folders from the source tree into it, or bundle the app with meson compile osx-bundle
. The latter will probably run into issues with code signing though, so until I work that out you can resign it manually after bundling.
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: https://github.com/TypesettingTools/Aegisub/issues/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.