不受支持的编译器com.apple.compile .llvm.clang.1_0'在Xcode 7 Beta 2中选择了架构'x86_64'。

时间:2021-01-28 09:44:24

When I incorporated a popular OAuth2 library in iOS called OAuth2Client to my iOS app which is developed on Xcode 7 Beta 2 and then tried running the simulator, the following error occurred and the simulator didn't launch.

当我在iOS中把OAuth2Client (OAuth2Client)合并到我的iOS应用程序中,它是在Xcode 7 Beta 2上开发的,然后尝试运行模拟器,发生了以下错误,模拟器没有启动。

Unsupported compiler 'com.apple.compilers.llvm.clang.1_0' selected for architecture 'x86_64'

不受支持的编译器com.apple.compile .llvm.clang.1_0'选择架构'x86_64'

What does this error mean? A lot of warnings (yellow triangle) followed with the error above (red octagon), such as:

这个错误是什么意思?许多警告(黄色三角形)和上面的错误(红色八边形),例如:

warning: no rule to process file '/Users/myUsername/myAppname/Pods/NXOAuth2Client/Sources/NSData+NXOAuth2.m' of type sourcecode.c.objc for architecture x86_64

警告:没有规则处理文件'/用户/myUsername/myAppname/ pod /NXOAuth2Client/ NSData+NXOAuth2。sourcecode.c m的类型。建筑objc x86_64

How can I deal with the these errors and run the simulator properly? Or does CocoaPods only work on environments prior to Xcode 7 Beta?

如何处理这些错误并正确运行模拟器?或者,CocoaPods只在Xcode 7 Beta之前工作?

UPDATE

Later I found that this occurs on any projects I create, not only on a project using CocoaPods. The only clue that occurs to me is that when I updated my iTunes to 12.2 today and then launched my Xcode, the dialog popped up, instructing to install new command-line tools.

后来我发现,这发生在我创建的任何项目上,而不仅仅是在一个使用CocoaPods的项目上。我唯一的线索是,当我今天更新我的iTunes到12.2,然后启动我的Xcode时,对话框弹出,指示安装新的命令行工具。

UPDATE 2

I just upgrade to Xcode 7 Beta 3 but the error still got me annoyed...

我只是升级到Xcode 7 Beta 3,但是这个错误还是让我很恼火……

6 个解决方案

#1


5  

I met the same issue on Xcode 7 beta 4. I have tried to clean the project for several times but with no lucky. Unbelievably, restart Xcode saved my night. You can try this.

我在Xcode 7 beta 4上遇到了同样的问题。我曾多次试图清理这个项目,但没有成功。令人难以置信的是,重启Xcode拯救了我的夜晚。你可以试试这个。

#2


3  

Solution 1

Close Xcode, open terminal, before anything else, type: “defaults delete com.apple.dt.Xcode” (this addresses your Xcode settings) open Xcode and your project should work normally.

关闭Xcode,打开终端,在其他任何东西之前,键入:“default delete com.apple.dt。Xcode(这是您的Xcode设置)打开Xcode,您的项目应该正常工作。

Plan B

If that doesn't work try this to clear out your cache. Save your files then put this in your terminal:
rm -rf Library/Caches/com.apple.dt.Xcode/

如果这还不起作用,试着清除你的缓存。保存你的文件,然后把它放在你的终端:rm -rf库/缓存/com.苹果. dt.xcode /。

Potential causes

This bug can occur if you declared your pods with single quotes instead of double quotes or for some reason your pod files become corrupted (i.e.: working with p.lists, Google's p.list, firebase etc). I think what triggers the bug to break your code is during certain recompiling phases, for example: opening after unzipping the project, or opening the project after pulling it from GitHub.

如果你用单引号代替双引号或者由于某种原因你的pod文件被损坏了(例如::使用p。列表,谷歌的p。列表,重火力点等等)。我认为在某些重新编译阶段(例如:打开项目后打开,或者从GitHub中取出项目后打开项目),会触发bug破坏您的代码。

#3


1  

With the version (X-code 8 beta 2) I got the following error, because I tried to run it out of the downloads folder:

有了这个版本(X-code 8 beta 2),我得到了下面的错误,因为我试图从下载文件夹中运行它:

Unsupported compiler 'com.apple.compilers.llvm.clang.1_0' selected for architecture 'x86_64'

It helped to put it in the normal Program Folder!

它帮助把它放进了正常的程序文件夹!

#4


1  

Angel's answer worked for me as well. I too experienced this with 8b2, Moving the app to the Program folder instead running out of Downloads resolved it for me.

安吉尔的回答也对我起了作用。我也经历了8b2,将应用程序移动到程序文件夹,而不是下载,解决了它。

#5


0  

In my case with XCode 9.0.1, I noticed that even after closing XCode, I had stuck processes running from an earlier version of XCode running:

在我使用XCode 9.0.1的情况下,我注意到即使在关闭XCode之后,我仍然坚持运行从早期版本的XCode中运行的进程:

$ ps aux | grep Xcode

dyoung           83871   0.0  0.0  2547420    708 s000  S    Tue11PM   0:00.19 /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/DTServiceHub
dyoung           28009   0.0  0.0  2432804    796 s012  S+   10:24AM   0:00.00 grep Xcode
dyoung           27996   0.0  0.3  2869796  46088   ??  S    10:23AM   0:00.65 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27980/IB/BF1AA7D2-8B3F-4157-A447-6D700B84C105.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27980/IB/BF1AA7D2-8B3F-4157-A447-6D700B84C105.RemoteToHost
dyoung           27995   0.0  0.3  2869796  46060   ??  S    10:23AM   0:00.60 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27982/IB/2DC08948-3951-4E09-BBC0-CC4C27712A9C.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27982/IB/2DC08948-3951-4E09-BBC0-CC4C27712A9C.RemoteToHost
dyoung           27994   0.0  0.3  2869796  46076   ??  S    10:23AM   0:00.62 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27981/IB/DB22227E-FBD5-46B9-B90D-FF440135ABEC.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27981/IB/DB22227E-FBD5-46B9-B90D-FF440135ABEC.RemoteToHost
dyoung           27982   0.0  0.5  3830728  84644   ??  Ss   10:23AM   0:01.22 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment
dyoung           27981   0.0  0.5  3829860  84672   ??  Ss   10:23AM   0:01.20 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment
dyoung           27980   0.0  0.6  3842552  94472   ??  Ss   10:23AM   0:01.67 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment

One I manually killed all these processes then restarted XCode my compiler error magically went away.

我手动杀死所有这些进程然后重新启动XCode,我的编译器错误神奇地消失了。

#6


-1  

不受支持的编译器com.apple.compile .llvm.clang.1_0'在Xcode 7 Beta 2中选择了架构'x86_64'。

Just use the option of "build for running" this solved my error. I'm using Xcode 8.3 beta_2 on Mac OS Sierra 10.12.3

只要使用“构建for running”选项就可以解决我的错误。我在Mac OS Sierra 10.12.3上使用Xcode 8.3 beta_2。

#1


5  

I met the same issue on Xcode 7 beta 4. I have tried to clean the project for several times but with no lucky. Unbelievably, restart Xcode saved my night. You can try this.

我在Xcode 7 beta 4上遇到了同样的问题。我曾多次试图清理这个项目,但没有成功。令人难以置信的是,重启Xcode拯救了我的夜晚。你可以试试这个。

#2


3  

Solution 1

Close Xcode, open terminal, before anything else, type: “defaults delete com.apple.dt.Xcode” (this addresses your Xcode settings) open Xcode and your project should work normally.

关闭Xcode,打开终端,在其他任何东西之前,键入:“default delete com.apple.dt。Xcode(这是您的Xcode设置)打开Xcode,您的项目应该正常工作。

Plan B

If that doesn't work try this to clear out your cache. Save your files then put this in your terminal:
rm -rf Library/Caches/com.apple.dt.Xcode/

如果这还不起作用,试着清除你的缓存。保存你的文件,然后把它放在你的终端:rm -rf库/缓存/com.苹果. dt.xcode /。

Potential causes

This bug can occur if you declared your pods with single quotes instead of double quotes or for some reason your pod files become corrupted (i.e.: working with p.lists, Google's p.list, firebase etc). I think what triggers the bug to break your code is during certain recompiling phases, for example: opening after unzipping the project, or opening the project after pulling it from GitHub.

如果你用单引号代替双引号或者由于某种原因你的pod文件被损坏了(例如::使用p。列表,谷歌的p。列表,重火力点等等)。我认为在某些重新编译阶段(例如:打开项目后打开,或者从GitHub中取出项目后打开项目),会触发bug破坏您的代码。

#3


1  

With the version (X-code 8 beta 2) I got the following error, because I tried to run it out of the downloads folder:

有了这个版本(X-code 8 beta 2),我得到了下面的错误,因为我试图从下载文件夹中运行它:

Unsupported compiler 'com.apple.compilers.llvm.clang.1_0' selected for architecture 'x86_64'

It helped to put it in the normal Program Folder!

它帮助把它放进了正常的程序文件夹!

#4


1  

Angel's answer worked for me as well. I too experienced this with 8b2, Moving the app to the Program folder instead running out of Downloads resolved it for me.

安吉尔的回答也对我起了作用。我也经历了8b2,将应用程序移动到程序文件夹,而不是下载,解决了它。

#5


0  

In my case with XCode 9.0.1, I noticed that even after closing XCode, I had stuck processes running from an earlier version of XCode running:

在我使用XCode 9.0.1的情况下,我注意到即使在关闭XCode之后,我仍然坚持运行从早期版本的XCode中运行的进程:

$ ps aux | grep Xcode

dyoung           83871   0.0  0.0  2547420    708 s000  S    Tue11PM   0:00.19 /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/DTServiceHub
dyoung           28009   0.0  0.0  2432804    796 s012  S+   10:24AM   0:00.00 grep Xcode
dyoung           27996   0.0  0.3  2869796  46088   ??  S    10:23AM   0:00.65 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27980/IB/BF1AA7D2-8B3F-4157-A447-6D700B84C105.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27980/IB/BF1AA7D2-8B3F-4157-A447-6D700B84C105.RemoteToHost
dyoung           27995   0.0  0.3  2869796  46060   ??  S    10:23AM   0:00.60 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27982/IB/2DC08948-3951-4E09-BBC0-CC4C27712A9C.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27982/IB/2DC08948-3951-4E09-BBC0-CC4C27712A9C.RemoteToHost
dyoung           27994   0.0  0.3  2869796  46076   ??  S    10:23AM   0:00.62 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool --hostToRemoteFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27981/IB/DB22227E-FBD5-46B9-B90D-FF440135ABEC.HostToRemote --remoteToHostFIFO /var/folders/k6/80v30vf13kdc8qd2rjtq35640000gn/T/ibtoold-27981/IB/DB22227E-FBD5-46B9-B90D-FF440135ABEC.RemoteToHost
dyoung           27982   0.0  0.5  3830728  84644   ??  Ss   10:23AM   0:01.22 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment
dyoung           27981   0.0  0.5  3829860  84672   ??  Ss   10:23AM   0:01.20 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment
dyoung           27980   0.0  0.6  3842552  94472   ??  Ss   10:23AM   0:01.67 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment

One I manually killed all these processes then restarted XCode my compiler error magically went away.

我手动杀死所有这些进程然后重新启动XCode,我的编译器错误神奇地消失了。

#6


-1  

不受支持的编译器com.apple.compile .llvm.clang.1_0'在Xcode 7 Beta 2中选择了架构'x86_64'。

Just use the option of "build for running" this solved my error. I'm using Xcode 8.3 beta_2 on Mac OS Sierra 10.12.3

只要使用“构建for running”选项就可以解决我的错误。我在Mac OS Sierra 10.12.3上使用Xcode 8.3 beta_2。