Fix Ld System Not Found
Outline
最近使用 bob 编译安装最新的 neovim commit 的时候, 遇到
ld: library 'System' not found 错误
后排查是由于更新 mac 系统版本后 xcode 路径的问题, 系统升级后没有兼容, 解决方案如下:
确保Xcode命令行工具完整安装
xcode-select --install sudo xcodebuild -license accept
重置Xcode路径
sudo xcode-select --reset sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
验证SDK路径存在
ls /Library/Developer/CommandLineTools/SDKs/
如果输出中没有MacOSX.sdk,需要重新安装命令行工具:
sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install
重试CMake构建
bob install HEAD
- 如果使用Homebrew的CMake,建议更新到最新版本:
brew update && brew upgrade cmake
Read other posts