phracker / MacOSX-SDKs

A collection of those pesky SDK folders: MacOSX10.1.5.sdk thru MacOSX11.3.sdk
2.58k stars 655 forks source link

sparse SDK warning for 10.1 to 10.3 #42

Open joevt opened 2 years ago

joevt commented 2 years ago

I added all the SDKs to Xcode (in Monterey) using symbolic links like this:

IFS=$'\n'
for thesdk in $(find /Volumes/Devs/Developer/MacOSX-SDKs -name '*.sdk' -maxdepth 1); do
    echo sudo ln -s "$thesdk" /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$(basename "$thesdk")
done

And I edited /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist to have MinimumSDKVersion set to 10.0.

Then I opened an Xcode project. I got these warnings:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1.5.sdk:1:1: warning: setting 'MACOSX_DEPLOYMENT_TARGET' is not allowed in sparse SDK
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1.5.sdk:1:1: warning: setting 'PLATFORM_NAME' is not allowed in sparse SDK
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.2.8.sdk:1:1: warning: setting 'MACOSX_DEPLOYMENT_TARGET' is not allowed in sparse SDK
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.2.8.sdk:1:1: warning: setting 'PLATFORM_NAME' is not allowed in sparse SDK
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.3.0.sdk:1:1: warning: setting 'MACOSX_DEPLOYMENT_TARGET' is not allowed in sparse SDK
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.3.0.sdk:1:1: warning: setting 'PLATFORM_NAME' is not allowed in sparse SDK

I understand that I probably won't be able to use those early SDKs with Monterey or that I probably won't ever want to, but I think we can at least fix them so that they don't give that warning. What I did was add the following line to each SDKSettings.plist: isBaseSDK = YES;

I am guessing that sparse SDKs did not exist before 10.4 (or 10.3.9)?