chipmunk lib will not link in xcode 4.5 for ios 6 device

Discuss any Chipmunk bugs here.

chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby dugbug » Fri Sep 21, 2012 8:04 pm

Indy license lib v6.1.1:

For a universal binary targeting real ios device (i.e. not simulator), xcode 4.5 now requires arm7s slice in any library it links. Linker bails.

A temporary fix is to edit the allowed architectures of your target to remove the arm7s code generation by the linker but thats an awkward thing to do and Im not sure how well the binary will run on an iphone 5 (it should run arm7 so should work but just saying I have not confirmed this trick).

File is universal (3 slices) but does not contain a(n) armv7s slice: /Users/xxxx/Documents/Products/yyyy/ObjectiveChipmunk-iPhone/libObjectiveChipmunk-iPhone.a for architecture armv7s

Linker command failed with exit code 1 (use -v to see invocation)
dugbug
 
Posts: 20
Joined: Fri Jan 06, 2012 10:08 am

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby Geokar » Sat Sep 22, 2012 12:57 pm

I don't feel comfortable removing arm7 from the target and submitting ...

When can we expect this to be addressed? I need to submit an update for a client!

Thanks
Geokar
 
Posts: 5
Joined: Sat Sep 22, 2012 12:55 pm

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby slembcke » Sat Sep 22, 2012 2:03 pm

I saw your email on Thursday. Sorry I didn't have time to get around to it yet.

So it's a little complicated right now. Apple decided to introduce the armv7s instruction set while removing support for armv6 in the same SDK version. -_- I don't think armv6 was ever even officially deprecated, although the writing has certainly been on the wall for some time due to crummy support for it.

The iPhone 5 will be able to run armv6, armv7 and armv7s code just fine as the instruction sets are backwards compatible. Otherwise only brand new apps released in the last several days would work on it. The advantage of compiling for armv7s is potentially more speed. It's 100% unclear what the advantage is though, supposedly it supports new VFP instructions, but those aren't going to help out most code unless you are specifically targeting them with intrinsics. Other than that, there seems to be no information on what the difference actually is. Removing armv7s from the architectures to build for won't break anything, and it will almost certainly still run armv7 code faster than an iPhone 4s.

Another good reason to not include armv7s support is that I'm guessing that you don't actually have an iPhone 5 yet to test it on. Given Apple's track record with rushing out buggy versions of the Clang compiler whenever they release a new device... I really wouldn't trust it to actually work without seeing it running on a device in my hand. I've had to submit several compiler bug reports for armv6, armv7, x64 and ARC related issues in the past 9 months or so. In each case it involved a bunch of frustrating debugging in the disassembly. -_-

I might get an iPhone in the next month or two (first smartphone actually), but I personally am not terribly comfortable with releasing an official version of the library for armv7s without being able to test it. I can throw up a temporary build on the site if you really want though.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby slembcke » Sat Sep 22, 2012 2:30 pm

I built an armv7/armv7s (but no armv6) library and uploaded it as http://chipmunk-physics.net/release/chi ... 2-beta.tgz

As I said though, I have no hardware to test it on. If you also cannot test it before submitting, I would highly recommend removing the armv7s architecture instead.

Also keep in mind that if your binary previously supported armv6, you are not allowed to upload a new version that drops support for it. They've made it very difficult to continue to maintain backwards compatibility and support new devices at the same time.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby Geokar » Sat Sep 22, 2012 3:35 pm

Thanks for your reply.

I will follow your suggestion and remove arm7 and submit ... I will let you know how it goes ...
Geokar
 
Posts: 5
Joined: Sat Sep 22, 2012 12:55 pm

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby dugbug » Sat Sep 22, 2012 3:58 pm

Geokar wrote:Thanks for your reply.

I will follow your suggestion and remove arm7 and submit ... I will let you know how it goes ...



arm7s, not arm7 :)
dugbug
 
Posts: 20
Joined: Fri Jan 06, 2012 10:08 am

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby dugbug » Sat Sep 22, 2012 3:59 pm

slembcke wrote:I built an armv7/armv7s (but no armv6) library and uploaded it as http://chipmunk-physics.net/release/chi ... 2-beta.tgz

As I said though, I have no hardware to test it on. If you also cannot test it before submitting, I would highly recommend removing the armv7s architecture instead.

Also keep in mind that if your binary previously supported armv6, you are not allowed to upload a new version that drops support for it. They've made it very difficult to continue to maintain backwards compatibility and support new devices at the same time.


I see what you are saying. Ill just submit without arm7s. Will test it on an iphone 5 and let you know.
dugbug
 
Posts: 20
Joined: Fri Jan 06, 2012 10:08 am

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby Geokar » Sat Sep 22, 2012 4:38 pm

dugbug wrote:
Geokar wrote:Thanks for your reply.

I will follow your suggestion and remove arm7 and submit ... I will let you know how it goes ...



arm7s, not arm7 :)


You are right, but it is not arm7s it is armv7s ....

Minor oversight compared to mine! :)
Geokar
 
Posts: 5
Joined: Sat Sep 22, 2012 12:55 pm

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby dugbug » Tue Sep 25, 2012 6:05 pm

Just wanted to follow up for everyone I tested it on an iphone 5 and 4s.

Edit your architectures list and you will see:
armv7
armv7s

Remove the "armv7s" one. It will not be optimized for the 5's cpu but will be compatible with it. Now not sure what the ramifications are for app submittal but at least it works :)

-d
dugbug
 
Posts: 20
Joined: Fri Jan 06, 2012 10:08 am

Re: chipmunk lib will not link in xcode 4.5 for ios 6 device

Postby slembcke » Tue Sep 25, 2012 6:12 pm

So I did dig around to see if I could find any more info on this. To the best of my knowledge, the only difference between armv7 and armv7s is that the latter doubles the number of registers available. lipo -info says they are only a different CPU subtype even.

So for the moment at least, not compiling for armv7s is probably completely fine. Unless you wanted to make a game that would only run on the iPhone 5 and only run in real time if it had extra registers available anyway.

I'll get official armv7s support going soon though. Just need to get my hands on an actual piece of hardware first.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron