phracker / MacOSX-SDKs

A collection of those pesky SDK folders: MacOSX10.1.5.sdk thru MacOSX11.3.sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDK for 10.7 is missing CRT files

jspohr opened this issue · comments

When I build a statically linked executable, the linker errors out with

ld: library not found for -lcrt1.10.6.o

That file apparently is copied to /usr/lib inside the SDK if the Xcode command line tools are installed using xcode-select --install.
The SDK from here works: https://github.com/JuliaEichler/Mac_OSX_SDKs
as it includes the crt* files in /usr/lib.

The 10.8 SDK has the same issue. The SDK from here works: https://github.com/AaronWallace/MacOSX_SDKs (the JuliaEichler repo doesn't include 10.8).

SDK 10.6 has the same issue:

ld: library not found for -lcrt1.10.5.o

Any progress on missing -lctrl1.10.5.o with SDK 10.6 ?

@submagr None yet, at least on my end. Waiting on parts to get my iMac back up and running. Will investigate this as soon as I can.

Also 10.9

These files are not needed when using clang, only when using GCC.

Their missing status is therefore an interesting detail but I don't really see why people care. If you need these files they come with GCC anyway! All they consist of are stubs to libSystem.dylib too FWIW.

Solved!

Just copy crt1.10.6.o from MacOSX10.11.sdk /usr/lib/ to the same dir of your 10.7 sdk.