bitcode_strip exited with 1

I'm getting a weird error when I try and compile a specific target with Bitcode:

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/ccornaby/Library/Developer/Xcode/DerivedData/DMSDev-cidnzyiaijagzybpkqbdonviaelu/Build/Products/Debug-iphoneos/libDIS.a -m -o /Users/ccornaby/Documents/dmsdk-bitcode/dmsdk_ios-bitcode/DIS/lib/libDIS.a
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip: input file must be a linked Mach-O file not an archive: /Users/ccornaby/Library/Developer/Xcode/DerivedData/DMSDev-cidnzyiaijagzybpkqbdonviaelu/Build/Products/Debug-iphoneos/libDIS.a (for architecture armv7)
error: bitcode_strip /Users/ccornaby/Library/Developer/Xcode/DerivedData/DMSDev-cidnzyiaijagzybpkqbdonviaelu/Build/Products/Debug-iphoneos/libDIS.a: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip exited with 1


I'm not sure what to do with this. The library output looks good:

libDIS.a:                   Mach-O universal binary with 2 architectures
libDIS.a (for architecture armv7): current ar archive random library
libDIS.a (for architecture arm64): current ar archive random library

Accepted Reply

I've had the same error. PBXCp is only run for me in a Copy Files phase where I copy my output .a to another directory. (to an absolute path, $(SRCROOT)/Unity/Assets/Plugins in case that makes any difference)

My .a is built fine, but the build process fails here.

Turning off enable_bitcode does nothing (I assume that's a setting a build time rather than the post-processing)


If I remove my .a from the copy files phase, the build is successfull (but I have to manually move the file each build)


I presume from this, that bitcode_strip is a generic tool that runs on all files during post-copies and in this case can only handle one type of ".a" and isn't clever enough to distinguish different types of libs. Or enable_bitcode = false/no is supposed to remove -bitcode_strip from PBXCp but doesn't [in this build]


FYI, also XCode 7 beta 4

Replies

I'm having the same problem after upgrading to Build 4 of the Beta. It was compiling fine in Build 3, now I can't compile with a similar error message as that posted above.


I've even tried disabling BitCode everywhere and it still fails when compiling a project that is dependant on the library.


Let me know if you find anything out.

I've had the same error. PBXCp is only run for me in a Copy Files phase where I copy my output .a to another directory. (to an absolute path, $(SRCROOT)/Unity/Assets/Plugins in case that makes any difference)

My .a is built fine, but the build process fails here.

Turning off enable_bitcode does nothing (I assume that's a setting a build time rather than the post-processing)


If I remove my .a from the copy files phase, the build is successfull (but I have to manually move the file each build)


I presume from this, that bitcode_strip is a generic tool that runs on all files during post-copies and in this case can only handle one type of ".a" and isn't clever enough to distinguish different types of libs. Or enable_bitcode = false/no is supposed to remove -bitcode_strip from PBXCp but doesn't [in this build]


FYI, also XCode 7 beta 4

In additional to your answer, there is mush simpler method. As I see, XCode uses bitcode-strip only when enviroment variable STRIP_BITCODE_FROM_COPIED_FILES is set to YES. It seems that it's set to default when enable_bitcode is switched on.
Add User-Defined Setting STRIP_BITCODE_FROM_COPIED_FILES=NO to your Target and it will compile fine, XCode will use standard strip.


Tested on XCode 7 beta 5