Skip to content

Commit e796b5e

Browse files
committed
Revert changes to packaged libc++ since they didn't work; use older Qt
1 parent 0875093 commit e796b5e

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

Makefile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,8 @@ 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 -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
12+
export LDFLAGS := -L/usr/local/opt/qt@5/lib -Wl,-no_fixup_chains
13+
export CPPFLAGS := -I/usr/local/opt/qt@5/include
2414
export PKG_CONFIG_PATH := /usr/local/opt/qt@5/lib/pkgconfig
2515

2616
all: frontend pob
@@ -35,8 +25,9 @@ all: frontend pob
3525
sign:
3626
echo 'Signing with the first available identity'; \
3727
rm -rf PathOfBuilding.app/Contents/MacOS/spec/TestBuilds/3.13; \
38-
codesign --force --deep --sign $$(security find-identity -v -p codesigning | awk 'FNR == 1 {print $$2}') PathOfBuilding.app/Contents/MacOS/lcurl.so PathOfBuilding.app/Contents/libs/*; \
39-
codesign --force --deep --sign $$(security find-identity -v -p codesigning | awk 'FNR == 1 {print $$2}') PathOfBuilding.app; \
28+
codesign --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app/Contents/MacOS/lcurl.so PathOfBuilding.app/Contents/libs/*; \
29+
codesign --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app/Contents/MacOS/PathOfBuilding; \
30+
codesign --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app; \
4031
codesign -d -v PathOfBuilding.app
4132

4233
# We remove the `launch.devMode or` to ensure the user's builds are stored not in
@@ -75,9 +66,8 @@ luacurl:
7566

7667
# curl is used since mesonInstaller.sh copies over the shared library dylib
7768
# 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
7969
tools:
80-
arch --x86_64 brew install qt@5 luajit zlib meson curl dylibbundler gcc@12 llvm
70+
arch --x86_64 brew install qt@5 luajit zlib meson curl dylibbundler gcc@12
8171

8272
# We don't usually modify the PathOfBuilding directory, so there's rarely a
8373
# need to delete it. We separate it out to a separate task.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ Before starting, you need to install Homebrew for x86_64.
1919
alias brew='arch --x86_64 /usr/local/bin/brew'
2020
```
2121
4. Include it to update your environment variables by running `. ~/.intelbrew`
22+
5. Edit Homebrew to fetch packages for Ventura (10.13), since the Qt package
23+
for Sonoma (10.14) breaks compatibility with libc++: see [this error](https://www.pathofexile.com/forum/view-thread/3009944/page/34#:~:text=__ZTVNSt3__13pmr25monotonic_buffer_resourceE)
2224

2325
```sh
26+
vim /usr/local/Homebrew/Library/Homebrew/brew.sh
27+
# Edit the file to comment out the version and hardcode it:
28+
# #HOMEBREW_MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)"
29+
# HOMEBREW_MACOS_VERSION="12.0.0"
30+
2431
# Run this only once after installing Homebrew to install dependencies
2532
make tools
2633

@@ -47,7 +54,7 @@ make sign
4754
- pkg-config
4855
- ninja (optional, can tell meson to generate makefiles if you prefer)
4956

50-
### Ensuring old versions of Mac:
57+
### Ensuring old versions of Mac are compatible:
5158

5259
By default, the built lcurl.so links to the local version of cURL. Old
5360
versions of cURL on old Macs may be too old to include the relevant functions and run into this error:

0 commit comments

Comments
 (0)