On Dec 13, 2007, at 4:18 PM, Chris Espinosa wrote: On Dec 13, 2007, at 12:49 PM, Kai BrĂ¼ning wrote:
We have a machine (MacBook Pro) with a rather new and clean Xcode 3 install, which does not seem to know about the build-in default rules for data models. An older thread in this list (Xcode can't find momc by Michael Dautermann) reports the same problem, but without solution.
We found that the three missing rules are defined in /Developer/Library/Xcode/Plug-ins/XdesignCompilerPlugin.xcplugin/ Contents/Resources/XdesignCompilerPlugin.xcbuildrules
while the other built-in rules are defined here: /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/ A/Resources/Built-in build rules.plist
Adding a rule for data model files to a target made the project compile, but of course we want to understand the problem and fix the Xcode installation.
The problem is project-independent, even newly created projects show it (that is, no rules for data models).
We tried with another user (which did not touch the Dev Tools at all before) to no avail. We found some caches in /Library/Caches/, but they are per user (dirs with user id in the name), so using another user should have fixed the proble if related to these caches.
In "Xcode can't find momc" Michael Dautermann states "that an uninstall, reboot and reinstall of the Developer Tools didn't take care of this problem". We did not verify this yet.
Comparing to another Xcode installation which works as advertised did not give us any hints. The /Developer/Library/Xcode/Plug-ins/XdesignCompilerPlugin.xcplugin should be self-contained and have everything it needs to compile .xcdatamodel files into .mom files using the momc compiler. If that plugin is present and nothing seems to be screwed up about its components or permissions, then that's not the problem.
There's a remote possibility that an older version of the XdesignCompilerPlugin.xcplugin is being loaded from some other location in your file system, and that its rules are conflicting with the ones in the correct plugin. Do a search (in /Library, ~/Library, and /Developer/Library) for other plugins with that name and remove them if found.
Could you post the error that you're getting when you try to compile a data model?
Chris
Thanks for the fast reply. As I am the one affected (thanks to Kai for bringing me over here) here is the error:
! Checking Dependencies ! warning: no rule to process file '$(PROJECT_DIR)/Models/MYModel.xcdatamodel' of type wrapper.xcdatamodel for architecture i386
The warning is then repeated for my other two models (we currently have 3 and all of them show this error).
I have checked the Libraries as suggested, but there were no old plugins. Once I manually set the Rule (Info for Target -> rules): Process: Data model Files using: Data Model Compiler (MOMC) it works fine and I even can't get rid of that rule as the little - (minus) button at the bottom is greyed out. So I do not have the rule initially, I can add it, but not remove it. New Projects do not have the rule set. Thrashing XCode prefs seems to make no difference. /Developer/Library/Xcode/Plug-ins/XdesignCompilerPlugin.xcplugin looks fine to me, nothing weird about permissions or other things. A repair permissions from disk utility did not help.
Its a clean install of 10.5. and XCode 3 and all softwareupdates.
It's a bit strange.
Thanks for all help, Andi |