object file . . . was built for newer OSX version (10.11) than being linked (10.9)

object file (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libkmod.a(c_start.o))

was built for newer OSX version (10.11) than being linked (10.9)


I started seeing this after the officlal Xcode 7 release. Didn't see it with any of the betas, didn't see it in Xcode 6.0. Our target is 10.9, the only SDK available in Xcode is 10.11.


Is there a linker flags to get rid of this warning?


If the policy is still that you should build with the most current SDK available, then it is ridiculous to emit a warning because the SDK and the target don't match.


Also, anyone know whether the older SDKs are available? They're not on developer.apple.com/downloads...


Kevin

Replies

I am also getting the same issue when building with Xcode 7.0.1 from the MAS

This issue is referring to deployment target of the library, not the SDK. Of course, it's ridiculous to have such a warning for a library shipped with the SDK. Please file a bug report!

Are you using the beta version of OS X? That could be the problem.

Still occurring even with Xcode 7.3. Prior to this version, I was able to get around it by linking in an old version (10.8) of the SDK into my Xcode installation and building with it...but starting with 7.3 that workaround doesn't work.


Logged bug 25326912

I did figure out a workaround (in case anyone else would like to use it): I specify, as "Other Linker Flags" the value:

"-isysroot$(DEVELOPER_SDK_DIR)/MacOSX$(MACOSX_DEPLOYMENT_TARGET).sdk"

(including quotes).

I then just make sure that the old SDK is linked into the correct directory (I use a script based on the one at https://gist.github.com/rnapier/3370649 to link in SDKs to the correct location). This makes sure to override the SDK used during the linking phase, and it seems to work just fine for me (I'm linking against the 10.8 SDK currently - building on Xcode 7.3)

I just ran into this issue, and the solution isn't as complicated as you might think. All you need to do is clean your project (Cmd-Shift-K) and build again. Then it will create a brand-new object file that works with the deployment settings you've chosen.