Recent

Author Topic: [SOLVED] Problem with upgrading to Lazarus 4.6  (Read 642 times)

Badger

  • Full Member
  • ***
  • Posts: 170
[SOLVED] Problem with upgrading to Lazarus 4.6
« on: May 20, 2026, 01:37:15 am »
A week ago I upgraded to Lazarus 4.6 and have been having some problems working on an old project.  Most I solved but one is giving me grief.  Almost at the stage where I wished I hadn't upgraded.

When I opened the project I got a number of error messages saying the program couldn't find component packages.  Most of these I installed without too much trouble.  However, CHMHelpDatabase, Richmemo and GridPrinter installed (I used online package manager) but when I clicked to rebuild the IDE I got the error message 'packagedefs(41,40) Error: Cannot find Laz_AVL_Tree used by packagedefs'

I tried the same exercise with the demo that came with Lazarus 4.6 - jpegexample with the same result.

Can anyone help before I bin my computer!
« Last Edit: May 23, 2026, 09:15:28 am by Badger »
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

jamie

  • Hero Member
  • *****
  • Posts: 7776
Re: Problem with upgrading to Lazarus 4.6
« Reply #1 on: May 20, 2026, 02:03:28 am »
Laz_AVL_TREE was removed since 4.x

it's replaced with AVL_TREE now.

Open the troubled package and edit the uses list to change it to AVL_TREE,Rebuild the package.

Rebuild the IDE>

P.S.
  you shouldn't be having this issue unless you didn't clean out the folder before installing 4.6, otherwise, you still have other packages hanging around

Jamie
« Last Edit: May 20, 2026, 02:06:49 am by jamie »
The only true wisdom is knowing you know nothing

Badger

  • Full Member
  • ***
  • Posts: 170
Re: Problem with upgrading to Lazarus 4.6
« Reply #2 on: May 20, 2026, 06:07:04 am »
Thanks Jamie
Which folder(s) should be cleaned out, it might be better to clean it out then reinstall 4.6
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

Khrys

  • Sr. Member
  • ****
  • Posts: 458
Re: Problem with upgrading to Lazarus 4.6
« Reply #3 on: May 20, 2026, 07:22:14 am »
Which folder(s) should be cleaned out

Apart from Lazarus's global installation directory (which should definitely differ from that of the old version!) there's also a user-local directory that stores not only config files, but also OPM packages, e.g. at  %APPDATA%\..\Local\lazarus\onlinepackagemanager\packages.

paweld

  • Hero Member
  • *****
  • Posts: 1645
Re: Problem with upgrading to Lazarus 4.6
« Reply #4 on: May 20, 2026, 08:25:45 am »
The path provided by @Khrys will only apply to a default Lazarus installation.

Personally, I recommend setting up the following system when installing Lazarus; this way, you shouldn’t encounter any issues when updating the environment:
- Specify a dedicated configuration folder path for each Lazarus instance. This can be done in the installer (a feature available for quite some time now), or you can create a file named lazarus.cfg in the directory containing the Lazarus executable with the following content:
Code: [Select]
--primary-config-path=C:\path_to_lazarus_config
- Install all external components (not part of the Lazarus installation) in a dedicated folder, e.g., other_components (C:\path_to_lazarus_config\other_components) - this refers to manual installation of components, not via OPM (because then they are already in the configuration directory)

With this configuration, updating involves removing the previous version of Lazarus (delete all files and folders from the lazarus directory except file lazarus.cfg), then install the new version of Lazarus, and after installation, rebuild the IDE (Menu > Tools > Build Lazarus with profile ...) and you’ll have everything as before.

Of course, it is possible that errors may occur during the rebuild due to changes in the IDE itself, but this happens very rarely.
Best regards / Pozdrawiam
paweld

Badger

  • Full Member
  • ***
  • Posts: 170
Re: Problem with upgrading to Lazarus 4.6
« Reply #5 on: May 21, 2026, 09:22:06 am »
I've managed to load and install all packages required for my old project with the exception of CalLite.  Is there an issue with this package re Lazarus 4.6 or am I doing something stupid?
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

wp

  • Hero Member
  • *****
  • Posts: 13584
Re: Problem with upgrading to Lazarus 4.6
« Reply #6 on: May 21, 2026, 11:16:23 am »
Installed CalLite from OPM into Laz 4.6 and Laz/main (64bit, each) without any issues.

Maybe you should try to do a clean build of the IDE: "Tools" > "Configure Build Lazarus" > check "Clean all" and "Switch after building to automatically" > click "Build".

Badger

  • Full Member
  • ***
  • Posts: 170
Re: Problem with upgrading to Lazarus 4.6
« Reply #7 on: May 21, 2026, 02:37:38 pm »
No Luck so far :(

When I Click Install on the OPM, The Download form opens then after about 5-10% of download showing on the progress bars, it closes the form and nothing else happens
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

wp

  • Hero Member
  • *****
  • Posts: 13584
Re: Problem with upgrading to Lazarus 4.6
« Reply #8 on: May 21, 2026, 03:15:03 pm »
Sounds like a download problem from the OPM server... Can you try the sourceforge site? Download the snapshot from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/callite/, unzip it, open the callight_pkg.lpk from the unzipped directory and click "Use" > "Install", allow to rebuild the IDE.

Badger

  • Full Member
  • ***
  • Posts: 170
Re: Problem with upgrading to Lazarus 4.6
« Reply #9 on: May 22, 2026, 02:58:28 am »
When I click on the rebuild button, I get the following error messages:-


Compile Package Callite.pkg 0.3.11: Exit code 1, Errors: 1
Fatal: Unit Calendarlite searched but Calendar not found
Compile package LazColorPallet 0.2.2 Aborted

I looked at the calendarlite source code and can't find any program reference to 'calendar'
Also, for information, when the package form opens, under 'Files', the source\calendarlite.pas has a red line though it.
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

jamie

  • Hero Member
  • *****
  • Posts: 7776
Re: Problem with upgrading to Lazarus 4.6
« Reply #10 on: May 22, 2026, 11:59:09 am »
recently Windows 11 turned on or installed "Smart App", it caused Lazarus to stop a few things and basically, I was unable to do much of anything with the tools on my Win 11 laptop.

 I turned off Smart App.

Jamie
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 13584
Re: Problem with upgrading to Lazarus 4.6
« Reply #11 on: May 23, 2026, 12:46:34 am »
Looked into this issue once more - with more detail, and now I can confirm the observation that the download of the OPM package of CalLite aborts in a very early stage, it looks as if it does not even start.

Since the OPM version is already rather old I created a new package from the svn sources and uploaded it to OPM. Now the download looks fine, and also the installation completes successfully.

Please try again with the new OPM version.

Badger

  • Full Member
  • ***
  • Posts: 170
[SOLVED] Re: Problem with upgrading to Lazarus 4.6
« Reply #12 on: May 23, 2026, 09:14:12 am »
YES!!!!!!!!!!  :D
Thank you WP

Jamie -  Looked at my Smart App control and it wasn't turned on - and the world hasn't ended so, following your remarks, I guess I'll leave it off.

So much to learn - so little time.

Thank you everyone.
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)

If at first you don't succeed - you're running about average!

I'm using Windows 11 Lazarus v4.6  FPC 3.2.2   x86_64-win64-win32/win64

 

TinyPortal © 2005-2018