Sign in Join

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

Mailing lists / lazarus / 2009-07

Leftover ppas.sh file

10 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Whenever I do a Quick Compile (Ctrl+Shift+F9 on my system), there is always a temp file remaining in the default output directory.

The file is "ppas.sh" on my Linux system.

Is there a reason why that file remains after the Quick Compiler and never gets deleted by Lazarus? Or is this an oversight (cleanup bug)?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Henry Vermaak
to Graeme Geldenhuys

2009/7/14 Graeme Geldenhuys :

Show quoted text 9 lines
Hi, Whenever I do a Quick Compile (Ctrl+Shift+F9 on my system), there is always a temp file remaining in the default output directory. The file is "ppas.sh" on my Linux system. Is there a reason why that file remains after the Quick Compiler and never gets deleted by Lazarus? ?Or is this an oversight (cleanup bug)?

This file is created by fpc if you call it with -sh. Assembler and linker isn't called, so presumably that's where the quick compile comes from.

Perhaps fpc needs to accept an argument to -sh that specifies the script file it needs to create, then lazarus can specify it and delete it afterwards.

Henry

Reply by email

Graeme Geldenhuys
to Henry Vermaak

Thanks for the quick reply Henry.

Henry Vermaak wrote
This file is created by fpc if you call it with -sh. Assembler and linker isn't called, so presumably that's where the quick compile comes from.

That's correct - or at least that is how I understood it as well. But I did not know fpc creates that file.

Perhaps fpc needs to accept an argument to -sh that specifies the script file it needs to create, then lazarus can specify it and delete it afterwards.

So is this not maybe an FPC issue then? Why doesn't FPC clean-up after itself, or ask the OS for the temp dir location and use that instead?

Alternatively (but I don't think this is the right way to go), Lazarus could detect the Quick Compile command and delete the ppas.sh file afterwards. The file always seems to be created in the default output directory of the binary file.

But as I mentioned, if FPC is the one creating the file, surely it should be responsible for clean up afterwards.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Henry Vermaak
to Graeme Geldenhuys

2009/7/14 Graeme Geldenhuys :

-- 8< -- But as I mentioned, if FPC is the one creating the file, surely it should be responsible for clean up afterwards.

The point of -sh is to create a script that can be called afterwards by the user. I've used it many times when I've had linking problems. I don't think the name of the file should be hard-wired, though, then lazarus can specify a temp file and clean it up properly.

Henry

Reply by email

Mattias Gaertner
to Henry Vermaak
Show quoted text 10 lines
2009/7/14 Graeme Geldenhuys : > -- 8< -- > > But as I mentioned, if FPC is the one creating the file, surely it > should be responsible for clean up afterwards. The point of -sh is to create a script that can be called afterwards by the user. I've used it many times when I've had linking problems. I don't think the name of the file should be hard-wired, though, then lazarus can specify a temp file and clean it up properly.

The IDE (mis)uses the -sh option to omit the slow linking stage. If you know an option to omit creating the linker/assembler files as well, we can add that.

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 7 lines
Mattias Gaertner wrote: > > If you know an option to omit creating the linker/assembler files as > well, we can add that. If such an option doesn't exist, maybe we can ask the FPC team to extend the compiler to support it?

If no one answers maybe we can create a feature request. If no one implements the feature request maybe we can add a feature request for the IDE to delete the file.
If no one implements that feature request maybe we can ... wait a second.

Sorry, could not resist. ;)

Mattias

Reply by email

Henry Vermaak
to Mattias Gaertner

2009/7/14 Mattias Gaertner :

Show quoted text 12 lines
On Tue, 14 Jul 2009 13:29:34 +0200 Graeme Geldenhuys wrote: > Mattias Gaertner wrote: > > > > If you know an option to omit creating the linker/assembler files as > > well, we can add that. > > If such an option doesn't exist, maybe we can ask the FPC team to > extend the compiler to support it? If no one answers maybe we can create a feature request.

I'd vote for an fpc feature request: a syntax checking option (like php -l). Or maybe just fix -Cn to not produce ppas.sh and link.res?

If no one implements the feature request maybe we can add a feature request for the IDE to delete the file.

Assuming the name of the files (ppas.sh and link.res) might not be a good idea?

Henry

Reply by email

Michael Van Canneyt
to Henry Vermaak
Henry Vermaak wrote 16 lines
2009/7/14 Mattias Gaertner : > On Tue, 14 Jul 2009 13:29:34 +0200 > Graeme Geldenhuys wrote: > >> Mattias Gaertner wrote: >>> >>> If you know an option to omit creating the linker/assembler files as >>> well, we can add that. >> >> If such an option doesn't exist, maybe we can ask the FPC team to >> extend the compiler to support it? > > If no one answers maybe we can create a feature request. I'd vote for an fpc feature request: a syntax checking option (like php -l). Or maybe just fix -Cn to not produce ppas.sh and link.res?

The whole idea of -Cn is to have ppas.sh and link.res, so the link.res can be examined, modified and then call the linker manually.

Show quoted text 5 lines
> If no one implements the feature request maybe we can add a feature > request for the IDE to delete the file. Assuming the name of the files (ppas.sh and link.res) might not be a good idea?

Why not ? It's always those names, and I believe on windows it's always ppas.bat

Michael.

Reply by email

Henry Vermaak
to Michael Van Canneyt

2009/7/14 Michael Van Canneyt :

The whole idea of -Cn is to have ppas.sh and link.res, so the link.res can be examined, modified and then call the linker manually.

I'd say that's what the -s* options are for. -Cn and -E are aliases and they seem to do the same thing as -sh, which seems rather daft.

Why not ? It's always those names, and I believe on windows it's always ppas.bat

Because hard-coding file names gives me heartburn. I'm not a lazarus dev, though, so they are free to implement this how they like.

Henry

Reply by email