Aegisub
Aegisub copied to clipboard
[macOS] [M1] Build fails
Compilation fails with the following message:
[1983/2242] Compiling C++ object aegisub.p/src_visual_tool.cpp.o ninja: build stopped: subcommand failed.
On Monterey with an M1.
I have the same machine as you did, and I followed every step. It stoped at the same step, right after
Compiling C++ object aegisub.p/src_visual_tool.cpp.o
But I checked the log of earlier steps. There was a fatal error:
'hunspell/hunspell.hxx' file not found
I installed hunspell through homebrew. I don't know what I'm missing.
EDIT: The log also says:
Run-time dependency hunspell found: YES 1.7.0
If anyone knows what happened, please help!
Full log: https://gist.github.com/CoffeeFlux/5d656a8a7deb5b19d807fef1e0b6e955
Pre-built binary here:
https://gist.github.com/frozenpandaman/92a84cd2ba690bb2399afd04e695bf8c
Can anyone check to see if this now works on macOS 12.3?
No, it still fails for me at the same place.
I did notice that the export instructions are incorrect.
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
For x86, Homebrew installs into /usr/local
but for ARM it installs into /opt/homebrew
so that users can cross-compile.
This is why the compiler will fail to find some installed dependencies. Amending the path will fix this, but it is not the main cause of the failure.
I tied your suggestion from the get go:
export LDFLAGS="-L/opt/homebrew/opt/icu4c/lib" export CPPFLAGS="-I/opt/homebrew/opt/icu4c/include" export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
Still I got the: 29 warnings generated. [2380/2381] Compiling C++ object aegisub.p/src_visual_tool.cpp.o ninja: build stopped: subcommand failed.
Then I tried to run the meson build command again and got: 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 -I../subprojects/wxWidgets/src/regex -I../subprojects/wxWidgets/src/jpeg -I../subprojects/wxWidgets/src/png -I../subprojects/wxWidgets/src/tiff/libtiff -I../subprojects/wxWidgets/src/stc/scintilla/include -I../subprojects/wxWidgets/src/stc/scintilla/lexlib -I../subprojects/wxWidgets/src/stc/scintilla/src -Isubprojects/wxWidgets/CMake_build/lib/wx/include/osx_cocoa-unicode-3.1 -I../subprojects/wxWidgets/CMake_build/lib/wx/include/osx_cocoa-unicode-3.1 -I../subprojects/wxWidgets/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework -Isubprojects/wxWidgets/CMake_build -I../subprojects/wxWidgets/CMake_build -Isubprojects/wxWidgets -I../subprojects/wxWidgets -Isubprojects/icu/source/common -I../subprojects/icu/source/common -Isubprojects/icu/source/i18n -I../subprojects/icu/source/i18n -Isubprojects/uchardet-0.0.7/src -I../subprojects/uchardet-0.0.7/src -Isubprojects/luajit/src -I../subprojects/luajit/src -I/opt/homebrew/Cellar/libass/0.16.0/include -I/opt/homebrew/Cellar/harfbuzz/5.3.1/include/harfbuzz -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/glib/2.74.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.74.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.40/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/ffms2/2.40_3/include -I/opt/homebrew/Cellar/ffmpeg/5.1.2_1/include -I/opt/homebrew/Cellar/fftw/3.3.10_1/include -I/opt/homebrew/Cellar/hunspell/1.7.1/include/hunspell -fcolor-diagnostics -include-pch aegisub.p/agi_pre.h.pch -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O2 -g -D_DEBUG -DGL_SILENCE_DEPRECATION -DLINK_LEXERS -DNO_CXX11_REGEX -DSCI_LEXER -D_UNICODE -D__WXMAC -D__WXOSX_COCOA -D__WXOSX -D__WX -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
Is there any known fix for the: fatal error: 'hunspell/hunspell.hxx' file not found?
Fixed in https://github.com/TypesettingTools/Aegisub/commit/9a2fdb91fd5c56ca1ee453ae8c4c5bfe66fb52f6