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

4

6

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
       ^
Mangonel answered 23/4, 2015 at 13:37 Comment(1)
For me, the problem went away when I removed and re-added the #import <Cocoa/Cocoa.h> statement.Hemihydrate
M
0

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
Mangonel answered 23/4, 2015 at 13:44 Comment(0)
C
17

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

Carnotite answered 15/6, 2015 at 8:46 Comment(1)
This also fixed it for me. You can clean the build folder by pressing ⌥⇧⌘K.Orbadiah
M
0

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
Mangonel answered 23/4, 2015 at 13:44 Comment(0)
G
0
  1. Clean build folder
  2. Close the project
  3. Close Xcode
  4. Restart the computer

This worked for me!

Gapin answered 20/1, 2016 at 15:13 Comment(0)
S
0

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

Scenarist answered 18/2, 2016 at 16:37 Comment(1)
Sorry, that page cannot be found.Landan

© 2022 - 2024 — McMap. All rights reserved.