Recently I got to work on a Swift project on a mac with a M1 chip.
This project uses the normal swift package manager but also has Moscapsule (https://github.com/flightonary/Moscapsule) manually installed. Therefore it gets compiled before all other dependencies and the app the package is used for.
If you compile and run the app on an iPad-Simulator you need to tell the Moscapsule target to compile for x86_64 architecture because it uses a x86_64 iPad simulator. This works absolutely fine.
Then I tried to compile and run the UI Tests for the app. Now the compiler failed to build the app because the compiler needs the Moscapsule framework compiled for arm64 architecture.
I thought: Ok no problem, then compile it for arm64 architecture. But then I get these errors:
The interesting thing to mention is that if I compile the app or the UI Tests for a real arm64 device (iPad Pro with M1 Chip) there is no problem at all.
Did one of you have a similar problem already and has a solution for me?
Thank you!
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?
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
In theory, it should be possible to use previous Swift toolchains with new Xcode versions, so that you can continue to compiler your code before having to upgrade the Swift version. You can download toolchain version at https://swift.org/download.
However, while apps do compile after switching the toolchain in Xcode preferences and using Xcode 10.2 for the command line tools - running them results in this error on launch:
dyld: Symbol not found: _OBJC_CLASS_$__TtCs12_SwiftObject
Referenced from: ~/Library/Developer/CoreSimulator/Devices/CAAB28E5-9B4A-41A3-ADED-A481A62842BA/data/Containers/Bundle/Application/<Redacted>/Frameworks/PhoneNumberKit.framework/PhoneNumberKit
Expected in: /Library/Developer/Toolchains/swift-5.0.1-RELEASE.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib
in ~/Library/Developer/CoreSimulator/Devices/CAAB28E5-9B4A-41A3-ADED-A481A62842BA/data/Containers/Bundle/Application/<Redacted>/Frameworks/PhoneNumberKit.framework/PhoneNumberKit
There's some discussion around a similar error in previous Xcode betas, on GitHub, Apple forums, and elsewhere that suggest it's either and issue with Carthage or the beta - and possibly just the third-party lib I'm using itself.
Has anyone encountered this before? Is it possible to use old toolchains with newer Xcode versions?
i'm using assimp.a and freeimage.a with voufria ar base on
https://github.com/DrNeuroSurg/REVu/tree/master/REVU_IOS
I'm trying to build an app I've been working on for 64-bit iOS and it's failing at the linker. The error is this:
ld: 128-bit LDR/STR not 16-byte aligned: from __ZN13CResizeEngine16horizontalFilterEP8FIBITMAPjjjjPK10tagRGBQUADS1_j (0x1006FFF20) to l005#0x00000850 (0x100B825D8) in '__ZN13CResizeEngine16horizontalFilterEP8FIBITMAPjjjjPK10tagRGBQUADS1_j' from /Users/xxxxx/Desktop/sharq_final/El-shareq/AR/QCAR/REVU_IOS/FreeImage/lib/ios/freeimage.a(Resize.o-arm64) for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anybody run across something like this while porting to 64-bit (or ever)?
I believe this is due to a clash of clangs. FreeImage.a was built with the latest clang from Xcode 6.3.1.
Make sure you have the latest Xcode Installed.
Do a clean, restart your Mac and try again.
The only reference I could find similar to this issue was at this link, and it was solved with these steps:
http://www.politepix.com/forums/topic/linked-errors-with-openears-iphone-5s/
I have posted an issue on the openFrameworks github as well with some more information:
https://github.com/openframeworks/openFrameworks/issues/3984
I have a project which compiled perfectly in the past, but after the last Xcode update (6.3.2) I get a compile error whenever I try to run it directly on a device. Building and Running it in the simulator works fine. The Archive function works fine as well. But no matter what device I connect or what iOS version the device is running, I always get the same compile error:
Stack dump:
0. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h:221:39: current parser token 'NS_REQUIRES_NIL_TERMINATION'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: arm-apple-darwin14.3.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.m
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.cache
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.sh
clang: note: diagnostic msg:
********************
It shows me random files that I'm supposed to submit to the bug report.
I haven't made any code changes from a working version to the version causing the current problems and I even reverted to an earlier version which is live and running in the Appstore but still the same error.
I have deleted xcode and installed again trough the app store
I tried making changes to my code to maybe pinpoint any problems but since the source file of the problem changes every time, I don't really think anymore that it has anything to do with my code.
This is driving me mad.
Any help is much appreciated
I tried to add the paypal framework to my iOS Project (Using Xcode 7.2 and Objective-C language), When building it is not giving any error, but when I try to archive the Project and trying to make the IPA, I am getting that Error
unable to execute command: Segmentation fault: 11
Screenshot:
After huge trying I have disabled the Bitcode in Project's Target->Build Settings->Enable Bitcode. Now the build can be achieved. Please check the following screenshot.
I found a fix for my problem:
I'm using a virtual machine and opened the project directly in the shared folder. I moved the project to the documents and now it works!
unable to execute command: Segmentation fault: 11.
I was able to turn off the bitcode and able to achieve the ipa.
An in depth of what bitcode means can be seen here
We've just realized that segfault was caused by invalid unicode characters in our sources.
If you are using a virtual machine, then copy the files inside the virtual machine, don't import from your shared files, and it will work.
I had the exact same problem.
In my case I looked at the offending file and played around with it. I was able to resolve the error by commenting out a giant NSDictionary declaration:
NSDictionary* glyphNameToUnicode = [[NSDictionary alloc] initWithObjectsAndKeys:
#"A", #"A",
#"\u00C6", #"AE",
#"\u01FC", #"AEacute",
#"\u01E2", #"AEmacron",
This thing had probably 300 lines maybe more. Instead I moved the declaration into a file and loaded the dictionary from the file. Not sure if that helps, but in my case those files were not random...
Its deff a bug with xcode though...
Pods are provided xcode/.... path for installation from git and i installed xcode 7.3.1 and its named like xcode3 so i face this type of error but when i renamed it to xcode then this error is solved for me.
So In summary, First of all please check your xcode name in application section.
If it is not xcode then please rename it to xcode and try to run your app.
Apparently it was a bug in my Xcode version. Had to revert to an old one and everything worked again. With the newest update everything was working ok again.
In order to solve a problem (a known bug closed as a duplicate as of this writing) that caused apps built under 10.12 (macOS Sierra) to fail to launch under 10.9 (even when they'd done so without trouble previously), I'd installed 10.11 and Xcode 7.3.1 under a VMWare instance. Xcode (due to laziness on my part) was copied to the Desktop.
After reading SmarterSusheel's answer regarding a renamed Xcode, it dawned on me it may be path-related, so I moved Xcode to /Applications and tried again. Problem (mostly) solved. I say "mostly" because I also had to copy my project folder into the VMWare instance since it seemed to have issues building under the shared folder as well.
Setting Link-Time Optimization to NO in both Debug and Release mode is what resolved the problem for me.
I was facing similar issue:
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Simply updating from Xcode 7.2 to 7.3.1 has resolved the issue!
I only had problem for i386 architecture when building for iPhone 4s simulator running 9.3
When disabling bitcode didn't work (suggested above), i tried to look at the source code. I didn't find any ascii related stuff (suggested by others), so I tried to comment out method by method until I found the offending line. For me the error was caused by this:
let keyboardSize = ((info![UIKeyboardFrameBeginUserInfoKey] as AnyObject).cgRectValue.size)
Changed it into:
let keyboardSize = (info![UIKeyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue.size
Quit and reopen the Xcode worked for me !
make sure you clean the build folder after reopening the Xcode !
I was facing similar issue:
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
then i was change my Provisioning profile.