Forum > Packages and Libraries
Graphics32 installation error
Jonny:
I found graphics32 (listed in the wiki) which boldly claims
--- Quote ---Graphics32 is a graphics library for Delphi and Lazarus. Optimized for 32-bit pixel formats, it provides fast operations with pixels and graphic primitives. In most cases Graphics32 considerably outperforms the standard TBitmap/TCanvas methods.
--- End quote ---
So decided to try it out.
I requires to install packages so selected "graphics32-master/Source/Packages/Lazarus/GR32_DSGN_Lazarus.lpk" and started the install process.
It then displayed an error "GR32.pas(1303,3) Fatal: Cannot find GR32_Blend used by GR32. Check search path of package GR32_Lazarus, try a clean rebuild, check implementation uses sections..".
The file exists and I also reinstalled Lazarus so had a clean build.
Reported the error with a GitHub Issue and followed suggestions but still it will not install on Lazarus v4 (apparently v3 works correctly).
The compilation log is attached below.
Has anyone been able to use this before or know of a fix to get it working?
AndersM:
Hi Jonny,
I decided to risk my sanity sign up here anyway, so here I am :-)
The "checksum changed" problem you are describing above appears to be the same one as issue #297 - but that isn't the one you described in issue #350.
Issue #350 is currently about an internal error in the FPC 3.3.1 x86_64-linux compiler. This is the error message you last posted there:
--- Code: ---graphics32-master/Source/GR32.Blur.SelectiveGaussian.pas(234,5) Fatal: Internal error 200408162
Fatal: (1018) Compilation aborted
Error: fpc/bin/x86_64-linux/ppcx64 returned an error exitcode
--- End code ---
I have been unable to reproduce the problem with Lazarus 4.0RC2 on Windows: Lazarus 4.0RC2 (rev lazarus_4_0RC2) FPC 3.2.2 x86_64-win64-win32/win64
Notice that I used a newer version of FPC so that's one thing you can try, although I doubt that it'll solve it.
If you've gotten past the internal error, and just forgot to tell me about it, then you can read through issue #297 to see how I managed to work around it. TLDR; Compile the run-time package 3 times and then the design-time package can compile.
wp:
Returning to this thread since I read in another one that it may help to compile packages multiple times, and this indeed seems to work...
But first of all, I still believe that the unit path of the designtime package GR32_DSGN_Lazarus is not correct because it points into the runtime directory. "..\..;..\..\Design;Lib\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)". I changed it to simply "..\..\Design". In general, packages shoud not have access to the sources of other packages.
I also removed the "-Ur" custom option from both packages simply because I never used it and do not understand what it does.
With these changes I can make the following observations:
Lazarus/main (from today's repository) + FPC 3.2.2, 32-bit, Windows 11
- Load GR32_Lazarus.lpk --> "More" > "Recompile clean" --> ok
- Load GR32_DSGN_Lazarus.lpk --> "More" > "Recompile clean" > "Compile and do not ask again" ---> "Cannot find GR32_Blend.pas"
- Load GR32_Lazarus.lpk --> "Compile clean" --> ok
- Load GR32_DSGN_Lazarus.lpk --> "Compile clean" > "Cannot find GR32.Blend.Assember.pas"
- Load GR32_Lazarus.lpk --> "Compile" --> ok
- Load GR32_DSGN_Lazarus.lpk --> "Compile clean" > "Cannot find GR32_VectorUtils.Reference.pas"
- Load GR32_Lazarus.lpk --> "Compile" --> ok
- Load GR32_DSGN_Lazarus.lpk --> "Compile" --> success! -->"Use" > "Install" --> The new IDE is successfully built, containing Graphics32 on the component palette. Testing one of the sample project --> fine!
Or shorter:
- Load GR32_Lazarus.lpk --> "More" > "Recompile clean" --> ok. Then three times: "Compile"
- Load GR32_DSGN_Lazarus.lpk --> "Compile" --> success! -->"Use" > "Install" --> The new IDE is successfully built, containing Graphics32 on the component palette. Sample project runs.
Repeating for a 64-bit IDE:
- same result --> fine
Repeating with Laz 3.8 + FPC 3.2.2 (64-bit):
- same result --> fine
BUT:
Repeating with Laz 2.0.12 + FPC 3.2.0 (32-bit) (just to see FPC 3.2.0 in action):
- compilation of runtime-package aborts in GR32_Bindings: IntToHex missing second argument. Added "8" as second parameter. Next issue in GR32.Recursive.Gaussian, "UnregisterGammaChangeNotification(FGammaPremultiplyLUT.GammaChangedHandler)": UnregisterGammaChangeNotification wants a "procedure of object" as argument, but "FGammePremultiplyLUT.GammachangedHandler is a "procedure of record" --> giving up.
BUT:
Repeating with Laz/main + FPC/main (from today's repository), 32 bit:
- The runtime package compiles fine, but whenever I try to compile the designtime package it aborts with "Cannot find GR32_Blend.pas"
And another issue is with FPC/main 64-bit:
- I cannot even compile the runtime package here: Error: GR32.Blur.RecursiveGaussian.pas(445,3) Error: Asm: [movss xmmreg1,mem64] invalid combination of opcode and operands"
Conclusion:
* Graphics32 can be installed in FPC3.2.2-based Lazarus, this requires multiple compilation of the runtime package.
* Other issue prevent installation with FPC 3.2.0 and with FPC 3.3.1.
marcov:
--- Quote from: wp on April 06, 2025, 02:17:38 pm ---I also removed the "-Ur" custom option from both packages simply because I never used it and do not understand what it does.
--- End quote ---
-Ur suppresses some triggers to rebuild units if sources with the name are found. FPC releases are built with this as a default, so that a .inc that you have in your project dir with the same name doesn't trigger recompiling the RTL etc. The r in -Ur is release.
If there are problems in the compiler, it can suppress some spurious recompilation scenarios.
AndersM:
--- Quote ---But first of all, I still believe that the unit path of the designtime package GR32_DSGN_Lazarus is not correct because it points into the runtime directory. "..\..;..\..\Design;Lib\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)". I changed it to simply "..\..\Design". In general, packages shoud not have access to the sources of other packages.
--- End quote ---
AFAIR the original reason I gave the design-time package access to the source folders was an attempt to work around the "Cannot find GR32_Blend.pas" problem. I also think there was a problem with accessing the .inc files.
Anyway, I just tried recompiling/reinstalling with just "..\..\Design" and I can confirm that it works (with the magic 3 recompiles) so I will get that change committed.
--- Quote ---BUT:
Repeating with Laz 2.0.12 + FPC 3.2.0 (32-bit) (just to see FPC 3.2.0 in action):
... --> giving up.
--- End quote ---
Yes. Lazarus 2.0 is likely way to old.
I generally only attempt to maintain compatibility with the latest major version since I don't use Lazarus or FPC myself.
--- Quote ---BUT:
Repeating with Laz/main + FPC/main (from today's repository), 32 bit:
- The runtime package compiles fine, but whenever I try to compile the designtime package it aborts with "Cannot find GR32_Blend.pas"
--- End quote ---
This is the 3-recompile-problem; You should be able to work around it by doing a clean compile and then a handful of recompiles before the install.
--- Quote ---And another issue is with FPC/main 64-bit:
- I cannot even compile the runtime package here: Error: GR32.Blur.RecursiveGaussian.pas(445,3) Error: Asm: [movss xmmreg1,mem64] invalid combination of opcode and operands"
--- End quote ---
And this is with FPC 3.3.1 ?
It works for me with FPC 3.2.2 (via Lazarus 4.0RC3). Screenshot attached.
How do I get my hands on a Lazarus with FPC 3.3.1 so I can reproduce?
Navigation
[0] Message Index
[#] Next page