Apple LLVM 6.0 Error After Changing Architectures - ios

I have been working on reviving an older open source project, and when I updated the architecture from $(ARCHS_STANDARD_32_BIT) to $(ARCHS_STANDARD), Xcode gave me a very long error with the title Apple LLVM 6.0 Error which ended with the line Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1. I tried undoing the architecture change, but it still gave the error when I ran it again.
The previous build worked perfectly, and the only changes that were made on the erroneous build were:
1) I moved the project to Dropbox
2) I changed the architecture
Here is the full error: http://pastebin.com/huLnWc7v

Try This , It may solve your problem.
Issue: Compiler unable to locate .pch file. This is because Location of Prefix Header file .pch in Project Target is incorrect.
The location is defined in Project Target/Build setting. You will need to go to: Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 6.0 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.
Normally Prefix header file is located under "Supporting File" Folder in your project
Reference : Anbu.Karthik

I was trying to compile ARM code as if it were ARM64. Since it's just an app and not an extension, I don't need to do that. So, under Project>Target>Build Settings> Architectures I changed the Architectures key I standard architectures, and the Valid Architectures key to armv7.

Related

Only in release build, clang: error: no such file or directory: '/Users/vagrant/Library/Developer/Xcode/DerivedData

I was building my project fine in debug mode, but started getting this error when I changed to Release
clang: error: no such file or directory:
'/Users/vagrant/Library/Developer/Xcode/DerivedData/myProject-afhcainiqkrasrazkmlyzpkzbhne/Build/Intermediates.noindex/ArchiveIntermediates/skimitarDevelopment/BuildProductsPath/Release-iphoneos/libRNGoogleSignIn.a'
No entirely sure why, libRNGoogleSignIn.a is linked in my Build Phases on all of my targets.
This is first time I came across the issue, tried cleaning my project, deleting DerivedData folder, completely quitting (restarting) XCode with no luck.
libRNGoogleSignIn.a file mentioned in the error refers to this projects Product (https://github.com/Asimetriq/rn-google-sign-in/tree/master/ios)
It is added to my main project as a library i.e. I right click Libraries -> Add files to my project -> I select RNGoogleSignIn.xcodeproj
Afterwards I go to Build Phases and add libRNGoogleSignIn.a under Linking step.
I'm not sure if this is related, but file is highlighted in red:
And file is clearly linked, I'm not sure why it is never appearing in DerivedData
Here is where the issue lies. My main project targets iOS 10.3, where as this library that was freshly created as cocoa touch static library was targeting ios 11+ by default.
As soon as I set libraries target to lower version i.e. 10 in my case it built correctly.
The default iOS Deployment Target for RNGoogleSignin is 7.0, change it to at least 8.0 should solve the problem
Another solution could be delete the Derived data directory and re-build

Restkit/Restkit.h file not found Xcode 6.1

I was working on Project in Xcode 6.1. It was working fine and all of sudden it prompted an error 'Restkit/Restkit.h file not found'. I'm getting error after changing Architectures from $(ARCHS_STANDARD_32_BIT) to Standard architectures (armv7,arm64) - $(ARCHS_STANDARD) which is recommended by Apple Check Link
I have tried following approaches :
1.'Cleaning' project and rebuilding
2. Checked for missing framework in Target -> Build Phases
3. Fixed 'Framework Search Path' of Target
4. I have build Restkit XcodeProject and Targets separately. It builds without error.
I was getting below error while submitting to App Store and hence changed architecture to 'Standard architecture'
Why did this occur all of sudden? How to fix it?
Just to be here. There is similar issue in newest Xcode 7+. You can observe "RestKit/RestKit.h file not found" failure on archive build. You could compile and run apps on emulator but archive would fail.
To fix this you need to add one line to "Header Search Paths" in Build Settings:
"$(BUILD_DIR)/../IntermediateBuildFilesPath/Headers"
Be sure to include the surrounding quotes.
You have not properly changed Architecture , if you have done properly than it will show you like this,
Proper Architecture setting:
So again properly change Architecture and try again.
This is your Architecture Setting
I had used third-party static library in project named libNuance.a. It seems that this static library works fine for 32-bit architecture but failed for 64-bit architecture.
I downloaded updated version of libNuance.a library from their official site and changed architecture to Standard architectures (armv7,arm64) - $(ARCHS_STANDARD).
Vola! build succeeded without any error.
First you can try, look for it in project navigator(left side) and delete if it is red.After that add the RestKit again.Be sure when adding check the copy if needed box and packages contains headers.
Also you may try just #import "RestKit.h"
I had solved this in many cases by deleting the contents of DerivedData folder. See the following questions on how to do this:
Can I safely delete contents of Xcode Derived data folder?
How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?
If you have Pods configured then and if you have upgraded recently your Xcode, try reinstalling cocoapod and all the reinstall all required pods.
I fixed this issue, to change the Header Search Path
"$(SOURCE_ROOT)/RestKit-RestKit-c19a500/Build"
Note : "RestKit-RestKit-c19a500" this is my RestKit folder name.

Apple LLVM 6.0 Error: clang failed with exit code -1

I created my app on my MacBook Air and kept working with it there which was fine. Then I started working with a colleague who used another Mac (of course). Anyway, we share our Xcode project via Dropbox (we are just switching to BitBucket, don't worry ;) ), when he tried to open the project on his Mac there was a Apple LLVM 6.0 Error with the following error while on my computer the same project runs perfectly:
clang: error: no such file or directory: '/Users/linus/Dropbox/Apps/My App/Projekt/My App/SlideMenu/SlideMenu-Prefix.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
The last lines of the error seem most important to me which is why I listed them here.
I do know this question was asked several times now but there was never a useful answer which worked for me. I tried to disable the Foundation Assertions as it said in another answer on this topic but that did not work. Also I restarted & even reinstalled Xcode and all files are existing, none should be missing.
I am running Xcode 6.0.1 and Mac OS X 10.10. I hope someone can answer this, I'm kind of desperate now...
Hey I just ran into the same problem. Basically I deleted my tests target. I found this:
Errors When Compiling iOS 8, Xcode 6.0.1
Which basically says that:
Click on the name of your project on the list of files/folders on the
left in Xcode (at the very top of the list). Look at the "Targets"
section on the left-hand side of the window to the right. Likely,
there's two listed with the second being a "test" item. Right-click on
that item and select "delete". Then try to run the project again. See
screenshot below for a visual cue.
And a picture to help you out:
Hope this helps!
EDIT: Also in the tests target, I actually found that I didn't necessarily need to delete it, there was a broken path, just fixing it makes it all work again.
Make new file: ⌘cmd+N
iOS/Mac > Other > PCH File > YourProject-Prefix.pch.
Project > Build Settings > Search: "Prefix Header".
Under "Apple LLVM 6.0" you will get the Prefix Header key
Type in: "YourProjectName/YourProject-Prefix.pch"
Clean project: ⌘cmd+⇧shift+K
Build project: ⌘cmd+B
Solved this by going to my project settings and changing the deployment target. The deployment target was originally at 7.0. When i changed it from iOS 8.0 -> 9.1 it works fine and there is no error.
Hope that helps :)
You do not need to delete the overall build settings. Just change the Library Search Paths, here are the steps:
Click on your project name (very top of the navigator)
Click on your project target
Click the tab Build Settings
Search for LIBRARY_SEARCH_PATHS
Change its value to $(inherited) flag.
Here you go!
Or else you can always remove the build setting at all! Cheers!
One of the simple things I did I went into "Build Options" and changed the property for Enable Bitcode from yes to no
This fixed my issue.
Screenshot of Settings
clang can't locate your precompiled header file. Have you checked whether there is a file named SlideMenu-Prefix.pch in /Users/linus/Dropbox/Apps/My App/Projekt/My App/ ? The path to the precompiled header file is specified by the "Prefix Header" build setting for your target.
Try,
In Xcode project settings,
Targets-> Tests section-> Build Settings->Linking remove all linkig
OR Remove Tests Section as a whole.
Build again and Its done!!

RestKit - Lipo Error: can't open input file in Xcode5

I have an iOS application that i need to upgrade on iOS7. I am using RestKit version 0.10.2. While archiving i get following error.
/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/khawarshahzad/Library/Developer/Xcode/DerivedData/MyAPP-fcvmsuowvnqkdseskmuetssnxoww/Build/Intermediates/ArchiveIntermediates/MyAPP/IntermediateBuildFilesPath/MyAPP.build/Release-iphoneos/MyAPP.build/Objects-normal/armv7s/MyAPP (No such file or directory)
Previously i had fixed this error for iOS6 by following instructions on
https://github.com/RestKit/RestKit/issues/930
But now its not working for iOS7. Here is screenshot for current RestKit.xcodeproj Architectures settings.
Any suggestion is appreciated.
Huh! finally found the solution. If you are not using any specific feature of arm64 architecture, then just kick it off.
Go to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s. Set Build Active Architecture Only to Yes
Repeat same for RestKit.xcodeproj
Clean your project and Archive.
Best of Luck :)
I had the same Issue and couldn't fix it, so I just removed the restkit files and all its build settings. after that i used Cocoapods for restkit and other frameworks. its much better to work with and all these kinda errors are gone. I'm using it since iOS5 and last week I fixed my app for iOS7
If you need this fix for building from the command line - and you don't have an *.xcodeproj then this will fix it:
Change:
(cd $BUILDDIR/i386; "$SIM_DEV_DIR/ar" crus some.a obj/*.o; )
To:
# have to take ar from ARM_DEV_DIR in xcode 5
(cd $BUILDDIR/i386; "$ARM_DEV_DIR/ar" crus some.a obj/*.o; )
IOW: In xCode5 ar has moved from $SIM_DEV_DIR/ar to $ARM_DEV_DIR/ar

Problems trying to add the libz.1.2.3.dylib to my ipad project

First of all, i'm now on this site so really sorry if i'm commiting some error posting this question.I'm trying to use the zipArchive class to manage zip files in an ipad project.
What steps will reproduce the problem?
Create a project.
Add the ZipArchive folder with their files.
Add the libz.1.2.3.dylib
What is the expected output? What do you see instead?
I have all the code (about ziparchive) commented, so i only have the #import #import "ZipArchive/ZipArchive.h" in my viewcontroller, and i expect to build the project without errors.
I see the following error in the compiler:
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
What version of the product are you using? On what operating system?
I'm using xcode 4 a project for the ipad with the 4.2 ipad simulator on a Mac os X version 10.6.7
Please provide any additional information below.
I think the problem is with the libz.1.2.3.dylib library, and I have some guest of where might be the problem:
The libz.1.2.3.dylib path error is on iPhoneSimulator.platform, it is valid for ipad too?? If is not, which lib could i use for the same purpose with the ipad??
I'm not sure i'm adding the libz.1.2.3.dylib lib correctly. What I have done is: right-click on Resources folder -> add files to "myproject" -> search for the libz.1.2.3.dylib and add the 4.2 version of it from the path u could see in the compiler errors. I also try to add to the frameworks folder with the same results.
I'm reading lots of posts about how to fix similar problems but no one could help me.
Any idea of what I have to do to fix my problem??
Really thanks!!
You need to do this:
Delete libz.1.2.3 from your local Frameworks folder. You don't need it.
Select your project at the top of the Project Navigator.
Select your application target.
Open "Link Binary With Libraries".
Click the "+"
Search for "libz".
Select "libz.dylib".
If you are using Xcode 4.5.2 the screenshots below may aide you in proceeding through steps 2 through 5. I'm not sure if other versions of Xcode are the same or not.
If you are using xcode 4 or upper version of it than it seems that libz.1.2.3.dylib is not included in iOS5 sdk. Here is simple method to fix this:
Open your project in XCode 4.2
Remove libz.1.2.3.dylib from framework
Add new framework libz.1.2.5
Run you app
It works fine.
libz.dylib is an alias to the latest version (currently libz.1.2.5) so you can also navigate to the file's location in Terminal and create a symlink called "libz.1.2.3.dylib".
cd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/
sudo ln -s libz.1.2.5.dylib libz.1.2.3.dylib
You could also link to libz.dylib, which I would expect to always point to the actual latest version, which is why Tricon recommends changing the project to just include libz.dylib. I'm not sure I'd delete anything, although it's not a whole lot different from adding a new symlink...you're still mucking around deep inside the guts of Xcode....

Resources