Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8025] iOS: Precompiled headers modified error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-08-21T21:42:34.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Release 2.1.0, Sprint 2012-06, Release 2.1.1, Release 2.1.2, Release 3.0.0
ComponentsiOS
Labelsn/a
ReporterChris Barber
AssigneeNeeraj Gupta
Created2012-03-14T16:50:15.000+0000
Updated2014-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

FileDateSize
20120316-ek15br2r82brrctydutmy4me1e.jpg2012-03-15T22:54:28.000+000080813
preferences-screenshot.jpg2012-03-15T22:48:55.000+000049100
Screen Shot 2012-03-16 at 12.09.38 AM.png2012-03-15T23:10:33.000+000080220

Comments

  1. Stephen Tramer 2012-03-15

    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.
  2. Chris Barber 2012-03-15

    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.
  3. Stephen Tramer 2012-03-15

    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 deleting iphone Still need more information if this is persisting.
  4. Max Stepanov 2012-03-15

    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
  5. Stephen Tramer 2012-03-15

    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' command
  6. Stephen Tramer 2012-03-15

    Created 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).
  7. Chris Barber 2012-03-15

    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.
  8. Chris Barber 2012-03-15

    Scratch that... Jira has a 10MB upload limit, so I put the video on my website: http://www.cb1inc.com/files/TIMOB-8025.mov
  9. Max Stepanov 2012-03-15

    Chris, will it build if you return previous guid back ?
  10. Chris Barber 2012-03-15

    Max, yes, it compiles just fine when I change the guid back to the original.
  11. Chris Barber 2012-03-15

    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.
  12. Max Stepanov 2012-03-15

    How do you get into that state again then ? Once that happens, do you able to build from Xcode by opening generated project file ?
  13. Chris Barber 2012-03-15

    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?
  14. Chris Barber 2012-03-15

    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.
  15. Max Stepanov 2012-03-15

    It might be TiStudio issue. Try uncheck in Preferences/Titanium Studio/"Auto-detect modifications to projects made outside of IDE"
  16. Chris Barber 2012-03-15

    I can't seem to find that setting. Where exactly is it?
  17. Max Stepanov 2012-03-15

    menu Titanium Studio/Preferences...; then Titanium Studio in the left tree. The option is at the bottom.
  18. Chris Barber 2012-03-15

    Hmm, my preferences dialog looks different, see attached.
  19. Max Stepanov 2012-03-15

    Ok, on development branch you use it was merged into Preferences:General/Workspace/Refresh automatically.
  20. Chris Barber 2012-03-15

    Everything is unchecked. See attached.
  21. Stephen Tramer 2012-03-16

    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.
  22. Stephen Tramer 2012-03-16

    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.
  23. Max Stepanov 2012-03-16

    Stephen, also we may consider to define SHARED_PRECOMPS_DIR pointing to builder/iphone/somewhere folder in our build scripts.
  24. Stephen Tramer 2012-03-16

    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.
  25. Natalie Huynh 2012-03-19

    Closing per Chris as he is no longer encountering this issue on his machine
  26. Davide Cassenti 2012-08-21

    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:
        [ERROR] fatal error: file '/Users/username/Titanium/TestApp/build/iphone/TestApp_Prefix.pch' has been modified since the precompiled header was built
        
    I tried to clean the project from Studio and to delete the directory DerivedData, but none helps.

JSON Source