[Lazarus] Does the Lazarus IDE check for the fpc.cfg in the default places on first run?

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Mar 13 16:37:09 CET 2015

On Fri, 13 Mar 2015 14:46:38 +0000
"vfclists ." <vfclists at gmail.com> wrote:

> Does the Lazarus IDE check for the fpc.cfg in the default places on first
> run?

For the IDE the "first run" is when there are no config files in
the users config directory. Do you mean that?

When the user sets a new compiler or changes target OS/CPU, the IDE
runs the compiler with -va and a test file to see what it does. The
compiler writes what config files it checks. This list is stored by the
When the IDE starts it checks if any of those files have changed
(i.e. modification times). If any file has changed, it reruns the
compiler test.

> I built a few instances of Lazarus from source, and although I set the fpc
> binary to a shell script which had its own fpc.cfg passed to it via the @
> parameter, they complained about the missing fpc.cfg until I copied the
> fpc.cfg to ~/.fpc.cfg.
> I thought the @ parameter made testing for fpc.cfg in the default locations
> unnecessary.

No, that is the -n option.

> Is the dependence of ~/.fpc.cfg a feature enforced by Lazarus itself or is
> the fpc that triggers the complaint?


> In short - does:
> 1. Lazarus test the fpc passed to it to ensure that it was built with that
> fpc build?

No. But if your script does not have the normal fpc name
(i.e. fpc or ppcsomething) the IDE assumes a different compiler and
avoids some checks.

> 2 Does Lazarus run the fpc with some parameters to check that the fpc.cfg
> matches?

See above. The IDE lets the compiler check its configs.

> 3. Does the test check for the fpc in the default locations, before testing
> the one passed in the fpc.sh script?

See above. Add -n.

> My earlier builds were created with fpcup and I wonder if fpcup applied
> some patch or used some scheme to fool the Lazarus first run into ignoring
> the default fpc.cfg locations.

I don't know.


More information about the Lazarus mailing list