20

All of a sudden my project fails to build in Xcode. If I look at the log I see all the needed dependencies being built, and then I get a strange error:

Verify final result code for the complete build operation
Build operation failed without specifying any errors. 
Individual build tasks may have failed for unknown reasons.

I removed my code directory and replaced it with a backup, did a clean, tried building all the other components separately (they succeed) - nothing works. I tried a command line build, same issue.

There were only a few hits on google for this error, none offered any useful advice.

Can anyone please help?

Update: When I run the command line build, I see the following error:

2012-05-25 08:55:53.830 xcodebuild[3358:4203] No recorder, buildTask: <Xcode3BuildTask: 0x400f35e60:'ProcessPCH MyProject-Prefix.pch':REfc(32370056113422336):deps=0:phaseNum=4>

I checked the output of xcodebuild and it is returning '65'.

I thought there might be a problem with the MyProject-Previx.pch file, so I shut off "Precompile Prefix Header", and now I get the same error with a different file:

2012-05-25 09:15:11.784 xcodebuild[3882:3703] No recorder, buildTask: <Xcode3BuildTask: 0x40048ab60:'CompileC HelperRoutines.m':REfc(33777199068741632):deps=0:phaseNum=4>
Pascal
  • 16,846
  • 4
  • 60
  • 69
Locksleyu
  • 5,192
  • 8
  • 52
  • 77
  • 1
    Having too many files and folders in the directory or sub-directories of where the project or workspace is located can cause this error. – jjxtra Sep 17 '16 at 20:23
  • 1
    @jjxtra, we’re having the same issue and we think it can be linked to the amount of files. How did you solved it? Do you have any hint? – Lunatic999 Jan 18 '17 at 13:48
  • @lunatic999 I had accidentally copied a dir with thousands of file to the same folder. Moving it out fixed it. – jjxtra Jan 18 '17 at 15:09

22 Answers22

9

Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons. One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem. Some individual build task failures (up to 12) may be listed below.

I've run into this problem consistently recently while running Xcode 9.0 Beta 3 and Xcode 8.3.3.

The fix is to delete ALL in the Derived Data folder. It then seems to work again.

rm -rf ~/Library/Developer/Xcode/DerivedData

NOTE: just cleaning the build or deleting the current build folder for a project does not seem to help.

Hope this helps :)

maninvan
  • 890
  • 9
  • 10
5

I was hitting this error and it infuriated me for an hour or so. The answer below helped me out a lot: essentially your machine has a ton of running processes, XCode can't handle it, and rebooting your machine is the best answer.

https://stackoverflow.com/a/13183522/1863655

Community
  • 1
  • 1
Mike
  • 1,112
  • 1
  • 13
  • 20
5

I looked around for a bit and the only one that worked for me was shortening my project folder name.

All other tries: restarting, recloning, deleting derived data, etc. didn't work. The only thing that worked was making the project folder name shorter.

Hedylove
  • 1,724
  • 16
  • 26
3

I also encountered same error. I was edited .pch (Prefix Header) file. Then I started getting this strange error. Then I removed all editions which I made in .PCH. Then I quit my Xcode. When I restarted Xcode this strange error was gone.

Hope this will work for you also. Best luck Buddy (y)

Nishu_Priya
  • 1,251
  • 1
  • 10
  • 23
TheGhost
  • 159
  • 1
  • 6
  • 1
    Along the same lines - I had made changes to my .pch file. I merely commented out the changed lines, started a build, and then stopped it. Then I uncommented the lines, and it built fine. Weird! – Chris Garrett May 31 '13 at 18:41
  • Similar story here too - turned out when adding my header to the pch Xcode used 4 spaces instead of a tab character to indent. Copy/Pasting an existing tab to use as an indent fixed the issue. So fussy. @ChrisGarrett I guess the commenting allowed xcode to format it "correctly" – Max Chuquimia Sep 30 '14 at 04:45
  • This helped me solve it. In my case, `GCC_PREFIX_HEADER` in an `.xcconfig` was set to a nonexistent file. No need to restart Xcode either. – usm Mar 25 '22 at 15:24
3
Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons.
One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem.
Some individual build task failures (up to 12) may be listed below.

This happens occur when the total path length is too long.

change the folder name or location of directory, shorter then before.

BLICK
  • 41
  • 3
2

Happy 2019, everyone, but sad to say this can still happen in Xcode 10.2.

I had four projects open in Xcode but only one failed in this way. I tried a main menu > Product > Clean Build Folder. The little progress spinner started up and 5 minutes later was still spinning. Hmmmm.

So I quit Xcode and in Terminal did a cd ~/Library/Developer/Xcode/DerivedData. Although ls -alww showed only one subfolder named after each of my other projects, as expected, there were five subfolders whose name began with the name of the problem project. I deleted all of them

rm -R ProblemProjectName-*

and relaunched Xcode. Problem solved.

Jerry Krinock
  • 4,860
  • 33
  • 39
0

Mine gave this error sometimes, also LLVM failed with exit code 1 and clang failed with exit code 255, at different code locations each time. I just had to reboot (OS X 10.7, Xcode 4.5).

jab
  • 4,053
  • 3
  • 33
  • 40
0

I rebooted, no luck. Then I noticed that when I relaunched XCode, one of my tabs was loaded with no file in it. I figured out what file I was editing in it, opened it, saved it and then I was able to build.

Jeremie Weldin
  • 184
  • 1
  • 10
0

None of these answers worked for me on XCode 5.

Luckily, I'm still only testing XCode 5 - I kept XCode 4 around.

XCode 5 simply won't build one of my two projects, claiming that my libraries aren't built with the right settings, and I keep running into the error described on this page on the other one... so I'm sticking with XCode 4, which builds both of my projects perfectly well.

If you are experiencing this issue on XCode 5, consider "reverting to XCode 4" as another strategy.

Overall the idea that repeatedly running a program, XCode or not, degrades your system to the point where you have to reboot does not fill me with confidence in that program.

Tom Swirly
  • 2,740
  • 1
  • 28
  • 44
0

With Xcode 5.0.0, this error was caused after an update to the CLI tools.

Updating to Xcode 5.0.1 and installing all the required components again still didn't fix the error. However, 5.0.1 was kind enough to actually emit an error that was useful.

/bin/mkdir -p /Users/xxx/Documents/XCode/SampleApp/bin/SampleAppDebug.app/Contents

error: (null)

This lead me to look at the bin folder, and find out that the 5.0.0 build with broken CLI tools had made a symlink in bin/ to the derived information folder with SampleAppDebug.app, which for some reason it could not write to.

I manually removed all contents of the bin/ folder and rebuilt without errors.

Darryl E. Clarke
  • 7,537
  • 3
  • 26
  • 34
0

I faced same problem. I have change my System time.I delete file "/Users/YOURNAME/Library/Developer/Xcode/DerivedData/ModuleCache/YOURBUNDLEID/UIKit.pcm". Then it's work fine for me. Try this.

kb920
  • 3,039
  • 2
  • 33
  • 44
0

I added into the Framework search paths the header file location.... removing this from the top level project settings fixed the issue for me.

Change at your peril.

peter_gent
  • 175
  • 2
  • 4
  • 17
0

The only workaround, that works for me - push your code to git repo and clone it to new location. I highly recommend to reclone your repo, because you'll deal with some random problems if you prefer rebooting/turning off and onXcode.

Nikita Took
  • 3,980
  • 25
  • 33
0

did you set "Perform Single-Object Prelink" to Yes? try turn it off.

i had the similar problem. i have tons of files in a static library. reducing the number of files or setting "Perform Single-Object Prelink" to NO solved my problem.

tedzhou
  • 31
  • 4
0

Same error and following didn't work for me for Xcode 6.3.2 on Mac OS X Yosemite 10.10.3:

  1. Git discarded changes to last successful build point
  2. Creation of new fresh project from scratch from a builtin template (though I cannot recall whether it built successfully or not)
  3. Restart of Xcode
  4. System Reboot

and the following worked:

  1. I faced the problem in the morning and it got resolved in the evening with a couple of Xcode restarts and System reboots and creation of new project. So, I'm not sure what really triggered.
zeeawan
  • 6,667
  • 2
  • 50
  • 56
0

I faced the same problem today. Cleaning the DerivedData and cloning the project somewhere else didn't help. What fixed my problem was repairing the volume from the Disk Utility app and removal of all Xcode plugins.

Cristik
  • 30,989
  • 25
  • 91
  • 127
0

I have encountered same issue without having any code changes for my project running on Xcode 9.2. It looks like if you have some run scripts or external build systems attached to the project, this might cause an issue. Try committing or discarding changes and build again. If it still persist, delete local repo and clone again. Also maintain smaller folder names for project location.

Achu22
  • 266
  • 2
  • 7
0

Same issue when added watchOS target inside iOS app, using Xcode 11.1 with SwiftUI:

  • Go to menu Xcode / Preferences / Locations
  • Open Derived Data folder in Finder clicking on the arrow next to /Users/yourUserName/Library/Developer/Xcode/DerivedData
  • Locate your app Derived Data folder and delete it
  • Menu Product / Clean Build Folder

You should be able to compile again.

Marcos Reboucas
  • 3,409
  • 1
  • 29
  • 35
0

I know this is super late to answer but I'm answering since none of the above solutions worked. For me restarting, clean building, deleting derived data nothing worked. Because the issue was not due to any zombie objects or something like that. I'm using Xcode 11. I think it's an Xcode bug that sometimes errors are not shown in the issue navigator. But don't worry check the build report in Report navigator(The last tab in project navigator: the one that looks like a comment box with lines in it. or simply cmd + 9).

Report navigator

Click the relevant build and resolve the issue, mine was missing file in pods directory. build logs

SPS
  • 359
  • 3
  • 12
0

just try to rename the folder name of the project. it did the trick for me

Miras Maratuly
  • 216
  • 2
  • 14
0

I had this same problem, however the accepted solution did not work for me, what worked was:

  • deleting .workspace file
  • deleting Podfile.lock file
  • deleting the Pods folder
  • pod deintegrate ; pod install
danywarner
  • 928
  • 2
  • 15
  • 28
0

For me it was fixed by changing to the new build system(in File -> Project settings)

I have Xcode 11.7

Simon Moshenko
  • 2,028
  • 1
  • 15
  • 36