Sign in Join

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

Mailing lists / lazarus / 2021-03

Do I really need to use Build to get all recent changes included?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

I am using Lazarus 2.0.8 / Fpc 3.0.4 on a RaspberryPi4 I am writing a program intended to be run as a systemd service on Linux, so no GUI components.

While debugging code on this I have noted a strange Lazarus behaviour:
- Edit the source in order to for example add a debug log line
- Use Run/Compile to get a new binary
- Use strip -s to reduce the executable size
- scp the executable to the target system (8400 km away)
- Run the executable on the target system

Now when I run a cycle on the target through the newly created binary the log line does *not* appear!

So back to the dev system and use Run/Build instead Then repeat the strip-scp-run sequence

And NOW the log line appears in the target system log!

Question:
---------
Should not Run/Compile create the binary based on *all* the latest sources? If I use Run/Build I am going to increment the build number all the time while debugging, which I would rather avoid.

Is there some Lazarus setting I am unaware of, which will force Compile to actually compile based on all the modified sources since last compile?

Or does Lazarus only consider changed files which are marked in the IDE as unsaved?
If so then my use of AutoSave is the problem??? It saves changed sources every 5 seconds.

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 6 lines
[...] Question: --------- Should not Run/Compile create the binary based on *all* the latest sources? If I use Run/Build I am going to increment the build number all the time while debugging, which I would rather avoid.

Maybe you modified a file of a package, that is not listed in the package? Lazarus only checks files listed in the package.

Show quoted text 6 lines
Is there some Lazarus setting I am unaware of, which will force Compile to actually compile based on all the modified sources since last compile? Or does Lazarus only consider changed files which are marked in the IDE as unsaved?

No.

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
On Sat, 27 Mar 2021 10:15:55 +0100 Bo Berglund via lazarus wrote: >[...] > Question: > --------- > Should not Run/Compile create the binary based on *all* the latest > sources? If I use Run/Build I am going to increment the build number > all the time while debugging, which I would rather avoid. Maybe you modified a file of a package, that is not listed in the package? Lazarus only checks files listed in the package.

No, I added a better exit from a threaded function in my main code plus a log line right there.
No logging appeared, that is why I started looking for the cause.

After I used build and re-ran the test it worked as it should.

Bo Berglund Developer in Sweden

Reply by email