Closed jahndan closed 3 weeks ago
The CC and CXX variables are the de-facto way to pick a compiler. You can also use meson's --native-file
option. https://mesonbuild.com/Cross-compilation.html
Still, I think it should be explored to downgrade the c++ standard requirements.
But, most importantly, are you sure you can run mwccarm.exe on your particular version of mac?
I plan on resolving this issue with a PR soon, but am opening this to summarize what I've found so far and to ask a few questions.
I'm not sure how much detail I should add to the macOS section of
INSTALL.md
: should I explicitly write out the brew install commands with the dependencies if said dependencies vary based on the version of macOS? should I include instructions to configure PATH in zsh to shadow apple clang (and its aliases) with another compiler?the command
realpath
doesn't exist on macOS Monterey or earlier (only available in /usr/bin from Ventura onwards)brew install coreutils
fixes this (/opt/homebrew/bin
needs to be on PATH)subproject
knarc
does not build on apple clang 14.0.0 (Monterey) because it is not c++20 compliant (not sure if the version of apple clang bundled with xcode cmdline tools for Ventura/Sonoma is c++20 compliant enough to buildknarc
)apple clang is very annoying because it has unremovable aliases
gcc
andg++
—meaning any other compiler masquerading as gcc (whether it's homebrew gcc or homebrew clang) must be earlier in path than/usr/bin
, since meson looks for gcc/g++ first and will find one if apple clang is installedlibpng can't build from source during configuration when it's not already already installed (for nitrogfx)
brew install pkg-config libpng
fixes thisalso there's some configurations I can't currently test (if no one else gets around to it, I can probably test on macOS 13 by the end of the summer because I was planning on updating soon anyway)
INSTALL.md
is this supposed to be for macOS Mojave and older? (if this works on those, i'll add a supplementary section for more recent versions instead of replacing this entirely)
macOS 13 Ventura (and higher?)
realpath
is apparently included in /usr/bin from here onwards (no coreutils)macOS 12 Monterey (and lower?)
/usr/bin
contains wrapper binaries that prompt you to install xclt (which execute the real binaries in/Library/Developer/CommandLineTools
) which includes gcc, g++, clang, etc. (which prompt xclt install or redirect to the actual clang executable) — so they still show up in PATHhomebrew gcc-14 as c++20 compliant compiler
homebrew clang-18 as c++20 compliant compiler
working configurations:
failing configurations:
gcc
to a compiler other than apple clang — meson ignores aliasesgcc
in path is actually gcc-14 — subproject libpng doesn't buildgcc
in path is actually clang-18 — subproject libpng doesn't buildconfigurations left to test: