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.

Accepted Reply

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.

  • Followed the steps but unfortunately this didn't work for me. I have a bunch of c header files included to my project like $PROJECT_DIR/lib/include and I added this to "Header Search Paths"

  • This fixed the non-failing build issues for our project, and it seems to have fixed the broken Live Errors with Xcode 14.1 on my machine as well! Thank you much for this!

Add a Comment

Replies

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.

  • I have follow this, but not work Does it mean 1.Clean workspace -> clean build folder 5.Reinstall pods -> delete the pod file and pod install?

Add a Comment

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.

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.

  • Followed the steps but unfortunately this didn't work for me. I have a bunch of c header files included to my project like $PROJECT_DIR/lib/include and I added this to "Header Search Paths"

  • This fixed the non-failing build issues for our project, and it seems to have fixed the broken Live Errors with Xcode 14.1 on my machine as well! Thank you much for this!

Add a Comment