@@ -9,8 +9,18 @@ export PATH := /usr/local/opt/qt@5/bin:$(PATH)
99#
1010# For compatibility, we disable that using the flag from this thread:
1111# https://github.com/python/cpython/issues/97524
12- export LDFLAGS := -L/usr/local/opt/qt@5/lib -Wl,-no_fixup_chains
13- export CPPFLAGS := -I/usr/local/opt/qt@5/include
12+ export LDFLAGS := -L/usr/local/opt/qt@5/lib -Wl,-no_fixup_chains -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++
13+
14+ # Some users also reported that they faced this error:
15+ # dyld: Symbol not found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE
16+ # Expected in: /usr/lib/libc++.1.dylib
17+ #
18+ # Because of that, we use Homebrew's libc++ by adding to LDFLAGS:
19+ # `-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++`
20+ #
21+ # And adding to CPPFLAGS:
22+ # `-I/usr/local/opt/llvm/include`
23+ export CPPFLAGS := -I/usr/local/opt/qt@5/include -I/usr/local/opt/llvm/include
1424export PKG_CONFIG_PATH := /usr/local/opt/qt@5/lib/pkgconfig
1525
1626all : frontend pob
@@ -65,8 +75,9 @@ luacurl:
6575
6676# curl is used since mesonInstaller.sh copies over the shared library dylib
6777# dylibbundler is used to copy over dylibs that lcurl.so uses
78+ # llvm is used so we can bundle a custom libc++ for old Mac compatibility
6879tools :
69- arch --x86_64 brew install qt@5 luajit zlib meson curl dylibbundler gcc@12
80+ arch --x86_64 brew install qt@5 luajit zlib meson curl dylibbundler gcc@12 llvm
7081
7182# We don't usually modify the PathOfBuilding directory, so there's rarely a
7283# need to delete it. We separate it out to a separate task.
0 commit comments