cargo-lipo icon indicating copy to clipboard operation
cargo-lipo copied to clipboard

Xcode 11 (iOS 13) Warnings

Open agrinman opened this issue 6 years ago • 4 comments

Have you tried cargo lipo binaries with Xcode 11 + iOS 13? Any idea why I might be getting warnings in Xcode like this:

Building for iOS, but linking in object file (/Users/alex/projects/test/target/universal/release/libtest.a(regex-9fdff7e9d3741c5f.regex.8gmc3yl8-cgu.4.rcgu.o)) built for 

There are about 1k of them for all my depenencies in the chain.

Thanks!

agrinman avatar Jun 06 '19 19:06 agrinman

Can you post a bit more of the error message? It’s kind of cut-off at the „for“ at the end.

TimNN avatar Jun 06 '19 19:06 TimNN

@TimNN that's actually the entire message that Xcode spits out

agrinman avatar Jun 06 '19 19:06 agrinman

I'm having a similar issue when linking a x86_64 static library produced by cargo build in a macOS application, the error message was with the same format and I can confirm the message was not cut-off (I also tried to build in the command line, got the same linker warnings as output).

My initial suspicion was that the new version of the Apple platforms require a new load command in the Mach-O header to verify the platform of a library. But after comparing a sample static library produced by Xcode 11 (which doesn't emit the warning when linked to) and another sample static library produced by cargo build I couldn't find any hard evidence. I've also noticed that my sample static library produced by clang and ar also seems fine (i.e. no warning emitted when linked to), that made me even more confused.

eyeplum avatar Jul 08 '19 08:07 eyeplum

lipo is used for creating FAT executable, containing both 32bit and 64bit arm code on iOS . Since iOS does not support 32bit executable any more on iOS 12 there is no need for lipo any more. I double checked with lipo -detailed_info on a sample Xcode 13 project for iOS.

lipo -detailed_info ..../xtest/xtest input file ..../xtest.app/xtest is not a fat file

Same might be true for Xcode 13 for Catalina. since 32bit is unsupported now as well.

oflebbe avatar Oct 12 '19 10:10 oflebbe