[fpc-devel] fpcmkcfg and fpc.cfg questions
Bart
bartjunk64 at gmail.com
Sun Mar 24 23:21:33 CET 2019
Hi,
First problem:
I tried to build lazarus trunk with fpc trunk.
Lazarus r60747, fresh checkout
Fpc r41788, installed from source in C:\PP
It failed with:
C:\devel\laztrunktrunk\packager\registration\fcllaz.pas(11,3) Fatal:
(10022) Can't find unit db used by fcllaz
I took a look at my fpc.cfg files.
Extract from fpc.cfg from 3.0.4 (created by offcial installer)
# searchpath for units and other system dependent things
-FuC:\devel\fpc\3.0.4/units/$fpctarget
-FuC:\devel\fpc\3.0.4/units/$fpctarget/*
-FuC:\devel\fpc\3.0.4/units/$fpctarget/rtl
Extract from fpc.cfg from fpc trunk: created with fpcmkcfg.exe (from trunk)
# searchpath for units and other system dependent things
-Fu/units/$fpctarget
-Fu/units/$fpctarget/*
-Fu/units/$fpctarget/rtl
Notice all paths are relative (to what?)
How does fpc know that, in relation to fpc.exe this must be translated to:
..\..\units\$fpctarget ?
=== output of make ===
make distclean
make bigide OPT="-vut"
make -C packager/registration
make[1]: Entering directory `C:/devel/laztrunktrunk/packager/registration'
C:/devel/fpc/3.0.4/bin/i386-win32/rm.exe -f ../units/i386-win32/fcllaz.ppu
C:/pp/bin/i386-win32/ppc386.exe -MObjFPC -Scghi -O1 -g -gl -l
-vewnhibq -Fu. -Fuc:/pp/units/i386-win32/rtl -FE.
-FU../units/i386-win32 -g -gl -vut -di386 fcllaz.pas
Configfile search: fpc.cfg
Configfile search: C:\Users\Bart\fpc.cfg
Configfile search: C:\ProgramData\fpc.cfg
Configfile search: C:\pp\bin\i386-win32\fpc.cfg
(11026) Reading options from file C:\pp\bin\i386-win32\fpc.cfg
Hint: (11030) Start of reading config file C:\pp\bin\i386-win32\fpc.cfg
Path "C:\units\i386-win32\" not found
Path "C:\units\i386-win32\*\" not found
Path "C:\units\i386-win32\rtl\" not found
Path "C:\units\i386-win32\httpd22\" not found
Path "C:\Users\Bart\AppData\Local\FreePascal\fppkg\units\i386-win32\*\"
not found
Path "C:\lib\i386-win32\" not found
Hint: (11031) End of reading config file C:\pp\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.3.1 [2019/03/17] for i386
Copyright (c) 1993-2018 by Florian Klaempfl and others
(1000) Compiler: C:\pp\bin\i386-win32\ppc386.exe
(1002) Target OS: Win32 for i386
(1003) Using executable path: C:\pp\bin\i386-win32\
(1004) Using unit path: .\
(1004) Using unit path: C:\pp\units\i386-win32\rtl\
(1004) Using unit path: C:\pp\bin\i386-win32\
(1006) Using library path: .\
(1006) Using library path: C:\pp\units\i386-win32\rtl\
(1006) Using library path: C:\pp\bin\i386-win32\
(1007) Using object path: .\
(1007) Using object path: C:\pp\units\i386-win32\rtl\
(1007) Using object path: C:\pp\bin\i386-win32\
(3104) Compiling fcllaz.pas
Searching file fcllaz.pas... found
(PROGRAM) (10057) Registering new unit SYSTEM
(PROGRAM) (10027) Load from FCLLAZ (interface) unit SYSTEM
(SYSTEM) (10055) Loading unit SYSTEM
(10000) Unitsearch: system.ppu
(10000) Unitsearch: ..\units\i386-win32\system.ppu
(10000) Unitsearch: system.pp
(10000) Unitsearch: system.pas
(10000) Unitsearch: system.ppu
(10000) Unitsearch: system.pp
(10000) Unitsearch: system.pas
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\system.ppu
(10001) PPU Loading C:\pp\units\i386-win32\rtl\system.ppu
(SYSTEM) (10002) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu
(SYSTEM) (10005) PPU Time: 2019/03/17 12:28:14
(SYSTEM) (10003) PPU Flags: 225409
(SYSTEM) (10004) PPU Crc: D0EC42A2
(SYSTEM) (10004) PPU Crc: 5CA0AD90 (intfc)
(SYSTEM) (10004) PPU Crc: 5B736799 (indc)
(SYSTEM) Number of definitions: 2746
(SYSTEM) Number of symbols: 8557
(SYSTEM) (10011) PPU Source: system.pp not available
(SYSTEM) (10011) PPU Source: systemh.inc not available
(SYSTEM) (10011) PPU Source: sysosh.inc not available
(SYSTEM) (10011) PPU Source: rtldefs.inc not available
(SYSTEM) (10011) PPU Source: filerec.inc not available
(SYSTEM) (10011) PPU Source: textrec.inc not available
(SYSTEM) (10011) PPU Source: innr.inc not available
(SYSTEM) (10011) PPU Source: cpuh.inc not available
(SYSTEM) (10011) PPU Source: cpuinnr.inc not available
(SYSTEM) (10011) PPU Source: mathh.inc not available
(SYSTEM) (10011) PPU Source: currh.inc not available
(SYSTEM) (10011) PPU Source: ustringh.inc not available
(SYSTEM) (10011) PPU Source: wstringh.inc not available
(SYSTEM) (10011) PPU Source: setjumph.inc not available
(SYSTEM) (10011) PPU Source: rttih.inc not available
(SYSTEM) (10011) PPU Source: objpash.inc not available
(SYSTEM) (10011) PPU Source: varianth.inc not available
(SYSTEM) (10011) PPU Source: dynarrh.inc not available
(SYSTEM) (10011) PPU Source: compproc.inc not available
(SYSTEM) (10011) PPU Source: heaph.inc not available
(SYSTEM) (10011) PPU Source: threadh.inc not available
(SYSTEM) (10011) PPU Source: dynlibh.inc not available
(SYSTEM) (10011) PPU Source: sysdlh.inc not available
(SYSTEM) (10011) PPU Source: resh.inc not available
(SYSTEM) (10011) PPU Source: excepth.inc not available
(SYSTEM) (10011) PPU Source: system.inc not available
(SYSTEM) (10011) PPU Source: sysos.inc not available
(SYSTEM) (10011) PPU Source: i386.inc not available
(SYSTEM) (10011) PPU Source: fastmove.inc not available
(SYSTEM) (10011) PPU Source: generic.inc not available
(SYSTEM) (10011) PPU Source: set.inc not available
(SYSTEM) (10011) PPU Source: genset.inc not available
(SYSTEM) (10011) PPU Source: math.inc not available
(SYSTEM) (10011) PPU Source: genmath.inc not available
(SYSTEM) (10011) PPU Source: gencurr.inc not available
(SYSTEM) (10011) PPU Source: sstrings.inc not available
(SYSTEM) (10011) PPU Source: flt_conv.inc not available
(SYSTEM) (10011) PPU Source: flt_core.inc not available
(SYSTEM) (10011) PPU Source: flt_pack.inc not available
(SYSTEM) (10011) PPU Source: flt_pack.inc not available
(SYSTEM) (10011) PPU Source: int64p.inc not available
(SYSTEM) (10011) PPU Source: int64.inc not available
(SYSTEM) (10011) PPU Source: astrings.inc not available
(SYSTEM) (10011) PPU Source: wstrings.inc not available
(SYSTEM) (10011) PPU Source: ustrings.inc not available
(SYSTEM) (10011) PPU Source: aliases.inc not available
(SYSTEM) (10011) PPU Source: rttidecl.inc not available
(SYSTEM) (10011) PPU Source: dynarr.inc not available
(SYSTEM) (10011) PPU Source: objpas.inc not available
(SYSTEM) (10011) PPU Source: except.inc not available
(SYSTEM) (10011) PPU Source: variant.inc not available
(SYSTEM) (10011) PPU Source: rtti.inc not available
(SYSTEM) (10011) PPU Source: setjump.inc not available
(SYSTEM) (10011) PPU Source: sysheap.inc not available
(SYSTEM) (10011) PPU Source: heap.inc not available
(SYSTEM) (10011) PPU Source: thread.inc not available
(SYSTEM) (10011) PPU Source: threadvr.inc not available
(SYSTEM) (10011) PPU Source: systhrd.inc not available
(SYSTEM) (10011) PPU Source: dynlib.inc not available
(SYSTEM) (10011) PPU Source: sysdl.inc not available
(SYSTEM) (10011) PPU Source: sysfile.inc not available
(SYSTEM) (10011) PPU Source: text.inc not available
(SYSTEM) (10011) PPU Source: file.inc not available
(SYSTEM) (10011) PPU Source: typefile.inc not available
(SYSTEM) (10011) PPU Source: isotmp.inc not available
(SYSTEM) (10011) PPU Source: sysdir.inc not available
(SYSTEM) (10011) PPU Source: sysres.inc not available
(SYSTEM) (10011) PPU Source: syswin.inc not available
(SYSTEM) (10011) PPU Source: seh32.inc not available
(SYSTEM) (10056) Finished loading unit SYSTEM
Searching file fcllaz.pas... found
(FCLLAZ) (10048) Adding dependency: FCLLAZ depends on SYSTEM
Searching file fcllaz.pas... found
(FCLLAZ) (10043) Loading interface units from FCLLAZ
(fcllaz) (10057) Registering new unit OBJPAS
(fcllaz) (10027) Load from FCLLAZ (interface) unit OBJPAS
(OBJPAS) (10055) Loading unit OBJPAS
(10000) Unitsearch: objpas.ppu
(10000) Unitsearch: ..\units\i386-win32\objpas.ppu
(10000) Unitsearch: objpas.pp
(10000) Unitsearch: objpas.pas
(10000) Unitsearch: objpas.ppu
(10000) Unitsearch: objpas.pp
(10000) Unitsearch: objpas.pas
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\objpas.ppu
(10001) PPU Loading C:\pp\units\i386-win32\rtl\objpas.ppu
(OBJPAS) (10002) PPU Name: C:\pp\units\i386-win32\rtl\objpas.ppu
(OBJPAS) (10005) PPU Time: 2019/03/17 12:28:14
(OBJPAS) (10003) PPU Flags: 209026
(OBJPAS) (10004) PPU Crc: B80613D6
(OBJPAS) (10004) PPU Crc: 23905B15 (intfc)
(OBJPAS) (10004) PPU Crc: B3768EC8 (indc)
(OBJPAS) Number of definitions: 68
(OBJPAS) Number of symbols: 149
(OBJPAS) (10011) PPU Source: objpas.pp not available
(OBJPAS) (10027) Load from OBJPAS (interface) unit SYSTEM
(OBJPAS) (10048) Adding dependency: OBJPAS depends on SYSTEM
(OBJPAS) (10056) Finished loading unit OBJPAS
Searching file fcllaz.pas... found
(FCLLAZ) (10048) Adding dependency: FCLLAZ depends on OBJPAS
(FCLLAZ) (10057) Registering new unit DB
(FCLLAZ) (10057) Registering new unit PROCESS
(FCLLAZ) (10057) Registering new unit SIMPLEIPC
(FCLLAZ) (10057) Registering new unit EVENTLOG
(FCLLAZ) (10057) Registering new unit XMLCONF
(FCLLAZ) (10057) Registering new unit SQLDB
(FCLLAZ) (10057) Registering new unit LAZARUSPACKAGEINTF
(FCLLAZ) (10027) Load from FCLLAZ (interface) unit DB
(DB) (10055) Loading unit DB
(10000) Unitsearch: db.ppu
(10000) Unitsearch: ..\units\i386-win32\db.ppu
(10000) Unitsearch: db.pp
(10000) Unitsearch: db.pas
(10000) Unitsearch: db.ppu
(10000) Unitsearch: db.pp
(10000) Unitsearch: db.pas
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\db.ppu
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\db.pp
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\db.pas
(10000) Unitsearch: C:\pp\bin\i386-win32\db.ppu
(10000) Unitsearch: C:\pp\bin\i386-win32\db.pp
(10000) Unitsearch: C:\pp\bin\i386-win32\db.pas
(10000) Unitsearch: db.pp
(10000) Unitsearch: db.pas
(10000) Unitsearch: db.pp
(10000) Unitsearch: db.pas
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\db.pp
(10000) Unitsearch: C:\pp\units\i386-win32\rtl\db.pas
(10000) Unitsearch: C:\pp\bin\i386-win32\db.pp
(10000) Unitsearch: C:\pp\bin\i386-win32\db.pas
C:\devel\laztrunktrunk\packager\registration\fcllaz.pas(11,3) Fatal:
(10022) Can't find unit db used by fcllaz
Fatal: (1018) Compilation aborted
make[1]: *** [fcllaz.ppu] Error 1
make[1]: Leaving directory `C:/devel/laztrunktrunk/packager/registration'
make: *** [registration] Error 2
======= end of make output =====
db.ppu resides in C:\pp\units\i386-win32\fcl-db
I changed the paths in fpc.cfg to include the full paths:
# searchpath for units and other system dependent things
-Fuc:/pp/units/$fpctarget
-Fuc:/pp/units/$fpctarget/*
-Fuc:/pp/units/$fpctarget/rtl
Now it builds OK.
Q1: How come? Why does it find C:\pp\units\i386-win32\fcl-db\db.ppu now?
Q2: why did the installer from 3.0.4 use fully qualified paths and
fpcmkcfg does not?
Second problem:
Is this supposed to happen?
C:\pp\bin\i386-win32>dir fpc.cfg
...
24-03-2019 00:31 7.572 fpc.cfg
C:\pp\bin\i386-win32>fpcmkcfg -o fpc.cfg
Saved old "fpc.cfg" to "fpc.bak"
Error: Directory of file "fpc.cfg" does not exists. User -p to force creation.
C:\pp\bin\i386-win32>dir fpc.cfg
...
Directory of C:\pp\bin\i386-win32
File Not Found
It just killed my fpc.cfg!
(Yes there is a backup)
This works however:
fpcmkcfg -o .\fpc.cfg
I would say that fpc.cfg as commandline parameter should point to the
same file as .\fpc.cfg (as it would do in almost any other program).
Q3: is this a bug or "by design"?
--
Bart
More information about the fpc-devel
mailing list