MacOS: file not found: /usr/lib/system/libsystem_darwin.dylib



I’m getting this error building a project on macOS:

ld: file not found: /usr/lib/system/libsystem_darwin.dylib

It seems to be either a bug in XCode or in libtool, I’m not sure which. Googling this error message turns up lots of issues. The most common answer is to downgrade from XCode 9 to XCode 8. Here’s a couple of relevant issues: