Recent

Author Topic: Package Use – Install raise compiler error: checksum changed, Can't find unit.  (Read 1681 times)

TRon

  • Hero Member
  • *****
  • Posts: 4353
But lazbuild.exe does not compile any files, considering that all source codes correspond to binary codes. But this is not the case, checksum mismatches for some files are still present.
Yes, a known issue. It is being addressed but afaik the person who wants to take a stab at it does not have the time to do so atm (at soonest will be around juli/august and that is /if/ everything goes according to plan).

Quote
I have to open Lazarus IDE and click "Compile" to recompile some of the package files for which there are checksum mismatches.
As already suggested you can try add -Ur as compiler option to try ignore the checksum change but I know that does not always works the way as intended. Another measure is making sure the installation is in user-space. That still generates checksum errors but the build-system is able to get around it in that case though some people have reported this still can go wrong but in such cases it is an actual error in that the units are compiled in the wrong order (which needs to be addressed).

Therefor at minimum trunk is required.

Yes, unfortunately it is a bit messy atm but I never have had any issues with it following some simple rules most important one being user-space install.
« Last Edit: April 24, 2025, 05:12:31 pm by TRon »
Today is tomorrow's yesterday.

paule32

  • Sr. Member
  • ****
  • Posts: 442
to let FPC a try on the CLI, I often use the Option -B
this will compile all files.
so, you have clean .o bject Files.
not to forget the the -Fi -Fu -Fo flags...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11140
  • Debugger - SynEdit - and more
    • wiki
As for the difference
- ide does a 2nd build (partial)
- lazbuild does not

I don't know the details. But my guess is that maybe lazbuild checks some file dates? Either the lpk, or the package_master.pas, or the package.compiled, or similar.

If that is the case, then you can try to find the file, by changing the modification date of the relevant file. (not sure if there is a "touch" utility for Windows, like there is for Linux)

Or maybe if you delete the ppu of the package_master.pas (the auto-generated file that uses all others). Then it would be forced to recompile that, and load all other ppu

It's just a guess... So don't spend to much time in case it is wrong.
« Last Edit: April 24, 2025, 08:52:28 pm by Martin_fr »

paule32

  • Sr. Member
  • ****
  • Posts: 442
best practise in this case is a fresh new install after hard remove the files with: RM -rf /path/to/lazarus

NOTE: Never call RM with admin/root rights without what you doing !!!
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

dmitryb

  • Jr. Member
  • **
  • Posts: 77
There are cases when dual compilation of a package does not help. And I do not understand how to solve this.

If I installed a package in Lazarus IDE and then create a project that uses this package.

In the Run menu, select Clean up and Build (For the Project).

Lazarus starts recompiling all used packages of the Project in Clean mode, including the EhLib package.

As a result, all binaries for the EhLib package are recreated.

Some files again receive an incorrect checksum and compilation leads to the same error:

DBGridEhFindDlgs.pas(30,77) Error: Can't find unit DBGridEhFindDlgs used by DBGridEh

At the same time, Lazarus IDE somehow finds these files and highlights the line in it immediately after the uses section.

As a result, any compilation of the Run-Compile, Run-Build, Run-Clean up and Build project stops working with the same error.

You have to reopen the ehlib.lpk package and do double compilation in it again.

 

TinyPortal © 2005-2018