Page 1 of 1

XCode 4.5 & iOS 6.0 issues

Posted: Mon Sep 24, 2012 5:01 pm
by techyvish
Greetings,

I've updated iOS 6.0 and Xcode 4.5 recently, and I tried compile my old project and it shows linker errors regarding to armv7s architecture instruction set.
Basically all errors looks like below.I've downloaded latest iOS_6.0 dependencies & source but still getting the same error.

I've looked at the binary format and they support armv7 arch. but error is regarding to armv7s, so I programmatically tried correcting CPU subtype 11 in all binaries without any luck to pass the linking.

BackTrack5:Release vishal$ file libzzip.a
libzzip.a: Mach-O universal binary with 3 architectures
libzzip.a (for architecture armv7): current ar archive random library
libzzip.a (for architecture cputype (12) cpusubtype (11)): current ar archive random library
libzzip.a (for architecture i386): current ar archive random library

Is this problem has already been solved ? If not can some one guide me on this ? Thanks in advance.

Errors :

Ld /Users/vishal/Library/Developer/Xcode/DerivedData/BasicTutorial1-fwktgbczsnxrtcdsqugvpoodqhkl/Build/Intermediates/BasicTutorial1.build/Debug-iphoneos/BasicTutorial1.build/Objects-normal/armv7s/BasicTutorial1 normal armv7s
cd /Users/vishal/Documents/Development/Ogre/ogre3d_app/BasicTutorial1
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/vishal/Library/Developer/Xcode/DerivedData/BasicTutorial1-fwktgbczsnxrtcdsqugvpoodqhkl/Build/Products/Debug-iphoneos -L../Ogre_iOS/SDK_1.8.0/lib/Release -L../Ogre_iOS/SDK_1.8.0/lib/Debug -L../Ogre_iOS/SDK_1.8.0/lib -F/Users/vishal/Library/Developer/Xcode/DerivedData/BasicTutorial1-fwktgbczsnxrtcdsqugvpoodqhkl/Build/Products/Debug-iphoneos -filelist /Users/vishal/Library/Developer/Xcode/DerivedData/BasicTutorial1-fwktgbczsnxrtcdsqugvpoodqhkl/Build/Intermediates/BasicTutorial1.build/Debug-iphoneos/BasicTutorial1.build/Objects-normal/armv7s/BasicTutorial1.LinkFileList -dead_strip -lOIS -lFreeImage -lfreetype -lboost_thread -lboost_date_time -lzziplib -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -lboost_thread -lOgreMainStatic -lRenderSystem_GLES2Static -lRenderSystem_GLESStatic -framework QuartzCore -framework OpenGLES -framework UIKit -framework Foundation -framework CoreGraphics -lboost_chrono -lboost_date_time -lboost_system -lFreeImage -lFreeImage -lFreeType -lhlsl2glsl -lmesaglsl2 -o /Users/vishal/Library/Developer/Xcode/DerivedData/BasicTutorial1-fwktgbczsnxrtcdsqugvpoodqhkl/Build/Intermediates/BasicTutorial1.build/Debug-iphoneos/BasicTutorial1.build/Objects-normal/armv7s/BasicTutorial1

ld: file is universal (2 slices) but does not contain a(n) armv7s slice: ../Ogre_iOS/SDK_1.8.0/lib/Release/libzziplib.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Re: XCode 4.5 & iOS 6.0 issues

Posted: Wed Sep 26, 2012 11:28 am
by SFAOK
I had the same error - temp fix is to remove armv7s from the Valid Architectures under Project->Build Settings->Valid Architectures.

I'd prefer a real fix though if anyone's figured it out.

Re: XCode 4.5 & iOS 6.0 issues

Posted: Wed Sep 26, 2012 3:50 pm
by masterfalcon
I haven't been able to reproduce this with the latest iOS dependencies and source. Could you double check, delete CMakeCache.txt and reconfigure with cmake?

Re: XCode 4.5 & iOS 6.0 issues

Posted: Thu Sep 27, 2012 6:43 pm
by slythfox
Make sure to use the iOS6 precompiled dependencies that have been made available, along with the latest Ogre code from the 1.8 branch which gets Ogre working again on the latest Xcode/iOS.

Re: XCode 4.5 & iOS 6.0 issues

Posted: Wed Oct 03, 2012 2:08 pm
by techyvish
thanks all and masterfalcon, fixed it by compiling latest source and replacing all binaries with new binaries.

Re: XCode 4.5 & iOS 6.0 issues

Posted: Mon Feb 11, 2013 12:34 pm
by EvaldsUrtans
I followed latest versions of Ogre SDK & dependencies, but I had 4 linker errors.

If someone else has these - you can fix them by adding "other linker flags" for target "SampleBrowser"

I had to add:
....../ogresdk/lib/libboost_system.a
...../ogresdk/lib/Release/libSample_ShaderSystem.a

CMake apparently did not manage to add these automatically.