[TIMOB-8025] iOS: Precompiled headers modified error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-08-21T21:42:34.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Release 2.1.0, Sprint 2012-06, Release 2.1.1, Release 2.1.2, Release 3.0.0 |
Components | iOS |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Neeraj Gupta |
Created | 2012-03-14T16:50:15.000+0000 |
Updated | 2014-06-19T12:44:01.000+0000 |
Description
When building any iPhone app after doing a clean, I get the following error:
[ERROR] fatal error: file '/Volumes/ultima/projects/titanium/timob-5698-maps/build/iphone/timob-5698-maps_Prefix.pch' has been modified since the precompiled header was built
I'm not alone: http://developer.appcelerator.com/question/130795/ios-cannot-compile-with-19-continuous-build.
It can be fixed by simply changing the guid in the tiapp.xml.
Attachments
File | Date | Size |
---|---|---|
20120316-ek15br2r82brrctydutmy4me1e.jpg | 2012-03-15T22:54:28.000+0000 | 80813 |
preferences-screenshot.jpg | 2012-03-15T22:48:55.000+0000 | 49100 |
Screen Shot 2012-03-16 at 12.09.38 AM.png | 2012-03-15T23:10:33.000+0000 | 80220 |
In order to resolve this, we require more information: * The version of TiStudio * The version of Xcode * The exact version of CI build (githash is preferable over date) * A sample project (complete) which demonstrates the issue.
Titanium Studio, build: 2.0.0.201203121914 Xcode 4.2 build 4D199 Latest master will cause it. This problem has been around for months. Any app will do. Just go into the build directory and kill the iphone directory, then go to run in iphone simulator.
Unable to reproduce on: * TiStudio 1.0.9.201202141208 * XCode 4.2.1 * TiMob SDK 2.0.0.a70a010 * Existing project built for iOS only * Cleaned in TiStudio * Cleaned by deleting contents of
iphone
* Cleaned by deletingiphone
Still need more information if this is persisting.I believe it's related to Xcode Derived Data which is at a separate location and not affected by TiStudio clean. Probably we should clean Derived Data every time we do a clean build in builder.py
Unable to reproduce on TiStudio 2.0.0.201203142055 either. Max should be correct, PCH information is saved in the derived data location where it would become stale if replaced with an updated version. What's the location for "Derived Data" in the Preferences->Locations pane, and the settings under "Advanced..." there? It appears that
xcodebuild clean
does in fact clean the cached PCH stuff after all. We should be adding that to both: * TiStudio * The new 'clean' commandCreated issue TISTUD-1353 so that this can be resolved as part of Studio's cleaning process, if indeed the information that we have is correct. We should be doing this ANYWAY as it will provide a bridge to any build system changes (i.e. no more source file copying).
I don't think this has anything to do with cleaning the project. I've attached a video of what's going on. Please let me know if you want to do a Skype screenshare or have me test anything.
Scratch that... Jira has a 10MB upload limit, so I put the video on my website: http://www.cb1inc.com/files/TIMOB-8025.mov
Chris, will it build if you return previous guid back ?
Max, yes, it compiles just fine when I change the guid back to the original.
So, if I get the error, I change my guid to anything, compile and it will work. If I change it back, it still works, even if I delete the build directory. So I'm not sure I'm not sure if the iphone build directory missing that first time is the cause. I don't get why the guid fixes it. Is the guid getting inserted into a header by the python build script? That's generally a no-no. It's tempting to do that because you can easily assign it to a constant or preprocessor macro, but then you get these header issues.
How do you get into that state again then ? Once that happens, do you able to build from Xcode by opening generated project file ?
I have no clue, but since I made the video an hour ago, I have done a ton of mobile web builds from the command line (not from studio) and then I deleted the iphone dir in the build dir and it now errors again. I don't see how mobile web could be the problem. We don't touch the iphone directory. We do a os.makedirs(self.build_path) where build_path = /path/to/project/build/mobileweb, do you think makedirs() "touches" the build dir and throws off the iphone dir? Are you guys checking the date modified on the "build" dir or soemthing?
I confirmed, that os.makedirs() does indeed modify the dates of the build dir. But since we're dealing with the build/mobileweb directory, we do not touch the date of the build/iphone directory.
It might be TiStudio issue. Try uncheck in Preferences/Titanium Studio/"Auto-detect modifications to projects made outside of IDE"
I can't seem to find that setting. Where exactly is it?
menu Titanium Studio/Preferences...; then Titanium Studio in the left tree. The option is at the bottom.
Hmm, my preferences dialog looks different, see attached.
Ok, on development branch you use it was merged into Preferences:General/Workspace/Refresh automatically.
Everything is unchecked. See attached.
See TISTUD-1353 for the command that needs to be run during the iOS clean - this should be done regardless of the resolution to this issue since clearing out the PCH headers is part of the clean process.
OK, I took another look at this to see where we're processing the guid; it is actually part of the rebuild process which might not be getting triggered correctly from just a clean. Going to take a look at that as well.
Stephen, also we may consider to define SHARED_PRECOMPS_DIR pointing to builder/iphone/somewhere folder in our build scripts.
Assigning back to me; looks like Chase's clean script is in and if there are other GUID problems, I can fix them all at once.
Closing per Chris as he is no longer encountering this issue on his machine
This problem happens again if you perform these steps: 1. Change the computer's date to a future date (even 1h later is ok) 2. Perform a clean build of any project in Studio to iPhone Simulator 3. Change back to the current date From now on, the build won't work anymore for that project and that SDK version, giving the error stated in the description:
I tried to clean the project from Studio and to delete the directory DerivedData, but none helps.