[fpc-pascal] Why does fpc copies *.lfm files to unit output directory

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue May 12 11:26:04 CEST 2015


Hi,

I don't know when this started, but fpc copies *.lfm files to the unit
output directory. Then turns around and complains about duplicate *.lfm
files? Though the complaint about duplicate files might be from Lazarus
IDE - I'm not sure any more with the new Messages Window behaviour in
Lazarus.

================================
Messages, Warnings: 34
Warning: Duplicate file "fpideexteditorinsertfilenameunit.lfm" in
"weblaz 1.0",
path="/home/graemeg/devel/lazarus/components/fpweb/lib/x86_64-linux/fpideexteditorinsertfilenameunit.lfm"
Warning: Duplicate file "fpideexteditorinsertfilenameunit.lfm" in
"lazwebextra 0.9",
path="/home/graemeg/devel/lazarus/components/fpweb/fpideexteditorinsertfilenameunit.lfm"
Warning: Duplicate file "fpwebfieldsettagunit.lfm" in "weblaz 1.0",
path="/home/graemeg/devel/lazarus/components/fpweb/lib/x86_64-linux/fpwebfieldsettagunit.lfm"
Warning: Duplicate file "fpwebfieldsettagunit.lfm" in "lazwebextra 0.9",
path="/home/graemeg/devel/lazarus/components/fpweb/fpwebfieldsettagunit.lfm"
Warning: Duplicate file "fpwebhrefeditunit.lfm" in "weblaz 1.0",
path="/home/graemeg/devel/lazarus/components/fpweb/lib/x86_64-linux/fpwebhrefeditunit.lfm"
Warning: Duplicate file "fpwebhrefeditunit.lfm" in "lazwebextra 0.9",
path="/home/graemeg/devel/lazarus/components/fpweb/fpwebhrefeditunit.lfm"
Warning: Duplicate file "fpwebhtmltaglegendunit.lfm" in "weblaz 1.0",
path="/home/graemeg/devel/lazarus/components/fpweb/lib/x86_64-linux/fpwebhtmltaglegendunit.lfm"
Warning: Duplicate file "fpwebhtmltaglegendunit.lfm" in "lazwebextra
0.9",
path="/home/graemeg/devel/lazarus/components/fpweb/fpwebhtmltaglegendunit.lfm"
Warning: Duplicate file "fpwebnewhtmlfileunit.lfm" in "weblaz 1.0",
path="/home/graemeg/devel/lazarus/components/fpweb/lib/x86_64-linux/fpwebnewhtmlfileunit.lfm"
Warning: Duplicate file "fpwebnewhtmlfileunit.lfm" in "lazwebextra 0.9",
path="/home/graemeg/devel/lazarus/components/fpweb/fpwebnewhtmlfileunit.lfm"
...snip...
================================


I first thought it was Lazarus IDE copying the files, but then found out
that it is fpc. Why exactly is fpc copying the file? If it is to find
the *.lfm files while linking... well if it knows where to find the
files to copy, why can't it find the original *.lfm files (in the source
directories) to do linking?

It's not just duplicate files, it seems sometimes the *.lfm files can
changes, without the associated *.pas file changing. In such cases fpc
doesn't seem to copy the *.lfm files, but then compilation/linking
fails. I had to create a bash script to manually clear out all unit
output directories to resolve this issue. This happens a couple of times
per week now.

As I said, I don't know when this behaviour started in FPC - I never
noticed it for years, because fpGUI doesn't have extra form files (like
*.lfm), but only a single *.pas file. But recently I've been working on
a LCL based project, and now frequently hit this issue.

I'm using 64-bit FPC 2.6.4 and Lazarus IDE v1.5 (trunk checkout from
beginning of May) on FreeBSD 10.1

Regards,
  - Graeme -

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



More information about the fpc-pascal mailing list