Skip to content
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

[macOS] [M1] Build fails #145

Closed
shinra-electric opened this issue Dec 7, 2021 · 6 comments
Closed

[macOS] [M1] Build fails #145

shinra-electric opened this issue Dec 7, 2021 · 6 comments

Comments

@shinra-electric
Copy link

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.

@HongyuS
Copy link

HongyuS commented Dec 9, 2021

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

@shinra-electric
Copy link
Author

Pre-built binary here:

https://gist.github.com/frozenpandaman/92a84cd2ba690bb2399afd04e695bf8c

@frozenpandaman
Copy link

Can anyone check to see if this now works on macOS 12.3?

@shinra-electric
Copy link
Author

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.

@The-Johnson
Copy link

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?

@arch1t3cht
Copy link
Collaborator

Fixed in 9a2fdb9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants