Recent

Author Topic: Does unit recompilation roles have changed in fpc 3.3.1?  (Read 4553 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: Does unit recompilation roles have changed in fpc 3.3.1?
« Reply #15 on: January 23, 2025, 10:00:54 pm »
Same kind of problem here with last fpc main/trunk.

Compiling big apps without the -B parameter makes fpc recompile all the units at first compilation and it is ok.
But recompiling without any change and without -B, all the units are once again recompiled.

We are aware of this. The problem is that we haven't yet managed to find a small example that allows to easily reproduce and thus debug this (e.g. compiling the compiler triggers this issue as well). My suspicion is that it's depending on the dependencies between the units, so it should essentially be reproducible with empty units that only contain uses-clauses.
Thanks PascalDragon for the insight (and ending the sleepless nights trying to find what was suddenly wrong with the mseide code).
« Last Edit: January 23, 2025, 10:11:22 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Nativer

  • Newbie
  • Posts: 4
Re: Does unit recompilation roles have changed in fpc 3.3.1?
« Reply #16 on: May 31, 2025, 06:27:08 pm »
We are aware of this. The problem is that we haven't yet managed to find a small example that allows to easily reproduce and thus debug this (e.g. compiling the compiler triggers this issue as well). My suspicion is that it's depending on the dependencies between the units, so it should essentially be reproducible with empty units that only contain uses-clauses.
The problem with recompilation was not limited to the fact that the entire project is compiled. Critical FPC crashes were found, which occur only if the lib folder in the project is not cleared. So, I prepared a project archive for Lazarus (https://drive.google.com/file/d/1ukTXpNsIanKkcHLvVc-QuxVgoy_d6hNC/view?usp=sharing), which compiles MSEgui from the source code, and it can do this only ONCE, unless you use the -B parameter for the compiler. If the parameter is missing and the project is compiled again, I will get a set of abundant crashes on Windows (Linux has not been tested yet), as for example in the screenshot. I do not yet know how to write a report about this, and is it worth it, or is this problem also known?
« Last Edit: May 31, 2025, 06:30:20 pm by Nativer »

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 293
  • I use FPC [main] 💪🐯💪
Re: Does unit recompilation roles have changed in fpc 3.3.1?
« Reply #17 on: June 02, 2025, 10:04:22 am »
...Critical FPC crashes were found...

One of the issues based on your example, thank you for preparing the project for testing:

https://gitlab.com/freepascal.org/fpc/source/-/issues/41272
I may seem rude - please don't take it personally

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 293
  • I use FPC [main] 💪🐯💪
Re: Does unit recompilation roles have changed in fpc 3.3.1?
« Reply #18 on: September 03, 2025, 12:08:23 pm »
https://gitlab.com/freepascal.org/fpc/source/-/issues/41272#note_2726331792

Perhaps Mattias Gaertner's last few commits fix this bug. It would be nice if you could also test it on the latest FPC [main]
I may seem rude - please don't take it personally

 

TinyPortal © 2005-2018