분류없음2014.12.23 15:53
  

Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

xcode디버깅을 하다가 종종 발하는 오류인데, 다른 프로젝트를 import 하거나 샘플을 받아 할 경우 armv6 과 armv7의 Build Active를 일치를 시켜줄 경우 무리없이 된다. 찾아본 경과 64-bit 의 시뮬레이션의 더이상 xcode 5.1의 제공하는 것을 받을수 없는거 같은데... 확실함은 잘 모르겟다. 

나는 아래와 챕쳐처럼 해결을 하였는데, 경우에 수에 따라 아래의 링크에서 확인하여 조치할 수 있을거 같습니다. 



그외 다른 방법들은 아래를 참고하여 해결해보세요~

 No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386). 

These are my target build settings:

Xcode target build settings

I tried changing “Build Active Architecture” to No, as well as adding “i386″ to the “Valid Architectures”, unfortunately neither worked. Thanks for any suggestions!

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

Add arm64 to the target’s valid architectures. Looks like it adds x86-64 architecture to simulator valid architectures as well.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

Try removing all previous architectures (i.e. remove the ARCHS_STANDARD setting) at the same time as you add i386 to the Architectures. This should change the active architecture to i386. I encountered a similar issue when I tried to build for armv7 by default, but it kept trying to build for arm64. I changed ARCHS_STANDARD to ARCHS_STANDARD_32_BIT, and this changed the active architecture chosen.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

Add: Architectures: $(ARCHS_STANDARD_INCLUDING_64_BIT)

Valid architectures: arm64 armv7 armv7s

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

I had the same error message after upgrading to XCode 5.1. Are you using CocoaPods? If so, this should fix the problem:

  1. Delete the “Pods” project from the workspace in the left pane of Xcode and close Xcode.
  2. Run “pod install” from the command line to recreate the “Pods” project.
  3. Re-open Xcode and make sure “Build Active Architecture Only” is set to “No” in the build settings of both the “Pods” project and your own project.
  4. Clean and build.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

What you need to do is just set the ONLY_ACTIVE_ARCH to NO (at least works for me). Below is a screenshot for it:

e918pG7.png

EDIT:

As far as I know (please point it out if there’s something wrong, thanks), if you set ONLY_ACTIVE_ARCH to YES, it means the Xcode will only build for the active architecture (which refers to the device that’s active in Xcode currently). Seems Xcode’s default setting is set Debug to YES, so it won’t build binaries for other architectures when you only want to build for a special device that connected to your Mac.

The reason failed to build might be that, the project does not support the architecture of the device you connected. So the best solution is to add the right architecture for your device. Below is a list for architectures & the devices that support:

  • ARMv8/ARM64: iPhone 5siPad AirRetina iPad Mini
  • ARMv7s: iPhone 5iPhone 5ciPad 4
  • ARMv7: iPhone 3GSiPhone 4iPhone 4SiPod 3G/4G/5GiPadiPad 2iPad 3iPad Mini
  • ARMv6: iPhoneiPhone 3GiPod 1G/2G

So why “set the ONLY_ACTIVE_ARCH to NO works? Because the device can still run the binary that built for all architectures you added (pass the build), but will lose some performance. This’s just a quick solution, but not best.

Note: The more architectures you added, the bigger the binary will be generated. So it’s good to choose right architectures for your project. ;)

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

If you are using CocoaPods, the most likely problem is because your Pods project Build Settings for Build Active Architecture Only is set to Yes for Debug.

The solution is simple. Change it to No.

Similarly, change to No for your application project.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

I had similar issue. Got it solved by changing “Architecture” to “$(ARCHS_STANDARD_32_BIT)” in Build Settings for Project.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

I faced the same problem when running my app on iPad using xcode 5.1. It got resolved by removing armv7s from ‘valid architectures’ and setting the ‘build active architectures only’ value to No. Both these fields can be found in your app->targets->build settings->architectures.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

In acrhiecture – sometimes to support 6.0 and 7.0 , we exlude arm64

In architectures – > acrchitecture – select standard architecture arm64 armv7 armv7s. Just below in Valid acrchitecture make user arm64 armv7 armv7s is included. This worked for me.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

Just add arm64 in valid architecture.i hope it will work for you.

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

My problem was that the Pods project was targeting OS X, despite my Podfile having platform :ios. I’m using cocoapods 0.35.0.rc2.

To fix it, select the Pods project in the project navigator, and check that the Pods PROJECT node (mind you, not the Pods target) is targeting iOS. That is, the architectures build settings should be:

  • Architectures: $(ARCHS_STANDARD)
  • Base SDK: iOS 8.1
  • Supported Platforms: iOS
  • Valid architectures: $(ARCHS_STANDARD)

I also wanted to build all architectures, so I added the following to the Podfile:

post_install do | installer | installer.project.build_configurations.each do |config| config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' end end 

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

To avoid having “pod install” reset only_active_arch for debug each time it’s run, you can add the following to your pod file

# Append to your Podfile post_install do |installer_representation| installer_representation.project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' end end end 

Answer: Xcode 5.1 – No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386)

Just in case, for anyone still encountering the issue despite following the above, check that the simulator you are running is also the supported one. I had mine specified to arm7 and arm7s but was trying to run the app on a 64 bit simulator.

Posted by 예배하는 프로그래머
개발도구/아이폰2014.11.26 13:50
  

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$_GAI", referenced from:

      objc-class-ref in HackersAppDelegate.o

  "_OBJC_CLASS_$_GAITrackedViewController", referenced from:

      _OBJC_CLASS_$_CmUIViewController in CmUIViewController.o

  "_OBJC_CLASS_$_KalViewController", referenced from:

      objc-class-ref in LearnPlan.o

  "_OBJC_METACLASS_$_GAITrackedViewController", referenced from:

      _OBJC_METACLASS_$_CmUIViewController in CmUIViewController.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


위의 경고 또는 메세지는 libGoogleAnalytics.a, missing required architecture x86_64

You're not doing anything wrong. I'm pretty sure google has not yet provided a arm64 version of their libGoogleAnalyticsServices.a, which is really annoying ...it has been weeks since the public the release of Xcode 5GM.


xcode  - architecture base

$(ARCHS_STANDARD) 

Standard architectures (armv7, arm64)

를 아래와 같이 설정해주면 되네요.


armv7, armv7s

Posted by 예배하는 프로그래머