If it’s not working still, then I think I should drop Mac support all together. Trying to figure out what’s happening on your system is becoming time consuming. I don’t own any Mac hardware so I cannot debug locally. I’m going to ask a friend to try to see if they can build it with the instructions provided.
It looks like you are running that script from your /Users/max/Library folder, not the repo copy. You need to pulled the repo into a clean folder and run ./buildSystem.sh --allMac from inside that folder. I’m not sure how you’re doing this, but if you are doing this all correct and still having this error, then Mac support is broken and I don’t have hardware or time to fix it. I will have to delete the Mac instructions from the repo.
You could try to read the build script itself and figure out how it works to see why it’s failing. It’s build on these instructions, so you could could try running them for yourself: Export to macOS and iOS.