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
and pangocairo
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:
[1256/1374] Compiling C++ object aegisub.p/src_dialog_colorpicker.cpp.o
FAILED: aegisub.p/src_dialog_colorpicker.cpp.o
c++ -Iaegisub.p -I. -I.. -I../libaegisub/include -Isrc/libresrc -I../src/libresrc -Isrc -I../src -Isubprojects/icu/source/common -I../subprojects/icu/source/common -Isubprojects/icu/source/i18n -I../subprojects/icu/source/i18n -Isubprojects/hunspell-1.7.0/src -I../subprojects/hunspell-1.7.0/src -Isubprojects/luajit/src -I../subprojects/luajit/src -I/opt/homebrew/Cellar/libass/0.17.1/include -I/opt/homebrew/Cellar/libunibreak/5.1/include -I/opt/homebrew/Cellar/harfbuzz/7.1.0/include/harfbuzz -I/opt/homebrew/Cellar/glib/2.76.1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.76.1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.42/include -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16 -I/opt/homebrew/Cellar/boost/1.81.0_1/include -I/opt/homebrew/lib/wx/include/osx_cocoa-unicode-3.2 -I/opt/homebrew/include/wx-3.2 -I/opt/homebrew/Cellar/ffms2/2.40_3/include -I/opt/homebrew/Cellar/ffmpeg/5.1.2_6/include -I/opt/homebrew/Cellar/fftw/3.3.10_1/include -I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet -fcolor-diagnostics -include-pch aegisub.p/agi_pre.h.pch -Wall -Winvalid-pch -std=c++14 -O3 -DNDEBUG -DGL_SILENCE_DEPRECATION -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_USE_DLL=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_ALL_NO_LIB -MD -MQ aegisub.p/src_dialog_colorpicker.cpp.o -MF aegisub.p/src_dialog_colorpicker.cpp.o.d -o aegisub.p/src_dialog_colorpicker.cpp.o -c ../src/dialog_colorpicker.cpp
../src/dialog_colorpicker.cpp:413:2: error: unknown type name 'NSUInteger'
NSUInteger width = CGImageGetWidth(img);
^
../src/dialog_colorpicker.cpp:414:2: error: unknown type name 'NSUInteger'
NSUInteger height = CGImageGetHeight(img);
^
2 errors generated.
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 to unsigned int
within src/dialog_colorpicker.cpp
makes the ninja build work!!
This generates an aegisub
file in the build/
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 the autoload/
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 the meson compile -C build
step:
[477/486] Compiling C++ object aegisub.p/src_spellchecker_hunspell.cpp.o
FAILED: aegisub.p/src_spellchecker_hunspell.cpp.o
c++ -Iaegisub.p -I. -I.. -I../libaegisub/include -Isrc/libresrc -I../src/libresrc -Isrc -I../src -Isubprojects/boost_1_74_0 -I../subprojects/boost_1_74_0 -Isubprojects/luajit/src -I../subprojects/luajit/src -I/opt/homebrew/Cellar/libass/0.17.1/include -I/opt/homebrew/Cellar/libunibreak/5.1/include -I/opt/homebrew/Cellar/harfbuzz/7.1.0/include/harfbuzz -I/opt/homebrew/Cellar/glib/2.76.1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.76.1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.42/include -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16 -I/opt/homebrew/lib/wx/include/osx_cocoa-unicode-3.2 -I/opt/homebrew/include/wx-3.2 -I/opt/homebrew/Cellar/icu4c/72.1/include -I/opt/homebrew/Cellar/ffms2/2.40_4/include -I/opt/homebrew/Cellar/ffmpeg/6.0/include -I/opt/homebrew/Cellar/fftw/3.3.10_1/include -I/opt/homebrew/Cellar/hunspell/1.7.2/include/hunspell -I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet -I/opt/homebrew/opt/icu4c/include -fcolor-diagnostics -include-pch aegisub.p/agi_pre.h.pch -Wall -Winvalid-pch -std=c++14 -O2 -g -D_DEBUG -DGL_SILENCE_DEPRECATION -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -MD -MQ aegisub.p/src_spellchecker_hunspell.cpp.o -MF aegisub.p/src_spellchecker_hunspell.cpp.o.d -o aegisub.p/src_spellchecker_hunspell.cpp.o -c ../src/spellchecker_hunspell.cpp
../src/spellchecker_hunspell.cpp:33:10: fatal error: 'hunspell/hunspell.hxx' file not found
#include <hunspell/hunspell.hxx>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[478/486] Compiling C++ object aegisub.p/src_audio_player_openal.cpp.o
(lots of warnings about deprecations here)
[485/486] Compiling C++ object aegisub.p/src_visual_tool.cpp.o
ninja: build stopped: subcommand failed.
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.