[Lazarus] FPC config file inheritance issue

Péter Gábor ptrg at freemail.hu
Tue May 19 08:29:02 CEST 2015



2015-05-18 19:43 keltezéssel, Sven Barth írta:
> On 18.05.2015 18:04, Péter Gábor wrote:
>>
>>
>> 2015-05-18 17:31 keltezéssel, Mattias Gaertner írta:
>>> fpc only reads the first config file it finds.
>> I know this, but when the compilation aborted I was thinking that
>> something was changed in the configuration parser.
>>
>> Now the problem seems to be different for me:
>>
>> If FPC finds project's local "fpc.cfg" (without dot) first and then
>> stops searching for others, why does not find ".fpc.cfg" (with dot) in
>> the same directory (or ignores it) and searches for others?
> 
> FPC looks for a configuration file in this order and uses the first
> (this is the Unix case):
> - fpc.cfg in current directory
> - .fpc.cfg in $HOME
> - fpc.cfg in $PPC_CONFIG_PATH (if it is empty then it is the compiler's
> location + '../etc/')
> - fpc.cfg in /etc/
> 
> Regards,
> Sven
> 

This search order leads to compilation error (e.g. System unit not
found) if the local fpc.cfg exists but does not contain all required
options (i.e. paths to fpc units).

In old times (2011) I was able to successfully compile the project with
the following minimalist local fpc.cfg, but now it fails:

# Set exe output path
-FE../
# Set unit output path
-FU../ppu/

-- 
Péter Gábor
ptrg at freemail.hu




More information about the Lazarus mailing list