Xcode 6.3.1 error: Timed out waiting to acquire lock file for module 'X' where 'X' is my framework

蓝咒 提交于 2019-12-07 04:47:13

问题


I have the following projects in my workspace:

  1. Common
  2. Security (dependent on Common)
  3. Data (dependent on Common, Security, (and CoreData))
  4. Api (dependent on Common, Security, Data)
  5. MyApp (dependent on Common, Security, Data, Api)

All of the projects except MyApp are Cocoa Touch Frameworks, mostly written in Swift.

Since Xcode 6.3.1 I'm unable to compile as I'm getting the following message while building my 'Api' framework:

<unknown>:0: error: timed out waiting to acquire lock file for module 'Data'
~/Developer/myapp/src/Api/Api/SomeClass.swift:4:8: error: cannot load underlying module for 'Data'
import Data
       ^

回答1:


I ran into this issue in Xcode 6.3.2 and found that my problem went away when I cleaned the build folder.




回答2:


As for other issues in Xcode 6.3.1, there seems to be a workaround.

I have found that compiling the Data.framework target with the following settings solves the issue:

SWIFT_WHOLE_MODULE_OPTIMIZATION = YES

Although, the compilation takes longer (as Xcode pre-6.3) and I have some troubles using lldb especially in case or printing out NSManagedObject subclasses:

(lldb) po object
error: Error in auto-import:
failed to get module 'NSManagedObjectID' from AST context



回答3:


  1. Clean build folder
  2. Close the project
  3. Close Xcode
  4. Restart the computer

This worked for me!




回答4:


This is fixed in Xcode 7.2.1

Fixed the problem where xcodebuild test timed out while waiting for iOS Simulator to boot. (24173400)

https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40001051-CH5-SW1



来源:https://stackoverflow.com/questions/29825180/xcode-6-3-1-error-timed-out-waiting-to-acquire-lock-file-for-module-x-where

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!