Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-02

Random compiler errors

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Adriaan van Os

I maintain a large 600.000 FreePascal project that compiles for Mac OS X. It mixes MacPascal and Delphi compiler modes. Unfortunately the compiler is now producing random error messages, that disappear on a clean rebuild. The error messages are not clearly reproduceable. Sometimes, everything is OK, sometimes the incorrect error messages are there.

I suspect corrupted .ppu files, I there a way to use a tool (like ppudump) or a specially built compiler to investigate this problem systematically, to get an idea of what is wrong ? I do builds through a Makefile. I could image always adding a ppudump to the builds and then looking at the output when random error messages popup, comparing the output to previous builds. Something like that.

An automatic "ppu sanity mode" inside the compiler would even be better.

Regards,

Adriaan van Os

Reply by email

Sven Barth
to Adriaan van Os
Adriaan van Os wrote 15 lines
I maintain a large 600.000 FreePascal project that compiles for Mac OS X. It mixes MacPascal and Delphi compiler modes. Unfortunately the compiler is now producing random error messages, that disappear on a clean rebuild. The error messages are not clearly reproduceable. Sometimes, everything is OK, sometimes the incorrect error messages are there. I suspect corrupted .ppu files, I there a way to use a tool (like ppudump) or a specially built compiler to investigate this problem systematically, to get an idea of what is wrong ? I do builds through a Makefile. I could image always adding a ppudump to the builds and then looking at the output when random error messages popup, comparing the output to previous builds. Something like that. An automatic "ppu sanity mode" inside the compiler would even be better.

I suspect that is the same problem that one can sometimes experience when compiling the compiler from within an IDE (e.g. Lazarus). While I personally consider this a bug in the compiler (and I hope to fix this somewhen in the future) it might point to (complex) circular dependencies between units (involving more than two or three units) that are not cleanly detected. So one thing you could try is to check for complex circular dependencies in your code and try to resolve them (yes, I'm aware this is not that easy, but it's the only advice I can currently give you).

Regards,
Sven

Reply by email

Jeppe Græsdal Johansen
to Adriaan van Os: I maintain a large 600.000 FreePascal project that compiles for Mac OS X. It mixes…
Adriaan van Os wrote 19 lines
I maintain a large 600.000 FreePascal project that compiles for Mac OS X. It mixes MacPascal and Delphi compiler modes. Unfortunately the compiler is now producing random error messages, that disappear on a clean rebuild. The error messages are not clearly reproduceable. Sometimes, everything is OK, sometimes the incorrect error messages are there. I suspect corrupted .ppu files, I there a way to use a tool (like ppudump) or a specially built compiler to investigate this problem systematically, to get an idea of what is wrong ? I do builds through a Makefile. I could image always adding a ppudump to the builds and then looking at the output when random error messages popup, comparing the output to previous builds. Something like that. An automatic "ppu sanity mode" inside the compiler would even be better. Regards, Adriaan van Os

I have seen this behaviour when files with the same name is visible in more places in the directories visible to the compiler, and one is already built(valid .ppu available)

Reply by email