ponyc: Error "ld: library not found for -lSystem" on macOS Big Sur
Hi, I’m trying to compile a “Hello World” program on macOs Big Sur 11.0.1 (20B29)
$ ponyc --version
0.38.1-bba16525 [release]
Compiled with: LLVM 9.0.1 -- AppleClang-11.0.3.11030032-x86_64
Defaults: pic=true
but linking fails
Writing ./helloworld.o
Linking ./helloworld
ld: library not found for -lSystem
Error:
unable to link: ld -execute -no_pie -arch x86_64 -macosx_version_min 10.12 -o ./helloworld ./helloworld.o -L"[..]/ponyup/ponyc-release-0.38.1-x86_64-darwin/bin/" -L"[..]/ponyup/ponyc-release-0.38.1-x86_64-darwin/bin/../lib/x86-64" -L"[..]/ponyup/ponyc-release-0.38.1-x86_64-darwin/bin/../packages" -L"/usr/local/lib" -lponyrt -lSystem
Sorry if this is an FAQ… I literally tried pony for the very first time today, so please bear with me…
Thanks for your help!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (14 by maintainers)
@v-almonacid Apple apparently had the ingenuous idea to delete the command line tools with every XCode update, but you should be able to make them reappear with
xcode-select --install
. At least that brought them (and thus/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/
) back for me after the last update. Have you tried that?