Re: [Lazarus] Makefile issues
On Fri, 2 Dec 2022, Mattias Gaertner via lazarus wrote: On Thu, 1 Dec 2022 23:22:38 +0100 (CET) Michael Van Canneyt via lazarus wrote: [...] Well, it turns out that "make useride" also does not work on a fresh checkout. It didn't work when Cleaning is enabled. Fixed. [...] But the point of the 'main targets' is taken, so I filed a feature request in the issue tracker to be able to build the LCL using just the Makefile. basically, I would like something as make lcl to produce the LCL units. make registration lazutils lcl Slightly better is: make -J N registration make -J N lazutils make -J N lcl because the order as specified on the command-line is not guaranteed when you do parallel compilation. Still, it feels strange to me that make lcl is not enough, but OK. The problem is that make is pretty dumb, so it creates only a rudimentary Makefile.compiled file. Makefile.compiled does not even come into play, see below. If you use lazbuild or lazarus to compile a project they might decide to recompile the lcl. That may not happen, because the sources will not be installed on the build machine. It would be safer to compile lazbuild, and then use that to compile the lcl. The projects will be compiled with fpc only in a docker environment. The devops people don't want another build tool. Only make. (which is why I wanted to have make install working - but I had to resort to using find and cp manually) The goal is to have just fpc, its units and the LCL units in compiled form in the docker. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Makefile issues
On Thu, 1 Dec 2022 23:22:38 +0100 (CET) Michael Van Canneyt via lazarus wrote: >[...] > Well, it turns out that "make useride" also does not work on a fresh > checkout. It didn't work when Cleaning is enabled. Fixed. >[...] > But the point of the 'main targets' is taken, so I filed a feature > request in the issue tracker to be able to build the LCL using just > the Makefile. > > basically, I would like something as > > make lcl > > to produce the LCL units. make registration lazutils lcl The problem is that make is pretty dumb, so it creates only a rudimentary Makefile.compiled file. If you use lazbuild or lazarus to compile a project they might decide to recompile the lcl. It would be safer to compile lazbuild, and then use that to compile the lcl. Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Makefile issues
On Thu, 1 Dec 2022, Mattias Gaertner via lazarus wrote: On Wed, 30 Nov 2022 14:35:24 +0100 (CET) Michael Van Canneyt via lazarus wrote: Hello, The lazarus makefile has some dependency issues. make ide: That's an internal target. See "make help". Am I correct in my understanding that in fact only the "main" targets all, bigide, useride are supposed to work out of the box when you start from a fresh checkout ? Yes. Well, it turns out that "make useride" also does not work on a fresh checkout. At least, I could no longer get it to work. see my comment in https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40024 But the point of the 'main targets' is taken, so I filed a feature request in the issue tracker to be able to build the LCL using just the Makefile. basically, I would like something as make lcl to produce the LCL units. (it can be another 'main' target name if that is needed, obviously) Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Makefile issues
On Wed, 30 Nov 2022 14:35:24 +0100 (CET) Michael Van Canneyt via lazarus wrote: > Hello, > > The lazarus makefile has some dependency issues. > > make ide: That's an internal target. See "make help". >[...] > Based on the output of "make help", in an attempt to create > svn2revisioninc I did: > > > make tools > make -C tools > make[1]: Entering directory '/home/michael/projects/lazarus-tst/tools' > Makefile:2956: warning: overriding recipe for target '.' > Makefile:2954: warning: ignoring old recipe for target '.' > make --assume-new=lazres.pp lazres > make[2]: Entering directory '/home/michael/projects/lazarus-tst/tools' > Makefile:2956: warning: overriding recipe for target '.' > Makefile:2954: warning: ignoring old recipe for target '.' > /usr/local/bin/ppcx64 -gl -Fu. > -Fu../components/lazutils/lib/x86_64-linux > -Fu../lcl/units/x86_64-linux -Fu../lcl/units/x86_64-linux/nogui > -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FU. -Cg > -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -Flinclude > -Fl/etc/ld.so.conf.d/*.conf -dx86_64 lazres.pp lazres.pp(43,22) > Fatal: Can't find unit LazLogger used by LazRes Sub target "tools" require a compiled nogui lcl. Just use the main targets. The makefiles are not supposed to be called in any order. They are merely a bootstrap to get to lazbuild and/or lazarus. >[...] > > make basecomponents Same here. >[...] > After some more failed attempts trying to compile "sub-targets", I > gave up. Good. > Am I correct in my understanding that in fact only the "main" targets > all, bigide, useride are supposed to work out of the box when you > start from a fresh checkout ? Yes. Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Makefile issues
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.
Re: [Lazarus] Makefile issues
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. make ide: make ide make -C ide ide make[1]: Entering directory '/home/michael/projects/lazarus-tst/ide' /bin/mkdir -p ../units/x86_64-linux/gtk2 make -C ../tools svn2revisioninc OS_TARGET=linux CPU_TARGET=x86_64 OPT='' make[2]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' /usr/local/bin/ppcx64 -gl -Fu. -Fu../components/lazutils/lib/x86_64-linux -Fu../lcl/units/x86_64-linux -Fu../lcl/units/x86_64-linux/nogui -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FU. -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dx86_64 svn2revisioninc.pas svn2revisioninc.pas(64,3) Fatal: Can't find unit FileUtil used by Svn2RevisionInc Fatal: Compilation aborted make[2]: *** [Makefile:2967: svn2revisioninc] Error 1 make[2]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make[1]: *** [Makefile:5387: revisioninc] Error 2 make[1]: Leaving directory '/home/michael/projects/lazarus-tst/ide' make: *** [Makefile:3788: ide] Error 2 Based on the output of "make help", in an attempt to create svn2revisioninc I did: make tools make -C tools make[1]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' make --assume-new=lazres.pp lazres make[2]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' /usr/local/bin/ppcx64 -gl -Fu. -Fu../components/lazutils/lib/x86_64-linux -Fu../lcl/units/x86_64-linux -Fu../lcl/units/x86_64-linux/nogui -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FU. -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dx86_64 lazres.pp lazres.pp(43,22) Fatal: Can't find unit LazLogger used by LazRes Fatal: Compilation aborted make[2]: *** [Makefile:2964: lazres] Error 1 make[2]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make[1]: *** [Makefile:3394: all] Error 2 make[1]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make: *** [Makefile:3784: tools] Error 2 Similar, make basecomponents make -C components/buildintf make[1]: Entering directory '/home/michael/projects/lazarus-tst/components/buildintf' /bin/rm -f units/x86_64-linux/buildintf.ppu /bin/mkdir -p units/x86_64-linux /usr/local/bin/ppcx64 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu../../packager/units/x86_64-linux -Fu../lazutils/lib/x86_64-linux -Fu. -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -dx86_64 buildintf.pas Hint: (11030) Start of reading config file /home/michael/.fpc.cfg Hint: (11031) End of reading config file /home/michael/.fpc.cfg Free Pascal Compiler version 3.3.1 [2022/11/05] for x86_64 Copyright (c) 1993-2022 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling buildintf.pas (3104) Compiling baseideintf.pas /home/michael/projects/lazarus-tst/components/buildintf/baseideintf.pas(21,3) Fatal: (10022) Can't find unit LazUTF8 used by BaseIDEIntf fatal: (1018) Compilation aborted After some more failed attempts trying to compile "sub-targets", I gave up. Am I correct in my understanding that in fact only the "main" targets all, bigide, useride are supposed to work out of the box when you start from a fresh checkout ? Michael. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Makefile issues
Hello, The lazarus makefile has some dependency issues. make ide: make ide make -C ide ide make[1]: Entering directory '/home/michael/projects/lazarus-tst/ide' /bin/mkdir -p ../units/x86_64-linux/gtk2 make -C ../tools svn2revisioninc OS_TARGET=linux CPU_TARGET=x86_64 OPT='' make[2]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' /usr/local/bin/ppcx64 -gl -Fu. -Fu../components/lazutils/lib/x86_64-linux -Fu../lcl/units/x86_64-linux -Fu../lcl/units/x86_64-linux/nogui -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FU. -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dx86_64 svn2revisioninc.pas svn2revisioninc.pas(64,3) Fatal: Can't find unit FileUtil used by Svn2RevisionInc Fatal: Compilation aborted make[2]: *** [Makefile:2967: svn2revisioninc] Error 1 make[2]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make[1]: *** [Makefile:5387: revisioninc] Error 2 make[1]: Leaving directory '/home/michael/projects/lazarus-tst/ide' make: *** [Makefile:3788: ide] Error 2 Based on the output of "make help", in an attempt to create svn2revisioninc I did: make tools make -C tools make[1]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' make --assume-new=lazres.pp lazres make[2]: Entering directory '/home/michael/projects/lazarus-tst/tools' Makefile:2956: warning: overriding recipe for target '.' Makefile:2954: warning: ignoring old recipe for target '.' /usr/local/bin/ppcx64 -gl -Fu. -Fu../components/lazutils/lib/x86_64-linux -Fu../lcl/units/x86_64-linux -Fu../lcl/units/x86_64-linux/nogui -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FU. -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dx86_64 lazres.pp lazres.pp(43,22) Fatal: Can't find unit LazLogger used by LazRes Fatal: Compilation aborted make[2]: *** [Makefile:2964: lazres] Error 1 make[2]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make[1]: *** [Makefile:3394: all] Error 2 make[1]: Leaving directory '/home/michael/projects/lazarus-tst/tools' make: *** [Makefile:3784: tools] Error 2 Similar, make basecomponents make -C components/buildintf make[1]: Entering directory '/home/michael/projects/lazarus-tst/components/buildintf' /bin/rm -f units/x86_64-linux/buildintf.ppu /bin/mkdir -p units/x86_64-linux /usr/local/bin/ppcx64 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu../../packager/units/x86_64-linux -Fu../lazutils/lib/x86_64-linux -Fu. -Fu/usr/local/lib/fpc/3.3.1/units/x86_64-linux/rtl -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/9 -dx86_64 buildintf.pas Hint: (11030) Start of reading config file /home/michael/.fpc.cfg Hint: (11031) End of reading config file /home/michael/.fpc.cfg Free Pascal Compiler version 3.3.1 [2022/11/05] for x86_64 Copyright (c) 1993-2022 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling buildintf.pas (3104) Compiling baseideintf.pas /home/michael/projects/lazarus-tst/components/buildintf/baseideintf.pas(21,3) Fatal: (10022) Can't find unit LazUTF8 used by BaseIDEIntf fatal: (1018) Compilation aborted After some more failed attempts trying to compile "sub-targets", I gave up. Am I correct in my understanding that in fact only the "main" targets all, bigide, useride are supposed to work out of the box when you start from a fresh checkout ? Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus