Closed alexmyczko closed 2 years ago
Hello,
I hope indeed to make a new release. When I can take some vacations to have enough spare time to fix most bugs. If I cannot add features, at least I would like to publish it so that a version is still available on Debian. I hope you will help me again to do that.
Regards
Hello! I have just tried to compile a fresh copy of the repository, under Linux too.
The interesting part:
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(50,42) Error: (5000) Identifier not found "TMaskCaseSensitivity"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(50,44) Error: (5000) Identifier not found "mcsPlatformDefault"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(50,62) Error: (3203) Illegal expression
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(59,16) Error: (5000) Identifier not found "TMaskOptions"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(59,28) Error: (5007) Error in type definition
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(80,40) Error: (5000) Identifier not found "mcsCaseInsensitive"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(89,23) Error: (5000) Identifier not found "moDisableSets"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(94,31) Error: (5000) Identifier not found "mcsCaseInsensitive"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(95,25) Error: (5000) Identifier not found "moDisableSets"
/home/roland/Documents/sources/lazpaint-rchastain/lazpaint/getfilesindir.inc(95,40) Error: (5000) Identifier not found "moCaseSensitive"
I see. That's code I think I copied from somewhere in the LCL. I may need to rewrite it using more stable functions.
Thanks for reporting that
Created a PR. Works for me but needs to be checked.
https://github.com/bgrabitmap/lazpaint/pull/513
P.-S. Oops. I see that I modified all PO files.
Hello.
@alexmyczko : do you have also plan for a LazPaint package for https://raspi.debian.net?
If yes, @circular17: I can test the script for Rpi ARM32 and AARCH64.
I tried again to compile LazPaint, but using the "dev-lazpaint" branch.
git clone https://github.com/bgrabitmap/lazpaint.git
cd lazpaint
git checkout dev-lazpaint
I have an error when I load the project.
After that, I have the errors that we have seen, in getfilesindir.inc. I replace that file with the one I retouched yesterday.
After that, I have this error:
utoolpolygon.pas(349,72) Error: identifier idents no member "ValidatedPointCount"
The error with TargetRasterImageList is because you need latest version of BGRAControls (need to recompile Lazarus).
Same for ValidatedPointCount, need latest LazPaintControls (may not need to recompile Lazarus)
If the location has changed, you need to reopen all packages : BGRAControls, LazPaintControls and BGRABitmap. This will update where they are read.
LazPaint compiled successfully with Lazarus 2.2.2. Do you get the errors with another version?
I get following error trying to compile it on NixOS
(3104) Compiling ufilesystem.pas
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(930,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(930,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(945,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(945,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1005,1) Hint: (3123) "inherited" not yet supported inside inline procedure/func>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1005,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1010,1) Hint: (3123) "inherited" not yet supported inside inline procedure/func>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1010,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(963,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(963,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(968,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(968,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(950,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(950,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(955,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(955,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(997,1) Hint: (3123) "inherited" not yet supported inside inline procedure/funct>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(997,1) Hint: (3124) Inlining disabled
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1023,7) Note: (6058) Call to subroutine "function TFPGList<UFileSystem.TFileInf>
/nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/lib/fpc/3.2.2/units/x86_64-linux/rtl/fgl.ppu:fgl.pp(1023,20) Note: (6058) Call to subroutine "function TFPGList<UFileSystem.TFileIn>
/build/source/lazpaint/ufilesystem.pas(1054,26) Error: (5038) identifier idents no member "GetFilesInDir"
/build/source/lazpaint/ufilesystem.pas(1086,28) Error: (5038) identifier idents no member "GetFilesInDir"
ufilesystem.pas(1217) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /nix/store/acwx7q0mnzxy0ri8bv2w3v887aijqkfy-fpc-3.2.2/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile Project, Mode: Release, Target: release/bin/lazpaint: stopped with exit code 1
Error: (lazbuild) failed compiling of project /build/source/lazpaint/lazpaint.lpi
LazPaint compiled successfully with Lazarus 2.2.2. Do you get the errors with another version?
Indeed, compilation successful with Laz 2.3.0. It fails with Laz 2.0.10 (even with BGRAControls updated).
but Lazarus 2.3 is not yet released, right? If it's a unstable version I won't be able to package it
@onny GetFilesInDir is in the development version (dev-lazpaint). Maybe you tried with the master branch?
EDIT : in fact it is in the master branch as well. Hmmm
I've just added "getfilesindir.inc" to the project on dev branch. Maybe that helps.
LazPaint compiled successfully with Lazarus 2.2.2. Do you get the errors with another version?
Indeed, compilation successful with Laz 2.3.0. It fails with Laz 2.0.10 (even with BGRAControls updated).
Oh ok, well this is an older version. I assume we are talking about building with latest stable version, which is 2.2.2
Installed Lazarus 2.2.2. Compilation successful.
Installed Lazarus 2.2.2. Compilation successful.
How did you manage?
How did you manage?
I had to retouch the file getfilesindir.inc.
Here is the retouched file, in case you would like to try.
In fact with Lazarus 2.2.2 I can compile LazPaint (master and dev-lazpaint) without any change!
Sorry for the confusion.
I've merged new version 7.2 of LazPaint into master branch. Hopefully it will compile on all platforms.
I've put this version as prerelease for now. See details and schedule there: https://forum.lazarus.freepascal.org/index.php/topic,12037.msg449509.html#msg449509
somewhere appear to be hidden a version which is updated in debian:
# make
#lazbuild or fpc will determine what to recompile
lazbuild --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi
Error: (lazarus) invalid Lazarus directory "/usr/lib/lazarus/2.0.10/": directory not found
Error: (lazarus) Building failed: lazpaintcontrols/lazpaintcontrols.lpk
make: *** [Makefile:169: lazpaint] Error 2
i have /usr/lib/lazarus/2.2.0/ though
when i add a symlink from 2.2.0 to 2.0.10.0 it starts to build and fails here:
#lazbuild or fpc will determine what to recompile
lazbuild --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi
Hint: (lazarus) [TPackageLinks.UpdateUserLinks] using LastUsed date of old lcl 2.0.10 for lcl 2.2.0.4 in /usr/lib/lazarus/2.0.10/lcl/interfaces/lcl.lpk
Hint: (lazarus) [TPackageLinks.UpdateUserLinks] using LastUsed date of old lclbase 2.0.10 for lclbase 2.2.0.4 in /usr/lib/lazarus/2.0.10/lcl/lclbase.lpk
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Px86_64" "-Tlinux"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Px86_64" "-Tlinux"
Error: (lazbuild) Broken dependency: lazpaintcontrols 0.2->bgracontrols (>=7.0)
make: *** [Makefile:169: lazpaint] Error 3
I wonder, maybe there is still some startup program/link to the old version on your system?
Or an old configuration in "~/.lazarus"? This directory can be deleted to reset.
True, now it's only this:
# make
#lazbuild or fpc will determine what to recompile
lazbuild --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Px86_64" "-Tlinux"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Px86_64" "-Tlinux"
Error: (lazbuild) Broken dependency: lazpaintcontrols 0.2->bgracontrols (>=7.0)
maybe i got the wrong source? this is what i try with:
https://github.com/bgrabitmap/lazpaint/archive/refs/tags/v7.2.tar.gz
Looks like dependent libraries are not recompiled. Maybe try "make clean" before.
Note : the source you're using is correct.
lazbuild --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi
I didn't know that it was possible to install a package and build an application in one command. I always install packages first. Good to know !
Yes, that's actually pretty handy. In fact, I suppose I ensures the usage of the specified package. Otherwise if for some reason you would compile multiple project at the same time, using different version of the libraries, they could get mixed up.
i'm not having luck, and i've got no idea what i'm doing wrong... what does it mean?
Error: (lazbuild) Broken dependency: lazpaintcontrols 0.2->bgracontrols (>=7.0)
Here it says that lazpaintcontrols requires bgracontrols version 7.0 or higher.
Oh I got it, here this is just lazpaint repository, it does not contain bgracontrols nor bgrabitmap. You need to register both.
You need latest version of bgrabitmap and bgracontrols: https://github.com/bgrabitmap/bgrabitmap https://github.com/bgrabitmap/bgracontrols Then from command line, go in each repo and type "make".
This is different from up-stream version for Debian, which bundles the three repos together (I have not made the up-stream yet).
Great info, waiting for your bundled upstream then...
Hello @alexmyczko
I have updated the upstream repository: https://github.com/bgrabitmap/lazpaint-upstream
I've used the create_orig script to create an archive, signed it and sent it to mentors: https://mentors.debian.net/package/lazpaint/
I suppose some warnings could be fixed. About the file "resources/lazpaint.res" it is binary so the line length does not matter.
Note: I changed my e-mail to the new one "circular@fastmail.com"
Hmm there seem to be some errors that I did not encounter when compiling.
Error: (lazarus) unable to create package output directory "/usr/lib/lazarus/2.2.0/components/freetype/lib/x86_64-linux" of package "freetypelaz 1.0"
Error: (lazarus) unable to create package output directory "/usr/lib/lazarus/2.2.0/components/buildintf/units/x86_64-linux" of package "BuildIntf 1.0"
/usr/lib/lazarus/2.2.0/components/printers/./qt/qtprinters_h.inc(3,47) Fatal: (10022) Can't find unit qt5 used by OSPrinters
Error: (lazarus) Compile package Printer4Lazarus 0.5: stopped with exit code 1
I am not sure if the output directory is really a problem. But the error about not finding qt5 unit is surely causing the compilation to abort.
I am using the older distribution of Ubuntu (20.10) with older Lazarus (2.0.10). Maybe with a newer version I would get the error. I will try.
@alexmyczko I have been able to reproduce and then fix the compilation error by adding a rebuild all option (-B -r). That makes the build a bit slower, but at least there is no problem anymore with precompiled units.
As there are other minor fixes, I will make a new version LazPaint 7.2.2. I will tell you when the upstream is ready.
Upstream repository updated and sent to Debian!
https://github.com/bgrabitmap/lazpaint-upstream/releases/tag/v7.2.2 https://mentors.debian.net/package/lazpaint/
Strangely Mentors displays it could not run lintian.
Hello!
Congrats for the new release. I arrive a few late, sorry. What source must I use for the release of Rpi ARM32 and AARCH64? Is it possible, like we did for previous release, to compile lazpaint via a script, without installing Lazarus (using only the Lazarus source)?
If yes, where is the script?
Thanks.
Hello Fred!
Well you are just in time in fact.
I suppose everything works like last time. All necessary files (except FPC and LCL) are in the upstream repository: https://github.com/bgrabitmap/lazpaint-upstream
At the root, you have:
looks alot better, thanks a bunch!
Hello Circular.
Ha, ok, I did try to compile lazpaint with lazpaint-main/lazpaint/lazpaint.prj + ideU. But compilation fails because lazpaint.res is not found. So I try to create it with lazpaint/resources/createresource/createresource.pas. But this one fails to compile too because createreource.res is not found !?
I will try with lazpaint-upstream. ( maybe lazpaint.res is added there ?)
Thank you Alex for helping me upload. There are indeed some green rows in the Debian build status. https://buildd.debian.org/status/package.php?p=lazpaint&suite=sid
Fred, "lazpaint.res" is in the "resources" directory:
Ha, here on lazpaint-main there no lazpaint.res
But I did not check yet /lazpaint-upstream.
Ah indeed, it is only in the upstream.
I've created an issue on FPC bugtracker for the compilation error on MIPSel architecture: https://gitlab.com/freepascal.org/fpc/source/-/issues/39877
Hello. I finish test using lazpaint.prj + laspaint.res (from upstream).
OK, compiles + runs perfectly with -O1 optimisation. Maybe it works ok with > O1 (but in other fpc programs that I tested it was not stable with > O1).
I will attack compil + deb from lazpaint/upstream tonight.
Hum, I get error while trying this:
sudo ./custommakedeb /home/pi/lazarus
make[2]: Leaving directory '/home/pi/lazpaint-upstream' make[1]: Leaving directory '/home/pi/lazpaint-upstream' dh_autoreconf_clean -O--no-parallel dh_clean -O--no-parallel dpkg-source -b . dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../lazpaint_7.2.2.orig.tar.{bz2,gz,lzma,xz} dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 25 debuild: fatal error at line 1182: dpkg-buildpackage -us -uc -ui -d failed
?
And using ./configure:
pi@raspberrypi:~/lazpaint-upstream $sudo ./configure --prefix=/home/pi/lazarus/ For help type: ./configure --help Prefix set to: /home/pi/lazarus/ Using lazbuild You can now type: make
And after make:
pi@raspberrypi:~/lazpaint-upstream $ sudo make
lazbuild or fpc will determine what to recompile
lazbuild -B -r --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Parm" "-Tlinux" Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Parm" "-Tlinux" Error: (lazbuild) Broken dependency: lazpaintcontrols 0.2.1->bgracontrols (>=7.0) make: *** [Makefile:169: lazpaint] Error 3
?
Oh ok, so "./custommakedeb" uses the "debuild", which means it needs to be used the same way an upstream is made. If you want to try that way, here is how to works. To do that, you need to put the repository inside a folder, for example "upstream". So it will be a subdirectory of that and must be called "lazpaint-7.2.2" (with a dash). From "upstream/lazpaint-7.2.2", call "./create_orig" to create the archive. Say "y" to first question to do that. But do not say "y" to the second question (when it asks to launch "debuild"). Basically, "./custommakedeb" is a way to continue the process, but instead with custom compile options.
The other route, is to start with "./configure", but you need to give it parameters you want. As I mentioned earlier, I invite you to call it with "--help" parameter to see the syntax. This way you will be able to specify Lazarus source directory. Also it won't use "lazbuild" so you won't have the package dependency issue.
Hum, ok I will begin with ./configure ;-)
So --help give this:
pi@raspberrypi:~/lazpaint-upstream $ sudo ./configure --help For help type: ./configure --help Usage: ./configure [OPTIONS]
--prefix=PREFIX Specifies the install prefix. By default prefix is "/usr/local" For packages use "/usr" --lazdir=BASE_DIRECTORY_OF_LAZARUS Specifies to compile with FPC using the specified Lazarus sources. Otherwise lazbuild will be used. --fpcbin=FPC_BINARY Specifies the command to call Free Pascal Compiler. Default is "fpc"
But using ./configure + make give this (error dependency of bracontrol and use lazbuild):
pi@raspberrypi:~/lazpaint-upstream $ sudo ./configure --prefix=/home/pi/lazarus/
For help type: ./configure --help
Prefix set to: /home/pi/lazarus/
Using lazbuild
You can now type: make
pi@raspberrypi:~/lazpaint-upstream $ sudo make
#lazbuild or fpc will determine what to recompile
lazbuild -B -r --build-mode=Release lazpaintcontrols/lazpaintcontrols.lpk lazpaint/lazpaint.lpi
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Parm" "-Tlinux"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Parm" "-Tlinux"
Error: (lazbuild) Broken dependency: lazpaintcontrols 0.2.1->bgracontrols (>=7.0)
make: *** [Makefile:169: lazpaint] Error 3
Ooops, it is --lazdir=/home/pi/lazarus/ OK, it compiles now, write you later.....
Hello.
OK, compilation is ok and binary is in /release.
But running this binary gives strange color-wheel and layer tool:
The one compiled with ideU seems ok:
May I know what fpc parameters is used in the ./configure script?
Strange.
You can see the details near the end of the Makefile.
OK, changed in makefile this:
Most important: Added parameter -B ( there is the same problem with MSEgui + BGRabitmap, when compiling a app the first time, without -B fpc ignore some {ifdef something}, once used -B it is ok and you may recompile without -B, the {ifdef xxx} will be not ignored)
Less important: Changed parameter -O3 with -O1 ( O3 is not totally ready for ARM ).
Now binary in /release runs ok:
So, OK for lazpaint-no-install. But for creating the deb, I feel lost, in _how_to_makedeb.txt it talks about this: Depending on the target CPU, copy the folder 'lazpaint32' or 'lazpaint64'
But I dont see that folders...
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005672
is a new release planned? current one is 2 years old and doesnt build anymore.
debian will freeze in january 2023.