Noam Ofek
Noam Ofek

Reputation: 265

I can build Armv7 + Arm64 architecture but not Armv7 alone

Building a unified API app (after migration) with Armv7 + Arm64 architecture works fine, and the app runs well on iPhone 5 and iPhone 6. but it fails to run on iPhone 4S due to incompatible architecture.

Trying to build it with only Armv7 architecture fails. These are the errors I get:

Error MT5210: Native linking failed, undefined symbol: _res_9_init. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)

Error MT5210: Native linking failed, undefined symbol: _xmlDocGetRootElement. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)

And 6 more like these... how can I compile this on Armv7 only?

Upvotes: 3

Views: 976

Answers (2)

Noam Ofek
Noam Ofek

Reputation: 265

The solution: Armv7 build failed due to missing link flags in the Oyala binding linkWith file. After fixing the flags (LinkerFlags="-lstdc++ -lz -lxml2 -lresolv") the Armv7 build was completed with no errors.

It still doesn't explain why Armv7+Arm64 (the fat build) did not fail. It just skipped the Oyala build. This is probably a Xamarin bug.

Upvotes: 1

Rolf Bjarne Kvinge
Rolf Bjarne Kvinge

Reputation: 19335

This looks like a bug in Xamarin.iOS, it's not including certain libraries in the fat (armv7+arm64) build, while those (problematic) libraries cause problems in the armv7-only build.

That said, I believe the build problems will be solved by adding -gcc_flags -lxml to the additional mtouch arguments in the project's iOS Build options.

In addition I recommend filing a bug (http://bugzilla.xamarin.com) for the difference in the fat vs thin builds.

Upvotes: 0

Related Questions