openFrameworks / freeimage.a cause error with ios arm 64 - ios

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

Related

Linker command failed with exit code 1 - old version of ios application

I dont wanna duplikate any question but honestly i tried a tons of solution but any of them worked for me.
I have to update old application from 2013 written in ObjC (Xcode 3.* i think) but i cant even build version that should be able to build. I have xcode 8.3 should i download older one ?
Apple Mach-O Linker Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: library not found for -lcrypto
I will appreciate everything.

Build successfully for iOS Device But Build Error for iOS Simulator (Get other linker flag error)

I have been facing this lingering issue. When I try to Build the project by selecting iOS device in my Xcode it builds the code with out any error but when I trying the same with iOS simulator it shows me the following error.
ld: library not found for -lPods-ClientService
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The issue is that you are trying to use a library that you created yourself or downloaded from a 3rd party with your product, and the linker either not find it, or it does not contain a valid slice for the architecture / platform that you are trying to link.
It is most likely that the library is just an arm library, without an intel slice.
If you are building it yourself, this may be because the library and your app are in two separate Xcode projects. If you integrate them into a single project, the build system should take care of making sure that the library gets built for the correct platform and architecture(s) when building your app.

Linker error when building Unity3D mobile project for iOS in Xcode

I recently updated my OSX to El Capitan and, because of an issue with my previous version of Unity (v 5.0.1 I believe), I was forced to update to the latest version (5.2.1f1). Now, when I build for iOS, I get the following error during the linking process:
ld: framework not found FBSDKCoreKit for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using the Soomla library for in-app purchases and social integration, as well as Parse for the online database. I believe at least one of these libraries could be responsible for this, since they both contain Facebook-related code. In any case, I can't figure out what I need to try next. Both plugins have been updated to their latest versions.
I attempted building with the Mono2x scripting backend first, as usual. Then, I tried changing it to IL2CPP and tried compiling for armv7, arm64, and the Universal architecture options. Nothing worked.
I also tried manually adding the FBSDKCoreKit framework file downloaded from https://developers.facebook.com/docs/ios. This also didn't work, except this time I got a slightly different error:
ld: framework not found FBSDKCoreKit clang: error: linker command
failed with exit code 1 (use -v to see invocation)
I'm not sure why it would say this when I explicitly add the framework into the Xcode project. Could anyone give me any insight?

iOS Xcode compile error: unable to execute command: Segmentation fault: 11

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.

Failing to archive an App with an iOS6 Device

I finally realised why the 'Archive' option was gray. I needed to select an iOS device.
The only device that I currently have with me has iOS6 installed on it.
It says the following when trying to Archive the app:
ld: warning: ignoring file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o,
file was built for armv7 which is not the architecture being linked
(armv6):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o
ld: entry point (start) undefined. Usually in crt1.o for architecture
armv6 clang: error: linker command failed with exit code 1 (use -v to
see invocation)
But I want to support armv6. What should I do?
EDIT: I tried changing the target from iOS4.0 to iOS 4.2 and said the following:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo:
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
and
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
have the same architectures (armv7) and can't be in the same fat
output file Command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo
failed with exit code 1
EDIT: I now managed to archive with just armv7 to iOS 4.0. Is it going to work?
You can't archive an file with IOS6, you need to downgrade to the latest official version to archive.
Edit:
Devices updated to iOS 6 beta can not be restored to earlier versions
of iOS. Registered development devices will be able to upgrade to
future beta releases and the final iOS 6 software.
https://developer.apple.com/devcenter/ios/index.action#
I figured it out. Instead of adding the 'armv6 armv7', I just needed to add 'armv6', as the code for 'armv7' was already written with that other default bizarre code.
That's why it was telling that two armv7 was being built.
Thanks everyone for the help, either way!

Resources