Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ios

xcode5

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?

like image 468
John Blackburn Avatar asked Jan 31 '26 07:01

John Blackburn


2 Answers

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.

like image 173
pinkLD Avatar answered Feb 01 '26 22:02

pinkLD


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
like image 30
32Beat Avatar answered Feb 02 '26 00:02

32Beat