[Lazarus] Makefile issues
Michael Van Canneyt
michael at freepascal.org
Wed Nov 30 15:43:17 CET 2022
On Wed, 30 Nov 2022, Maxim Ganetsky via lazarus wrote:
> 30.11.2022 16:35, Michael Van Canneyt via lazarus пишет:
>>
>> Hello,
>>
>> The lazarus makefile has some dependency issues.
>
> I would recommend to run `make lazbuild` first and then try to proceed
> again with your commands.
Well, the whole idea of a makefile is that you can give any target and it will first
build the dependencies for that target, to free the user of the burden to
know or guess the dependencies.
If target 'ide' depends on target 'lazbuild', it should say so in the dependencies
of 'ide'.
That said, I followed your suggestion, and then the error is:
(1002) Target OS: Linux for x86-64
(3104) Compiling lazarus.pp
/home/michael/projects/lazarus-tst/ide/lazarus.pp(57,3) Fatal: (10022) Can't find unit Interfaces used by Lazarus
most likely, the LCL needs to be built first as well.
In each case, for the moment I simply produced a full build using the 'make bigide' target.
I then try to install the result. This installs the IDE.
But I also (in fact, only) need the LCL units.
So I did
make -C lcl install
But the 'make install' in the lcl dir also fails:
/bin/install -c -m 644 units/x86_64-linux/alllclunits.ppu units/x86_64-linux/actnlist.ppu units/x86_64-linux/arrow.ppu units/x86_64-linux/avglvltree.ppu units/x86_64-linux/buttons.ppu units/x86_64-linux/calendar.ppu units/x86_64-linux/chart.ppu units/x86_64-linux/checklst.ppu units/x86_64-linux/clipbrd.ppu units/x86_64-linux/clistbox.ppu units/x86_64-linux/comctrls.ppu units/x86_64-linux/controls.ppu units/x86_64-linux/dbactns.ppu units/x86_64-linux/dbctrls.ppu units/x86_64-linux/dbgrids.ppu units/x86_64-linux/dialogs.ppu units/x86_64-linux/dynamicarray.ppu units/x86_64-linux/dynhasharray.ppu units/x86_64-linux/editbtn.ppu units/x86_64-linux/extctrls.ppu units/x86_64-linux/extdlgs.ppu units/x86_64-linux/extendedstrings.ppu units/x86_64-linux/extgraphics.ppu units/x86_64-linux/filectrl.ppu units/x86_64-linux/forms.ppu units/x86_64-linux/fpcadds.ppu units/x86_64-linux/graphics.ppu units/x86_64-linux/graphtype.ppu units/x86_64-linux/grids.ppu units/x86_64-linux/imglist.ppu units/x86_64-
linux/inipropstorage.ppu units/x86_64-linux/interfacebase.ppu units/x86_64-linux/lazlinkedlist.ppu units/x86_64-linux/lclintf.ppu units/x86_64-linux/lclmemmanager.ppu units/x86_64-linux/lclproc.ppu units/x86_64-linux/lclrescache.ppu units/x86_64-linux/lclstrconsts.ppu units/x86_64-linux/lcltype.ppu units/x86_64-linux/lclunicodedata.ppu units/x86_64-linux/lconvencoding.ppu units/x86_64-linux/lmessages.ppu units/x86_64-linux/lresources.ppu units/x86_64-linux/maskedit.ppu units/x86_64-linux/menus.ppu units/x86_64-linux/pairsplitter.ppu units/x86_64-linux/popupnotifier.ppu units/x86_64-linux/postscriptprinter.ppu units/x86_64-linux/printers.ppu units/x86_64-linux/propertystorage.ppu units/x86_64-linux/spin.ppu units/x86_64-linux/stdactns.ppu units/x86_64-linux/stdctrls.ppu units/x86_64-linux/stringhashlist.ppu units/x86_64-linux/textstrings.ppu units/x86_64-linux/toolwin.ppu units/x86_64-linux/utrace.ppu units/x86_64-linux/xmlpropstorage.ppu /tmp/me/lib/lcl/units/x86_64-linux
/bin/install: cannot stat 'units/x86_64-linux/avglvltree.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/chart.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/clistbox.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/dynamicarray.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/dynhasharray.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/extendedstrings.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/fpcadds.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/graphtype.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/lazlinkedlist.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/lconvencoding.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/stringhashlist.ppu': No such file or directory
/bin/install: cannot stat 'units/x86_64-linux/textstrings.ppu': No such file or directory
No wonder, these units are not in the lcl, but have been moved to components.
I removed them from the implicit units listed in Makefile.fpc in the LCL dir
and regenerated the makefile.
Running make install then proceeds further:
make -C interfaces install
make[1]: Entering directory '/home/michael/projects/lazarus-tst/lcl/interfaces'
make -C gtk2 all
make[2]: Entering directory '/home/michael/projects/lazarus-tst/lcl/interfaces/gtk2'
/bin/rm -f ../../units/x86_64-linux/gtk2/lcl.ppu \
../../units/x86_64-linux/gtk2/lcl.o
/usr/local/bin/ppcx64 -gl -dgtk2 -Sci -Fu../../units/x86_64-linux -Fu../../../packager/units/x86_64-linux -Fu../../../components/lazutils/lib/x86_64-linux -Fu.. -Fu. -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -Fi. -FE. -FU../../units/x86_64-linux/gtk2 -Cg -dx86_64 ../lcl.pas
/bin/cp -f Makefile.compiled ../../units/x86_64-linux/gtk2/LCL.compiled
make[2]: Leaving directory '/home/michael/projects/lazarus-tst/lcl/interfaces/gtk2'
make -C gtk2 install
make[2]: Entering directory '/home/michael/projects/lazarus-tst/lcl/interfaces/gtk2'
/bin/rm -f ../../units/x86_64-linux/gtk2/lcl.ppu \
../../units/x86_64-linux/gtk2/lcl.o
/usr/local/bin/ppcx64 -gl -dgtk2 -Sci -Fu../../units/x86_64-linux -Fu../../../packager/units/x86_64-linux -Fu../../../components/lazutils/lib/x86_64-linux -Fu.. -Fu. -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -Fi. -FE. -FU../../units/x86_64-linux/gtk2 -Cg -dx86_64 ../lcl.pas
/bin/cp -f Makefile.compiled ../../units/x86_64-linux/gtk2/LCL.compiled
/bin/install -m 755 -d /tmp/me/lib/lazarus/lcl/units/x86_64-linux
/bin/install -c -m 644 ../../units/x86_64-linux/gtk2/lcl.pas.ppu /tmp/me/lib/lazarus/lcl/units/x86_64-linux
/bin/install: cannot stat '../../units/x86_64-linux/gtk2/lcl.pas.ppu': No such file or directory
Trying to install something which has been explicitly removed 4 commands prior to the
install command : no surprise this fails... :-)
After that I have given up and did a
find -name '*.ppu' -exec cp {} /tmp/me/lib/lazarus/lcl/units/x86_64-linux \;
find -name '*.o' -exec cp {} /tmp/me/lib/lazarus/lcl/units/x86_64-linux \;
In short: the makefiles are in dire need of some care :-)
(
before anyone recommends it:
using lazbuild to build our software is not an option,
since the sources are not installed on the machines where builds must be done.
)
Michael.
More information about the lazarus
mailing list