Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK for 10.7 is missing CRT files #8

Open
jspohr opened this issue Nov 24, 2015 · 8 comments
Open

SDK for 10.7 is missing CRT files #8

jspohr opened this issue Nov 24, 2015 · 8 comments

Comments

@jspohr
Copy link

jspohr commented Nov 24, 2015

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.

@pcolby
Copy link

pcolby commented Jan 27, 2016

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).

@noscript
Copy link

SDK 10.6 has the same issue:

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

@submagr
Copy link

submagr commented Aug 18, 2018

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

@phracker
Copy link
Owner

@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.

@beckermr
Copy link

Also 10.9

@mingwandroid
Copy link

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.

@xingrz
Copy link

xingrz commented Oct 19, 2018

Solved!

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

@Un1q32
Copy link

Un1q32 commented Nov 19, 2024

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.

They are required when using clang, but the binary will still work on 10.8+ systems. If you want to actually run your programs on 10.7 and below, you need the crt files regardless of what compiler you use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants