Lazarus
Programming => General => Topic started by: QEnnay on October 06, 2022, 01:02:47 am
-
Hi, not sure i this is a Lazarus 2.0.12 thing or a Mint+MATE-21 thing.
I make a change to a project, recompile and save.
But, the "Modified" date of the "new" binary does not change to today.
When I run that new binary, it shows the changes I had just made.
If I check properties of the "new" binary file I get
Created Unknown
Modified sep 28 2022 <-- this should be today
Accessed oct 5 2022
If I delete the binary and recompile the correct date is applied.
Why is it not assigning the correct date? This has really screwed me as that binary has not been backed up since sep-28.
-
That sounds like an OS thing. Check all three timestamps on the file (ls has options for it) and check the FS isn't mounted with the noatime option etc. (there's also probably FS-specific options to tune this sort of thing).
MarkMLl
-
Thanks Mark, I mentioned the current 3-date-times in the OP and 3 looked OK, the third, "Creation" was "Unknown"
It is not an OS thing as I have now tried it on another laptop running Fedora and same thing is happening.
Deleting that binary and then recompiling it sets it that day's date and stays there.
Yesterday when writing the OP I had deleted it as mentioned. Today I made a small change to the internal Version number and compiled. It is still showing yesterdays' date.
It seems I have to delete the file for it to use the correct date.
-
Hello.
Did you compile your project with the -B (build all) option?
Without it sometimes fpc has strange behaviour.
-
It is not an OS thing as I have now tried it on another laptop running Fedora and same thing is happening.
I didn't mean "on one particular machine", I meant "not Lazarus".
However note Fred's comment, and you'll also find various discussion around the place relating to a hard-to-duplicate build failure (specifically, stuff not getting rebuilt) relating to certain types of path configuration and fixable only by doing a File -> Clean Directory (specifically, not by a Run -> Build or restarting the IDE).
MarkMLl
-
Yesterday when writing the OP I had deleted it as mentioned. Today I made a small change to the internal Version number and compiled. It is still showing yesterdays' date.
It seems I have to delete the file for it to use the correct date.
Would you please check whether this also happens when you compile your project from the command line using fpc directly? Or can you reproduce it with a small application as well?
-
Hello
I have detected a similar problem when building the Jedi Code Format application that when making changes they are not effective unless it is build with a "clean and build".
I have been able to isolate the problem in the project with only 2 units attached.
To test it, unzip the file in C:\ZZ to keep the same paths.
Load the project from the folder C:\ZZ FreePascalBuildBugCommandLineLazarus.
compile and run and then comment/uncomment line 17 of unit 2 and run again. The result is the same.
But I think the problem is with the FPC compiler, I have tried to build it with build.bat and then modify it and build it again and it shows the same result.
I don't know if I'm missing something, that's why I put it here before filling a bug report in the freepascal bugtracker.
Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 i386-win32-win32/win64
-
I don't know if I'm missing something, that's why I put it here before filling a bug report in the freepascal bugtracker.
First of, you can adjust your batch file so that it is location independent (I also have the fpc executable in PATH, so no need for an absolute path either):
set CURDIR=%~dp0
fpc.exe -MObjFPC -Scghi -O1 -gw3 -gl -l -vewnhibq -Fi%CURDIR%\..\..\lib\i386-win32 -Fu%CURDIR%\..\..\CommandLine\Lazarus\ -FU%CURDIR%\..\..\lib\i386-win32\ -FE%CURDIR%\..\..\CommandLine\Lazarus\ -o%CURDIR%\..\..\CommandLine\Lazarus\project1.exe project1.lpr
Second, there is no unit2 in your example, only a unit1, so I'll assume you mean that.
Third: the problem seems to be related to your use of the in clause in the uses clause. Lazarus itself doesn't use this and also the modified time of the generated binary will change nevertheless, so this is a different problem than what's disecussed here. Though it would be nice if you'd report this nevertheless as it definitely should be fixed.
-
Third: the problem seems to be related to your use of the in clause in the uses clause. Lazarus itself doesn't use this and also the modified time of the generated binary will change nevertheless, so this is a different problem than what's disecussed here. Though it would be nice if you'd report this nevertheless as it definitely should be fixed.
Yes, that matches what I think I've seen in the past but never managed to pin down. However I might have seen other symptoms relating to -Fu or similar, again difficult to pin down, which might turn out to have a common underlying cause.
MarkMLl
-
so this is a different problem than what's disecussed here
Sorry for the noise and thanks for your help. I filled a issue.
https://gitlab.com/freepascal.org/fpc/source/-/issues/39945 (https://gitlab.com/freepascal.org/fpc/source/-/issues/39945)