Recent

Author Topic: Cannot find LazUTF8Classes  (Read 2057 times)

Markus

  • New Member
  • *
  • Posts: 22
Cannot find LazUTF8Classes
« on: April 09, 2025, 12:05:10 pm »
I just updated Lazarus from version 2.2.6 to 3.8.

Trying to compile my actual project now produces this error:

Cannot find LazUTF8Classes used by BGRAUTF8 of package BGRABitmapPack

Unfortunately I don't understand the discussion on this topic in other forum threads, since I am not a Lazarus developer.

Anyone who could help?
« Last Edit: April 09, 2025, 03:03:11 pm by Markus »

cdbc

  • Hero Member
  • *****
  • Posts: 2921
    • http://www.cdbc.dk
Re: Cannont find LazUTF8Classes
« Reply #1 on: April 09, 2025, 12:14:26 pm »
Hi
Add 'LazUtils' package as a dependency to your project.
"Project" -> "Project Inspector" -> "Add" -> "Requirement"  ...look for 'LazUtils' -> recompile "and Bob's your uncle"
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannont find LazUTF8Classes
« Reply #2 on: April 09, 2025, 12:48:55 pm »
I have now done that, restarted Lazarus, but the error still remains.  :(

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannont find LazUTF8Classes
« Reply #3 on: April 09, 2025, 12:55:49 pm »
The error turns up in the uses-list in BGRAUTF8.pas

Code: Pascal  [Select][+][-]
  1. // SPDX-License-Identifier: LGPL-3.0-linking-exception
  2. unit BGRAUTF8;
  3.  
  4. {$mode objfpc}{$H+}
  5. {$i bgrabitmap.inc}
  6.  
  7. interface
  8.  
  9. uses
  10.   BGRAClasses, SysUtils, math, BGRAUnicode{$IFDEF BGRABITMAP_USE_LCL}, lazutf8classes{$ENDIF};
  11.  
  12.  
  13.  

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12612
  • Debugger - SynEdit - and more
    • wiki
Re: Cannont find LazUTF8Classes
« Reply #4 on: April 09, 2025, 01:31:09 pm »
Does the BGRABitmapPack (which gives the error) have LazUtils as dependency?

Have you tried to open that package, and done "compile clean" (from the drop down, at the right end of the toolbar)?

If the error remains, then this may be an old issue in fpc. Open the Package LazUtils and recompile it twice
- first clean
- then just compile (no clean)
Then build the project (should recompile the bgra package)

If it still remains, then open LazUtil again, and recompile it with the "custom option" -Ur   (I thing -Ur, not sure might be -UR / check fpc doc for "build release ppu).
Mind that if you do that, and you make changes in your copy of LazUtils, it will not rebuild. You must trigger that by manually rebuild clean.

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannont find LazUTF8Classes
« Reply #5 on: April 09, 2025, 02:19:28 pm »
I don't find the function "compile clean". Do you mean "Clean up and Build"? This one does not solve the problem.

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannont find LazUTF8Classes
« Reply #6 on: April 09, 2025, 02:58:34 pm »
After searching, I guess, you mean Package > Open Loaded Package > LazUtils > More > Recompile Clean..

This does not solve the problem.

I also tested the -Ur parameter, which does not change the problem.

dsiders

  • Hero Member
  • *****
  • Posts: 1677
Re: Cannont find LazUTF8Classes
« Reply #7 on: April 09, 2025, 04:00:59 pm »
Hi
Add 'LazUtils' package as a dependency to your project.
"Project" -> "Project Inspector" -> "Add" -> "Requirement"  ...look for 'LazUtils' -> recompile "and Bob's your uncle"
Regards Benny

And where is it in LazUtils 3.8 that LazUtf8Classes.pas is located? Nowhere. He needs to update the BGRA package too.

cdbc

  • Hero Member
  • *****
  • Posts: 2921
    • http://www.cdbc.dk
Re: Cannot find LazUTF8Classes
« Reply #8 on: April 09, 2025, 04:35:54 pm »
Ouch... My bad - Sorry.
I still have 3.6 and I dunno how old my BGRABitmat is...  %)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannot find LazUTF8Classes
« Reply #9 on: April 09, 2025, 07:04:56 pm »
I already deinstalled Lazarus and re-installed everything new. No change.

To be sure, I again used Package > Online Package Manager to install BGRABitmap and BGRAControls.

During compilation, it said "Cannot install package: "bgrabitmappack4fpgui.lpk", but this was the only error.

Now, I get the following Error:
bgrautf8.pas(10,72) Error: Cannot find lazutf8classes used by BGRAUTF8 of package BGRABitmapPack.

You tried to use a unit of which the PPU file isn't found by the
 compiler. Check your configuration file for the unit paths.

If nothing helps, I have to downdate back to my previous version 2.2.6.
« Last Edit: April 09, 2025, 07:08:30 pm by Markus »

paweld

  • Hero Member
  • *****
  • Posts: 1691
Re: Cannot find LazUTF8Classes
« Reply #10 on: April 09, 2025, 07:13:21 pm »
Install a new version of BGRABitmap - using Online Package Manager or download the package sources from: https://github.com/bgrabitmap/bgrabitmap/archive/refs/tags/v11.6.4.zip unpack archive and install using Menu > Package > Open Package File (*.lpk).
You get an error because you are trying to install an older version of the BGRABitmap package, which only works well with FPC 3.2.0 and below
Best regards / Pozdrawiam
paweld

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4719
  • I like bugs.
Re: Cannot find LazUTF8Classes
« Reply #11 on: April 09, 2025, 07:59:16 pm »
He wrote he used Package > Online Package Manager to install BGRABitmap and BGRAControls.
Does OPM have the latest version?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannot find LazUTF8Classes
« Reply #12 on: April 09, 2025, 08:17:16 pm »
I have used the online package manager. The version of BGRABitmapPack is 11.6.4.

See the image.

paweld

  • Hero Member
  • *****
  • Posts: 1691
Re: Cannot find LazUTF8Classes
« Reply #13 on: April 09, 2025, 08:35:08 pm »
Then you have installed the package from a different folder, or you have some symbolic link to the BGRAUTF8.pas file in an older version.
A while ago I downloaded the component using OPM (update date 2025-03-17) and the file is correct, while yours is not - see attachments.

Search for all occurrences of the BGRAUTF8.pas file on disk (in the Lazarus directory and configuration folder) and delete old versions of the component.
For everything before deleting, make a backup
« Last Edit: April 09, 2025, 08:39:02 pm by paweld »
Best regards / Pozdrawiam
paweld

Markus

  • New Member
  • *
  • Posts: 22
Re: Cannot find LazUTF8Classes
« Reply #14 on: April 09, 2025, 08:57:19 pm »
 :D :D :D
YES! Now it works!

This was the problem! Big thanks to your patience!

I am really still confused how this could happen, even after using the online package manager. I can see that the faulty BGRAUTF8.pas had been modified (=installed) today after 18h, so it really confuses me that I got it then.

Could that be due to that I did not delete all user settings before re-installing Lazarus?

 

TinyPortal © 2005-2018