Error message when building upgraded framework target

Hello,

I have a workspace with a framework project from before Xcode 14. It links to four external frameworks(no cocoa pods or SPM).

When I compile, I get the following error:

Dependency for P0:target-MyTarget-98b0bea19fac02a3306518d8bebb7db7e90b4d78a49724033552d3dffd5a3b44-:Release:SwiftDriver Compilation MyTarget normal arm64 com.apple.xcode.tools.swift.compiler is not absolute (Frameworks/Mapbox.framework/Headers/MGLMapCamera.h).

And I get one of these for every single header in the framework. I don't get this if I use a new project created in Xcode 14.

What gives? I've been searching high and low for any information on what that even means to no avail. I even searched the SwiftDriver source on GitHub.

For that matter, why is the swift compiler doing anything with an Objective C SDK?

Any insights are appreciated.

Answered by abushnaq-work in 730736022

So I don't know if this will help anyone else but I was able to fix this in my project as follows -

  1. Remove the reference to the frameworks.
  2. If your frameworks are in a folder, get them out of the folder and into the same folder that contains your project file.
  3. Deleted derived data content.
  4. Re-add your frameworks.

That fixed it. I don't understand why that would fix it beyond a toolchain bug affecting upgraded projects.

Additional information - happens in debug and release modes, targeting simulator and device, on an Intel and M1 Mac.

I am also getting this for a c library wrapper project. Interestingly the Build succeeded even with a bunch of errors like below. Rebuild project with Xcode 14 didn't fix my problem :(

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

I had the same problem, the compilation was successful, but an error was displayed.

Hello, have you solved this problem? I have the same problem as you. I wonder if Xcode has a bug.

Same problem here.

I would really appreciate any efforts of Apple to document what these kind of error messages mean.

I had same issue and fix it with

  1. Clean workspace
  2. Close Xcode
  3. Remove Derived data to trash
  4. Reboot my mac (Intel)
  5. Reinstall pods
  6. Launch workspace and wait until idex finish
  7. Build project

Ivan B.

Hi all,

For those still facing the issue, I'm still in the same boat. I tried the steps from the last poster before and still got nowhere. I also get this on multiple machines.

Accepted Answer

So I don't know if this will help anyone else but I was able to fix this in my project as follows -

  1. Remove the reference to the frameworks.
  2. If your frameworks are in a folder, get them out of the folder and into the same folder that contains your project file.
  3. Deleted derived data content.
  4. Re-add your frameworks.

That fixed it. I don't understand why that would fix it beyond a toolchain bug affecting upgraded projects.

Error message when building upgraded framework target
 
 
Q