parsing of units in /etc/fpc.cfg lazarus / 21-General ---------------------------------------------------------------------- toby · 2023-09-12 23:32 i recently have been playing with the -vut cli options and have found that the /etc/fpc.cfg is being parsed from the bottom to the top for -Fu entries - this opposite of what i'd expect and results in my getting with just a writeln in the pgm fpc -vt u.pas > vt.txt    (with just writeln in it)  -> file of 3842 lines of 'not found' rather then of 308 lines after changing my entries in /etc/fpc.cfg to your bottom up parsing has this been doing this since the beginning of fpc? changing the order now has decreased the compiling time in almost half on a very large project also any information on if this is worth ignoring the unavailable lines after finding the .ppu and what can i use to get rid of them? using corresponding -Fu or -Fi has no effect Searching file /usr/local/fpc/units/rtl/Classes.ppu... not found Searching file /usr/local/fpc/units/rtl/classes.ppu... found PPU Loading /usr/local/fpc/units/rtl/classes.ppu (CLASSES)  PPU Name: /usr/local/fpc/units/rtl/classes.ppu (CLASSES)  PPU Time: 2022/06/26 20:18:33 (CLASSES)  PPU Flags: 159875 (CLASSES)  PPU Crc: 746C3A43 (CLASSES)  PPU Crc: F836DBF2 (intfc) (CLASSES)  PPU Crc: FA5EBB98 (indc) (CLASSES)  Number of definitions: 2292 (CLASSES)  Number of symbols: 8177 (CLASSES)  PPU Source: classes.pp not available (CLASSES)  PPU Source: classesh.inc not available (CLASSES)  PPU Source: classes.inc not available ---------------------------------------------------------------------- MarkMLl · 2023-09-13 08:36 Does the improvement in compilation speed apply to all cases, or only when you've specified -vt (which obviously muddies the water due to the amount of output it's generating. That's certainly an interesting observation. My understanding is that fpc.cfg is basically "boilerplate" which is used unchanged across various OSes etc. You really MUST put full details of compiler version, OS in use and so on in any message like this. The developers probably assumed that the OS would be efficient at skipping files that didn't exist. They might have been blindsided by changes in the layout of (whatever OS you're using), not to mention an increase in FPC/Lazarus's own complexity. MarkMLl ---------------------------------------------------------------------- toby · 2023-09-13 20:51 i am on a debian based linux os using fpc-3.2.2 my original post was just with writeln in the program you had a good point - writing the output to the screen was the time differences so i did testing to writing to a file and the results of compiling were not as dramatic but still there i did a lot of moving around of the -Fu lines to adapt to this new reality so with my largest lazarus program with the most units (uses) the line difference testing was with just moving -Fu/usr/local/fpc/units/rtl from the bottom to the top # top -Fu/usr/local/fpc/units/rtl fpc -vut econtrols.pas >> vt1.txt   155526 lines vt1.txt   1.954 seconds fpc econtrols.pas >> vt2.txt       75 lines vt2.txt  1.605 seconds --- # bottom -Fu/usr/local/fpc/units/rtl fpc -vut econtrols.pas >> vt3.txt   141445 lines vt3.txt   1.907 seconds fpc econtrols.pas >> vt4.txt       75 lines vt4.txt  1.629 seconds the difference with -uvt was 14081 lines - all not found lines until the unit is found in the units/rtl dir added after the files not found were units that were in the uses clause and were being looked for to be loaded and being checked in the dirs until found - not that they never existed - if not really found an error would be thrown ---------------------------------------------------------------------- PascalDragon · 2023-09-13 21:33 Quote from: toby on September 13, 2023, 01:32:15 ami recently have been playing with the -vut cli options and have found that the /etc/fpc.cfg is being parsed from the bottom to the top for -Fu entries - this opposite of what i'd expect and results in my getting with just a writeln in the pgm fpc -vt u.pas > vt.txt    (with just writeln in it)  -> file of 3842 lines of 'not found' rather then of 308 lines after changing my entries in /etc/fpc.cfg to your bottom up parsing has this been doing this since the beginning of fpc? Yes and this is in fact documented here: QuoteYou can add a directory to the unit search path with the (-Fu (see page 108)) option. Every occurrence of one of these options will insert a directory to the unit search path. i.e. the last path on the command line will be searched first. What is not documented, but only implied is that all options provided in the configuration file are handled as if they would be given on the command line, thus the search order is indeed (from the PoV of the configuration file) bottom to top. Quote from: toby on September 13, 2023, 01:32:15 amalso any information on if this is worth ignoring the unavailable lines after finding the .ppu and what can i use to get rid of them? using corresponding -Fu or -Fi has no effect The -vu and -vt options are for diagnostic purposes. If you don't like some of their output then simply don't use them or live with it. ---------------------------------------------------------------------- toby · 2023-09-16 16:47 The -vu and -vt options are for diagnostic purposes. If you don't like some of their output then simply don't use them or live with it. what? i thought the purpose of diagnostic purposes were for fixing things? i thought everything put out by the compiler had a reason behind it (errors > warnings > hints etc) why can i just ignore fatal syntax errors also? i think that the full name with path of the file name given in the CLASSES)  PPU Source: classesh.inc not available would be more helpful then just the name i would like to eliminate this or find out why it is generated do you have any knowledge about 'why the compiler with the diagnostic command line options thinks it is unavailable when it clearly is - where is it looking for it and not finding it is my question ---------------------------------------------------------------------- PascalDragon · 2023-09-17 15:58 Quote from: toby on September 16, 2023, 06:47:45 pmThe -vu and -vt options are for diagnostic purposes. If you don't like some of their output then simply don't use them or live with it. what? i thought the purpose of diagnostic purposes were for fixing things? But for normal day-to-day operations you don't need them. Quote from: toby on September 16, 2023, 06:47:45 pmi think that the full name with path of the file name given in the CLASSES)  PPU Source: classesh.inc not available would be more helpful then just the name There can't be a path, cause that's the whole point of the message: that the compiler did not find it it any of the provided source paths. Quote from: toby on September 16, 2023, 06:47:45 pmi would like to eliminate this or find out why it is generated It's generated, because the compiler does not find the source files needed for the unit. And it does not find them, because these source paths are not provided for the precompiled distribution. And these paths are not provided, because the precompiled distribution is supposed to be usable without source, not to mention that different units might have different requirements for recompilation which might in turn be conflicting if done in the same compilation run. So my recommendation as a developer of the compiler: ignore them. ---------------------------------------------------------------------- toby · 2023-09-17 18:51 PascalDragon thanks for the information it was cured with the follosing in /etc/fpc.cfg -Fu/usr/local/share/lazarus/fpc-source/rtl/linux i hav the fpc source in /usr/local/share/lazarus/fpc-source