3

After adding StoreKit to my Xcode 5 project, I now see...

"Malformed or corrupted AST file: mismatched umbrella header in submodule"

...whenever I've imported any header from StoreKit. I haven't changed those system headers, and clearing derived data and the usual Clean Build Folder fix doesn't work either, nor does restarting Xcode change anything.

I see in the Clang sources where the error is being reported, but I can't tell why. Here's the relevant Clang code from http://clang.llvm.org/doxygen/ASTReader_8cpp_source.html:

case SUBMODULE_UMBRELLA_HEADER: {
03728       if (First) {
03729         Error("missing submodule metadata record at beginning of block");
03730         return true;
03731       }
03732 
03733       if (!CurrentModule)
03734         break;
03735       
03736       if (const FileEntry *Umbrella = PP.getFileManager().getFile(Blob)) {
03737         if (!CurrentModule->getUmbrellaHeader())
03738           ModMap.setUmbrellaHeader(CurrentModule, Umbrella);
03739         else if (CurrentModule->getUmbrellaHeader() != Umbrella) {
03740          Error("mismatched umbrella headers in submodule");
03741           return true;
03742         }
03743       }
03744       break;
03745     }

It evidently compares my imported umbrella header

#import <StoreKit/StoreKit.h>

to something else, but I can't determine what that something else is.

Has anyone else encountered this, and hopefully found a way to resolve it?

  • 1
    I was able to resolve it somewhat mysteriously by following the direction in : 1. Go to Build Settings 2. Search for 'framework search path' 3. And delete the pre filled path. – John Blackburn Dec 15 '13 at 16:38

4 Answers4

4

I was able to encounter this problem, following the direction mentioned by John above doesn't work for me. I was able to solve this problem by doing the following:

  • close all open XCode projects.
  • Delete all the folders inside Derived Data folder.

How to go to Derived Data folder? just right click on your Product build and show finder, browse through the hierarchy of folders and look for Derived Data.

Hope this helps. This seems to be a bug in Xcode? but not sure.

pinkLD
  • 51
  • 2
4

This solved it for me:

  1. go to project build settings
  2. scroll down to LLVM 5.1 Language Modules
  3. set Enable Modules (C and Obj C) to NO
32Beat
  • 284
  • 2
  • 2
  • LoL! This is kind of gory, but it works… The module is a new LLVm feature which reduces the build time. At least, when it does not prevent the build to succeed! – MonsieurDart Jun 17 '14 at 13:29
  • Just to add that in my case the issue is happening only for my unit test target, so I just disabled the modules for this particular target… Till I find a better solution. :-/ Thanks! – MonsieurDart Jun 17 '14 at 13:31
3

In Xcode go to Window->Organizer->Projects select your project and press delete button next to Derived data. Just did it (and it worked) with information the following question:

fatal error: malformed or corrupted AST file - Xcode

Community
  • 1
  • 1
kjbradley
  • 335
  • 2
  • 4
  • 20
-2

In your Project folder there would be couple of folders named Derived Data and build. Just remove those folders and the problem would be resolved. These folders get created automatically once you open your XCode.