Xcode 4 / iOS architecture issues

i’m getting link errors saying the *.a libs don’t have armv7 code. ok fine, but i can’t figure out how to get it to just compile for (i guess?) armv6. insists on armv7. i’m searching the build settings for “arm” and trying to remove any armv7 restricting options, but i am stuck… set all the base SDK options to 4.3 as well… near the top of the ld command line there is in fact “-arch armv7”… how do i get rid of this…

  
Ld /Users/stolrsky/Library/Developer/Xcode/DerivedData/VideoGrabberExample-fqsjpccbnwbsclfvjsbcrqyeuwff/Build/Products/Debug-iphoneos/VideoGrabberExample.app/VideoGrabberExample normal armv7  
    cd /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample  
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0  
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"  
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/stolrsky/Library/Developer/Xcode/DerivedData/VideoGrabberExample-fqsjpccbnwbsclfvjsbcrqyeuwff/Build/Products/Debug-iphoneos -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freeimage/lib -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/FreeImage/lib/iphone -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/FreeImage/lib/osx -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/iphone -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/osx -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/glu/lib/iphone -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone -L/Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/osx -F/Users/stolrsky/Library/Developer/Xcode/DerivedData/VideoGrabberExample-fqsjpccbnwbsclfvjsbcrqyeuwff/Build/Products/Debug-iphoneos -filelist /Users/stolrsky/Library/Developer/Xcode/DerivedData/VideoGrabberExample-fqsjpccbnwbsclfvjsbcrqyeuwff/Build/Intermediates/VideoGrabberExample.build/Debug-iphoneos/VideoGrabberExample.build/Objects-normal/armv7/VideoGrabberExample.LinkFileList -dead_strip -ObjC -miphoneos-version-min=4.0 /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/libs/openFrameworksCompiled/lib/iphone/libofxiPhone_iphoneos_Debug.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework CoreLocation /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone/CppUnit.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone/PocoFoundation.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone/PocoNet.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone/PocoUtil.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/iphone/PocoXML.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/CppUnit.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoFoundation.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoNet.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoUtil.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoXML.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/FreeImage/lib/iphone/freeimage-iphone.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/FreeImage/lib/osx/freeimage.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/iphone/freetype-iphone.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/glu/lib/iphone/glu-iphone.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/glu/lib/iphone/glu.a /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/osx/freetype.a -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework CoreGraphics -o /Users/stolrsky/Library/Developer/Xcode/DerivedData/VideoGrabberExample-fqsjpccbnwbsclfvjsbcrqyeuwff/Build/Products/Debug-iphoneos/VideoGrabberExample.app/VideoGrabberExample  
  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/CppUnit.a, missing required architecture armv7 in file  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoFoundation.a, missing required architecture armv7 in file  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoNet.a, missing required architecture armv7 in file  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoUtil.a, missing required architecture armv7 in file  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/poco/lib/osx/PocoXML.a, missing required architecture armv7 in file  
ld: warning: ignoring file /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/FreeImage/lib/osx/freeimage.a, missing required architecture armv7 in file  
ld: in /Users/stolrsky/Desktop/NoHoMo/openFrameworks0062/apps/iPhoneSpecificExamples/VideoGrabberExample/../../../libs/freetype/lib/iphone/freetype-iphone.a, file is universal but does not contain a(n) armv7 slice for architecture armv7  
collect2: ld returned 1 exit status  
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1  

Hallo :slight_smile:

Make sure you remove armv7 in both the project and targets in Xcode 4. Then set “Build active architectures only” to NO, again in the project and target.

Andy

Hello,

I’m running into your problem right now. The project files are trying to include both the iOS and osx versions of the library files (I don’t know why that is.) Remove the entries for the osx versions and they try to build again.

I’m currently down to one linker error at this point as a result, and it appears to be because freetype was built for armv6 but not armv7.

Edit: Related:
http://forum.openframeworks.cc/t/freetype-linking-error-w-0.062,-xcode-3.2.6,-ios4.3-device/5734/0

Edit 2: By using the arm7 versions of some libraries I found in this thread, I was able to build and run on the device. However, by removing the osx libraries I was no longer able to run in the simulator. It appears another solution has to be found for this to be more XCode-4-friendly.

Hey, I’m having the exact same problem. Have you resolved? Also, how do you ‘remove the entries for macosx’? The zip link in the forum doesn’t exist anymore - anyone have it handy?

Cheers.

I’m having the same issue, too.
It’s surprising that it is this difficult to get a help for building libraries for iOS.
There’s a tutorial like this : http://shift.net.nz/2010/09/compiling-freetype-for-iphoneios/
which worked fine for iOS 4.2, but not for 4.3