error: lipo: can't move temporary file: (No such file or directory)

Hi,

I am building xcode projects from both the command line and from within xcode.

I am encountering the following lipo error:

error: lipo: can't move temporary file: /Users/james/Work/KDI/Build/Debug/libMyLib.dylib.dSYM/Contents/Resources/DWARF/libMyLib.dylib to file: /Users/james/Work/KDI/Build/Debug/libMyLib.dylib.dSYM/Contents/Resources/DWARF/libMyLib.dylib.lipo (No such file or directory)

(The names have been changed to protect the innocent.) ;)

Most of the time, this error happens occasionally and rebuilding the project solves it. It usually (but not always) happens when switching from building on the command line to building in xcode. At least, that's been the most consistent way to reproduce it.

However, I say "most of the time", because now it's happening every time with one particular project.

Does anyone know what's causing this, and, more importantly, how to fix it?

(I'm using XCode Version 14.2 (14C18) on Mac OS Ventura Version 13.3.1 (22E261) running on Apple Silicon.)

After some investigation, it appears these errors are coming from a postbuild step we have set up that runs dsymutil which, in turn, invokes lipo.

That still doesn't explain why I'm getting errors in the first place though.

error: lipo: can't move temporary file: (No such file or directory)
 
 
Q