Xcode Archive debug strip errors

HatAndBeard picture HatAndBeard · Jul 31, 2012 · Viewed 12.9k times · Source

I am trying to integrate a large legacy C++ library with an iOS app. We are able to build and run on device but we are not able to archive the app. Archiving fails with the following error.

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip failed with exit code 1

I did a "-v" on the strip and get a series of warnings similar to

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: symbols referenced by relocation entries that can't be stripped in: /MyApp/DerivedData/SmartMusic_iPad/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/libMyLib-iOS.a(MyWhatever.o)

It is not clear if this message is a warning or the reason for the failure. There are no other indications of problems in the strip output. Any clues?

Answer

donnadupuis picture donnadupuis · May 24, 2013

Under build settings for the static library target, select NO for 'deployment postprocessing' and 'strip debug symbols during copy'. It is compiled code so it doesn't need symbols stripped. I was experiencing the same error ('usr/bin/strip failed with exit code 1') and this fixed it for me.