Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpc trunk & mseide issue #104

Open
fochen79 opened this issue Jan 22, 2025 · 13 comments
Open

fpc trunk & mseide issue #104

fochen79 opened this issue Jan 22, 2025 · 13 comments

Comments

@fochen79
Copy link

Hi
i just noticed that when you use fpc trunk the mseide keep compiling msegui units every time you hit make
note that the siwtch -B is unchecked , with fpc 3.2.2 all works ok

can you check please

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

I will check asap but, imho, it is a problem of fpc, not msegui. (but of course I may be wrong),

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

What Os are you using?

@fochen79
Copy link
Author

i am using windows 7 32bits and windows 10 64bits

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

Did you try with Lazarus, is it ok there?

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

Re-hello. I dont have a Windows machine to test at the moment.
But I cannot figure how mseide could have implication on this.
The only thing that is sure is that fpc has a long time bug, when you dont use -B, fpc ignore the
"ifdef" or "if defined" declaration when something was changed, maybe they have try to fix it in last commit (but now -B is always added). Maybe.

@fochen79
Copy link
Author

Hi Fred , i just tested lazarus & fpc trunk , it works ok
about the -B switch , i removed it from the project option , but the compilation acts like its on
will try with other msegui versions , maybe will catching something

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

You are right: here on Linux 64 bit using fpc trunk and disabling -B also make fpc a full compilation of all units, even not changed.
And with fpc 3.2.2. or fpc 3.2.4. it is ok.
Hum, long white nights to investigate in perspective...

;-(

@fredvs
Copy link
Contributor

fredvs commented Jan 22, 2025

Some news from the front.

I did try to use the fpc trunk compiler but via a terminal.
So I did this to compile mseide:

$ /home/fred/fpcupdeluxe/fpc/bin/x86_64-linux/fpc -FUapps/ide/units -Fulib/common/* -Fulib/common/kernel/linux apps/ide/mseide.pas

The good news: mseide compiles and run ok using last fpc trunk.

But, but, but, recompiling mseide using same command line (so without -B) makes fpc-trunk to recompile all the code, even not changed.

I then retry using fpc 3.2.2 and 3.2.4 and there, after first complete compilation, without -B, only few units are re-compiled, as wanted.

So, imho, it is a problem of fpc-trunk, maybe Lazarus has a workaround for this, but it is clearly a fpc bug that did not exist in 3.2.2 and 3.2.4.

PS: Sorry but I dont have the courage to create a issue in fpc-git, if you are brave and courageous, please do it.

Anyway, many thanks to discover and note it.

@fredvs
Copy link
Contributor

fredvs commented Jan 23, 2025

Aaargh, no so simple.

When compiling a big app like mseide, using fpc trunk, it compiles every time all the units, even without -B.

But compiling this simple empty app with fpc trunk:

program test1;
uses
BGRABitmapTypes;
begin
end.

with this:

$ cd /dir/of/bgrabitmap
$ fpc test1.pas

compiles all the units at first time, but without -B he only does a link of the already compiled units.
Mamamia, once again a head breaker...

EDIT: There is a topic in Lazarus forum about this: https://forum.lazarus.freepascal.org/index.php/topic,69929.msg544509.html#msg544509

Conclusion: I fear that mseide cannot solve anything for that.

@fochen79
Copy link
Author

Hello fred , this is really strange , but i don't think its caused by fpc ( maybe i am wrong )
for example i create a simple console app , then i've added simple 4 units , and the compilation works as expected , only the modified files is recomplied , so the problem is only with gui project
i will investigate a little more

@fredvs
Copy link
Contributor

fredvs commented Jan 23, 2025

Yes, I noted this also, read my previous message and the post I sent in Lazarus forum.

@fredvs
Copy link
Contributor

fredvs commented Jan 23, 2025

In mseide code, all the lines in the messages form are the result of fpc output when compiling.
I checked again, there are no filters for gui or big or little code, it is only the result of a TProcess (here fpc(.exe) + parameters) , no more no less.
Or I'm missing something and should have a consultation with an optician.

@fredvs
Copy link
Contributor

fredvs commented Jan 23, 2025

Answer from PascalDragon, developer of core fpc in Lazarus forum: https://forum.lazarus.freepascal.org/index.php/topic,69929.msg544590.html#msg544590

Quote from: Fred vS on Today at 02:34:42 am
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. This is one of the reasons why I don't consider main as even remotely release ready, cause this consistent recompilation is a no-go.

so the problem is only with gui project

They have the same problem recompiling fpc himself, that is not a gui app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants