Recent

Author Topic: Graphics32 installation error  (Read 1181 times)

Jonny

  • Full Member
  • ***
  • Posts: 144
Graphics32 installation error
« on: March 20, 2025, 04:54:11 pm »
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.

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

  • Newbie
  • Posts: 5
Re: Graphics32 installation error
« Reply #1 on: March 20, 2025, 09:12:27 pm »
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: [Select]
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

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

  • Hero Member
  • *****
  • Posts: 12761
Re: Graphics32 installation error
« Reply #2 on: April 06, 2025, 02:17:38 pm »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 12153
  • FPC developer.
Re: Graphics32 installation error
« Reply #3 on: April 06, 2025, 02:27:36 pm »
I also removed the "-Ur" custom option from both packages simply because I never used it and do not understand what it does.

-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

  • Newbie
  • Posts: 5
Re: Graphics32 installation error
« Reply #4 on: April 07, 2025, 02:18:41 am »
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.

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.

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"

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"

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?

TRon

  • Hero Member
  • *****
  • Posts: 4309
Re: Graphics32 installation error
« Reply #5 on: April 07, 2025, 03:18:09 am »
How do I get my hands on a Lazarus with FPC 3.3.1 so I can reproduce?
In case prefering to do it with the least amount of time/knowledge you could opt for the following:

- Download FPCUpDeluxe matching your host from here
- Depending on the hosted platform set the executable bits for the downloaded FPCUpDeluxe executable
- Start FPCUpDeluxe (either from a shell/terminal or from the desktop)
- On startup, deny or approve the popup for sharing information
- at left top set installation path (preferably in user-space)
- in the tabs at the left side of the FPCUpDeluxe window, select the Tags tab (it will populate from online information so might take a sec)
- In the column lazarus version, select 4_0RC3 and press the "add Tag"-button beneath the list of Lazarus versions (some text like "the tag with name blah was added to the sources list" should then appears in the box below)
- switch to tab "Basic"
- for FPC version select trunk from the list
- for Lazarus version select the newly added lazarus_4_0RC3 from the list
- Press the button reading "Install/update FPC+Lazarus"
- Wait for the build to finish (hopefully without errors)

You should now have a standalone Lazarus 4.0RC3 IDE with Free Pascal 3.3.1 Compiler located at the selected installation directory.

The Free Pascal compiler can be invoked by using the free pascal startup script (located inside the selected installation directory) and which forces the use of the correct compiler configuration file. Lazarus can be started executing the startlazarus executable.
Today is tomorrow's yesterday.

AndersM

  • Newbie
  • Posts: 5
Re: Graphics32 installation error
« Reply #6 on: April 08, 2025, 02:10:28 am »
In case prefering to do it with the least amount of time/knowledge

Definitely :-)
Thanks; Much appreciated. I'll give it a go when I get some spare time.

 

TinyPortal © 2005-2018