I'm using xcode 4.5 My Base SDK is 6.0 and my deployment target is 5.1. When I try to build for release or profiling I get this little gem of an error.
ld: file is universal (4 slices) but does not contain a(n) armv7s slice: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/crt1.3.1.o for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Now....
I have seen this message posted on stackoverflow but Im still none the wiser.
What exactly is this crt1.2.1.o thats causing all the fuss?
Can I modify it somehow to kill my error?
And finally it has been suggested that I simply set build for active architectures only. What are the implications of doing this?
Thanks
The crt1.3.1.o file contains the startup code for the C runtime library. This initializes the runtime, calls global initializers and finally calls the main function.
Something must be amiss with your project settings. You are compiling for armv7s as well, but the libraries are being linked from the iOS 5.1 SDK which doesn't support the armv7s architecture yet.
I had this same issue, I removed armv7s from valid architectures in build settings and left only armv7, after that I could archive my project
Related
I have created static iotivity framework(release) with bit code enabled in xcode-build settings for multiple .a files (each .a file will support for all architecture like armv7,arv7s, arm64, i386, x86_64) and header files by using scripts(https://www.raywenderlich.com/65964/create-a-framework-for-ios). When I try to integrate generated iotivity framework in sample project with bit code enabled, I am getting following error when building in device. Please let me know how to fix this.
iotivity.framework/iotivity(OCPlatform.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have generated FAT file which will support all architecture as said above. Is there any way to create FAT file with bit code enabled using terminal.
I added a wechat login to my xcode. However, these errors worked.
I do not know how to fix this error. please help me.
Apple Mach-O Linker (Id) Error
"__wechatstore",referenced from:
_Wechat__wechatstore_m13_992 in Bulk_Assembly-CSharp_1.o
_Wechat_wechatstore_m13_995 in Bulk_Assembly-CSharp_1.o
(maybe you meant: _Wechat__wechatstore_m13_992)
Symbol(s) not found for architecture arm64
Linker command failed with exit code 1 (use -v to see invocation)
Activity Log Complete
the message means that the symbol __wechatstore (which is likely a pointer to data structure) can't be found in any arm64 binary supplied to the linker. So there are a couple things that could be going wrong:
the Library with this symbol might not be getting included in compilation. (when build fails in Xcode, go to the 'report' tab in navigator, click on the failing build, and check out the failing "Link ..." task
the Library might be included but not be compiled for arm64. Now that I think of it, I think this is the most likely case. arm64 support is a newer requirement from apple to support iPad Pro. I'd be willing to bet that the library probably only includes armv7. you can find out which architectures are included by running the file command on the library.
A possible temporary solution is to stop compiling for arm64, and try out just compiling armv7: to do that go to Project > Build Settings > Architectures > Architectures and change from $(ARCHS_STANDARD) $(ARCHS_STANDARD) to armv7. (nb: idk but I wouldn't try to submit a binary without the proper architectures for the appstore)
I installed JTCalendar using cocoa pods into my project but when I run the project on the XCode Simulators, it shows an error
ld: library not found for -lJTCalendar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is working fine when I debug the project using a real time device. WHy am I facing this issue on the simulator?
Thank you all for your replies. Actually the issue was that when I installed the pods, the pod project architecture was set to arm64 armv7 armv7s and Build active architectures only was set to YES. My real time device was armv7 and the simulator was x86_64. I changed Build active architectures only to NO in the pod project and the issue was fixed. Thanks again.
Im writing to you as I am deeply in need of some assistance.
I'm trying to compile an app to my iPhone from Xcode, however, I keep encountering the issue of having this error come up when I press run:
ld: warning: directory not found for option '-F2'
ld: '/Users/[My-name]/Documents/XCode Projects/Store Testing Projects Here/BallGame 1.1/StartApp.framework/StartApp(STAJsonAd.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Now, I have checked and made sure that both my framework search paths and Library search paths are both empty. This is why I am having such an issue, I cannot for the life of me figure out the issue here! Why is Xcode trying to link something that is not specified to link to!
Thanks in advance, cheers.
Do you have more than one TARGETS?
You can change the value in Build Settings→Build Options→Enable BitCode to NO.
I finally realised why the 'Archive' option was gray. I needed to select an iOS device.
The only device that I currently have with me has iOS6 installed on it.
It says the following when trying to Archive the app:
ld: warning: ignoring file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o,
file was built for armv7 which is not the architecture being linked
(armv6):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o
ld: entry point (start) undefined. Usually in crt1.o for architecture
armv6 clang: error: linker command failed with exit code 1 (use -v to
see invocation)
But I want to support armv6. What should I do?
EDIT: I tried changing the target from iOS4.0 to iOS 4.2 and said the following:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo:
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
and
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
have the same architectures (armv7) and can't be in the same fat
output file Command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo
failed with exit code 1
EDIT: I now managed to archive with just armv7 to iOS 4.0. Is it going to work?
You can't archive an file with IOS6, you need to downgrade to the latest official version to archive.
Edit:
Devices updated to iOS 6 beta can not be restored to earlier versions
of iOS. Registered development devices will be able to upgrade to
future beta releases and the final iOS 6 software.
https://developer.apple.com/devcenter/ios/index.action#
I figured it out. Instead of adding the 'armv6 armv7', I just needed to add 'armv6', as the code for 'armv7' was already written with that other default bizarre code.
That's why it was telling that two armv7 was being built.
Thanks everyone for the help, either way!