Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn a "fat" library into a "non-fat" library?

I'm trying to remove a duplicate object from a library with armv6 and armv7 architectures, i.e.,

$ lipo -info libx.a Architectures in the fat file: libx.a are: armv6 armv7

As expected, "ar d" does not work directly so I used "lipo -extract" to split the library. However, the resulting libraries are still 'fat' architecture.

$ ar d libx-armv6.a offendingduplicate.o ar: libx-armv6.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) ar: libx-armv6.a: Inappropriate file type or format

$ lipo -info x-armv6.a Architectures in the fat file: libx.a are: armv6

How can I un-fattify the library? (You can imagine the sorts of links that come up when you search for 'remove lipo fat file' in Google. Help!!)

like image 294
tofutim Avatar asked Mar 18 '11 12:03

tofutim


1 Answers

I am not familiar with lipo, but from its man page, it looks like you should be able to do this:

lipo libx.a -thin armv6 -output libx-armv6.a
lipo libx.a -thin armv7 -output libx-armv7.a
like image 73
Jonathan Avatar answered Oct 02 '22 09:10

Jonathan