Search code examples
iosxcodemach-omacos-montereyxcframework

Xcode 13.3/XCFramework compile error: section __DATA/__bss has type zero-fill but non-zero file offset for architecture arm64


One of my XCFrameworks throws the following error when building with Xcode 13.3 on running on the M1 chip.

section __DATA/__bss has type zero-fill but non-zero file offset for architecture arm64

There is no error with the same project on Xcode 13.2.1 running on Monterey. Also no error with Intel chips running on any Xcode or macOS version.

Has anyone seen this issue yet and know of a potential solution?


Solution

  • I got this error in the first place because I was using bogo's arm64-to-sim tool on Github to patch some of my existing frameworks to run on a simulator on an M1 chip. I updated to the latest version of the tool that fixes this issue, and it resolved. The fix is here: https://github.com/bogo/arm64-to-sim/pull/8