After updating to XE6 recently, we're having issues with frequent, but random, instances of compiler error F2063 - Could not compile unit.

After updating to XE6 recently, we're having issues with frequent, but random, instances of compiler error F2063 - Could not compile unit.

However, there are no other errors at all, and a full build always solves the issue, so there's not an actual code issue. Simply recompiling usually lets it move on, though it usually fails on another unit.

The units it fails on is completely arbitrary and there is no discernable pattern at all.

This is especially an issue in our CI builder, as doing full rebuilds there significantly slows down the CI cycle. However all of us are plagued with the issue, so it's not a OS or installation thing.

We've not had any such issues with our previous Delphi versions.

Anyone else been experiencing this?

Comments

  1. Not sure really, as I have a habit of building instead of compiling.  I'll try to see if it happens to me as well.

    ReplyDelete
  2. Lars Fosdal Yeah personally I usually build as well, as there was some issues similar to this back in the D3-D7 times. I haven't been able to nail it down, but it seems to happen most frequently when compiling first time after loading a project. Even if you just closed the very same project and had recently compiled it.

    ReplyDelete
  3. Well, I can verify that it happens.  Another F9 goes straight past it though.

    ReplyDelete
  4. Don't know if this applies here, but these two approaches might help: 1. avoid circular unit references and 2. add all used units to the project.

    ReplyDelete
  5. Uwe Raabe Circular unit refs, that's pretty much unavoidable. 

    All used units... well, a quick count gives me roughly 3500 units, in a ton of directories... urgh.

    ReplyDelete
  6. Asbjørn Heid I am still waiting for a proof that circular unit refs are unavoidable. Cumbersome, yes - but possible.

    For the used units, I don't refer to standard or library units, of course. But I admit, there might be cases where this is less desirable.

    ReplyDelete
  7. Uwe Raabe Of course it's technically possible. Just put all your code in the dpr file! However in any sane practice, it's unavoidable.

    It'll check out our unit references though, might be some direct references that are missing but are found due to include file paths.

    ReplyDelete
  8. My Delphi Unit Dependency Scanner can help you visualise your unit structure and highlight circular references -http://www.easy-ip.net/delphi-unit-dependency-scanner.html

    ReplyDelete
  9. Paul Thornton Cheers, I'll take it for a spin and see.

    ReplyDelete
  10. Paul Thornton Seems it ignores files which are included in a "side directory", ie uses foo in '..\dir\foo.pas'.

    ReplyDelete
  11. +Asbjørn Heid-As long as you add the correct path in the settings, all the files should be found.

    ReplyDelete
  12. Paul Thornton Yeah ok, then it finds them. That's not strictly correct though, is it? I mean, I was under the impression the compiler ignored the search path when you used the "in" keyword. Perhaps I'm just rusty.

    ReplyDelete
  13. And yeah, found some circular dependencies (as well as several "semi-circular" ones). Time to clean up and see if that helps. Thanks again :)

    ReplyDelete

Post a Comment