Xcode 14 project compile error ... com.apple.xcode.tools.swift.compiler is not absolute

I am using a static linked c library in my project. There was no error in Xcode 13 but I am starting to get error below after upgraded to Xcode 14.

This error doesn't seem to stop build from completing successfully.

Dependency for P1:target-SwiftSMB-f940fa9bfd7461b6bfd7a1821b88923283a44e681aeb1f425a9cef51a7a8aacb-:Debug:SwiftDriver Compilation Requirements SwiftSMB normal x86_64 com.apple.xcode.tools.swift.compiler is not absolute (libsmb2/include/smb2/smb2.h).

...

Showing All Errors Only Command SwiftDriver Compilation Requirements emitted errors but did not return a nonzero exit code to indicate failure

In our case it was invalid HEADER_SEARCH_PATHS.

we had HEADER_SEARCH_PATHS = … /**

while we should have HEADER_SEARCH_PATHS = … /include

the following steps may help you

(1)remove all “user header search path “ values  (2) clean DerivedData  (3) exit XCode then Restart XCode  (4) Restart computer  (5) restart project 

I had that issue in a legacy project when macOS was added as a run destination, I think as a side effect of an Xcode update .

Removing macOs from the supported destinations in the General tab of my target fixed it for me.

Xcode 14 project compile error ... com.apple.xcode.tools.swift.compiler is not absolute
 
 
Q