file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iO

http://stackoverflow.com/questions/12402092/file-is-universal-3-slices-but-does-not-contain-an-armv7s-slice-error-for-st


file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iOS, anyway to bypass?

up vote 57 down vote favorite
17

I upgraded xcode version and when using external static libraries I get this message:

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

is there anyway to bypass this and add support to the library if the developer of the library didn't updated his library yet ?

Thanks

share | improve this question
 
4  
the author stated the tag of ios6 but if you know the answer it will probably be the same or very close to adding support to library to support armv7 so the answer might not be violating NDA. having the same problem –  user513790  Sep 13 at 8:23
 
If you have the source to the library, it's pretty easy. In my case, I'm using OpenEars (for TTS and voice command,) and all I had to do was download the source, open up the Xcode file included with the source code, Xcode automatically updated the build settings, I hit Product -> Build and bam, I had a nifty new OpenEars.framework with support for the new armv7s architecture. If you don't have the source code, then no, I don't think there's anyway to do this, you'll just have to wait for the author to release a new version. –  ArtOfWarfare  14 hours ago
feedback

5 Answers

active oldest votes
up vote 69 down vote accepted

If you want to remove the support for any architecture, e.g. armv7s in your case, try this:

Project -> Build Settings -> remove the architecture from "valid architectures"

You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project,not from the library.

Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you aught to upgrade any 3rd party libraries you're using.

share | improve this answer
 
nice solution but is there a way to add support without compiling the library ? –  user513790  Sep 13 at 9:33
7  
you don't have to recompile the library. you can remove this flag from the project that is using the library. –  Nicholas  Sep 13 at 9:57
4  
It will work, since old apps that have not been compiled with armv7s support have to run as well. But you will loose some specific optimizations. This should be a temporary workaround anyway. –  Nicholas  Sep 13 at 12:46
2  
Dropbox framework has been updated for this issue see forums.dropbox.com/topic.php?id=90014 –  railwayparade  Sep 17 at 6:31
1  
Had to do this for TestFlight SDK. Thanks! –  Fogmeister  Sep 17 at 9:34
show 11 more comments
feedback
up vote 227 down vote

I've simply switched: "Build Activate Architecture Only" to yes (in the Target -> Build Settings".... and is ok!

share | improve this answer
 
feedback
up vote 4 down vote

I just posted a fix here that would also apply in this case - basically, you do a hex find-and-replace in your external library to make it think that it's ARMv7s code. You should be able to use lipo to break it into 3 static libraries, duplicate / modify the ARMv7 one, then use lipo again to assemble a new library for all 4 architectures.

share | improve this answer
 
feedback
up vote 4 down vote

Try to remove armv7s from project's "Valid architecture" to release from this issue for iOS 5.1 phone

share | improve this answer
 
This is more a comment than an answer. Add more info or risk that is will be deleted. –  sschaef  Sep 14 at 12:24
feedback
up vote 2 down vote

Flurry Support for iPhone 5 (ARMv7s) As I mentioned in yesterday’s post, Flurry started working on a version of the iOS SDK to support the ARMv7s processor in the new iPhone 5 immediately after the announcement on Wednesday.

I am happy to tell you that the work is done and the SDK is now available on the site.

share | improve this answer

你可能感兴趣的:(iOS,Dev)