missing required architecture x86_64 in …libMumble

2019-09-20 17:00发布

问题:

I am trying to include MumbleKit as a library instead of having to compile it each time by following the suggestion of a member of this forum. Yet when I try to compile on the simulator I get:

missing required architecture x86_64 in …libMumbleKit.a (3 slices)

I think I added all the necessary versions to MumbleKit before generating the library:

arm64 armv7 armv7s armv7k arm7s x86_64 i386

notwithstanding, when I execute:

lipo -info libMumbleKit.a

I get:

Architectures in the fat file: libMumbleKit.a are: armv7 armv7s arm64

as well as configuring Build Active Architecture to NO. I generated the library for MumbleKit both using the Generic iOS device and a iOS 9 physical device.

When I try to archive using the Generic iOS Device option after having extracted the Mumble library in the same way, I instead get error:

ld: bitcode bundle could not be generated because '/Users/fbartolom/Documents/cocoa applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

Same when using my physical device after also generating the library in the correspondent way:

ld: bitcode bundle could not be generated because '/Users/fbartolom/Documents/cocoa applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

And finally the installation on my iOS 9 iPhone 6S went fine with just the same contents in the warning:

ld: bitcode bundle could not be generated because '/Users/fbartolom/Documents/cocoa applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

CryptState.cpp if a c++ file in the library.

回答1:

Check architectures it has with lipo tool. Open terminal, navigate to folder where your library is and do:

lipo -info yourlib.a

If you don't have x86_64, than you should find/compile lib that will have it.

x86_64 is an architecture for Simulator, not for generic iOS device.



回答2:

I applied the suggestion at:

Xcode 7 'CrashReporter does not contain bitcode' linker error

by adding option -fembed-bitcode to the other linker flags field. And now the problem has moved to a c file: band.c, notwithstanding of course I have added this option for the c and c++ files.

ld: bitcode bundle could not be generated because '/Users/fbartolom/Documents/cocoa applications/inArrivoHD/MumbleKit/libMumbleKit.a(bands.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

What might be still missing?



回答3:

I aborted the attempt. There must be something faulty in the original mumble kit project not allowing to import its library into another project, or I do not know how to do it anyway.



标签: ios xcode x86-64