Forum > Packages and Libraries

[SOLVED] Trying to install package without source code --> Checksum error...

(1/3) > >>

bhreis88:
Hi all,

so I am trying to make a release version of my package. I have read a lot on the subject so far and tried to follow the instructions properly, specially from http://prezi.com/vpuyxca-qboq/how-to-create-a-closed-source-package-with-lazarus/ .

The code was written in Lazarus 1.2.0, i386-win32, fpc 2.6.2, Windows 7 32 bit.

But the binary version cannot be installed in any other computer unless first I install the package with the source code, uninstall it, and install again the package only with the binary files. Which is not useful.

The majority of the tests was done on another computer with exactly the same configuration (Lazarus 1.2.0, i386-win32, fpc 2.6.2, Windows 7 32 bit). But I've also tried on a Windows 8 64, with both Lazarus 1.2.2 and 1.2.4 i386-win32, and the result was the same: only possible after compiling once with the source code first.

With "-vut" activated, the error is like this:

--- Code: ---.
.
.
Unitsearch: PbAbout.ppu
Unitsearch: PbAbout.pp
Unitsearch: PbAbout.pas
Unitsearch: C:\release_0707141543\bin\LAZ\lib\i386-win32\PbAbout.ppu
PPU Loading C:\release_0707141543\bin\LAZ\lib\i386-win32\PbAbout.ppu
(PBABOUT)  PPU Name: C:\release_0707141543\bin\LAZ\lib\i386-win32\PbAbout.ppu
(PBABOUT)  PPU Time: 2014/07/07 15:43:38
(PBABOUT)  PPU Flags: 741507
(PBABOUT)  PPU Crc: C0E63896
(PBABOUT)  PPU Crc: 1C86CAFE (intfc)
(PBABOUT)  PPU Crc: 1249ECCF (indc)
(PBABOUT)  Number of definitions: 66
(PBABOUT)  Number of symbols: 74
(PBABOUT)  PPU Source: PbAbout.pas not found
(PBABOUT)  PPU Source: compilers.inc not found
(PBABOUT)  Load from PBABOUT (interface) unit SYSTEM
(PBABOUT)  Adding dependency: PBABOUT depends on SYSTEM
(PBABOUT)  Load from PBABOUT (interface) unit OBJPAS
(PBABOUT)  Adding dependency: PBABOUT depends on OBJPAS
(PBABOUT)  Load from PBABOUT (interface) unit WINDOWS
(PBABOUT)  Adding dependency: PBABOUT depends on WINDOWS
(PBABOUT)  Load from PBABOUT (interface) unit LCLINTF
(PBABOUT)  Adding dependency: PBABOUT depends on LCLINTF
(PBABOUT)  Recompiling PbAbout, checksum changed for LCLIntf
Unitsearch: PbAbout.pp
Unitsearch: PbAbout.pas
Unitsearch: C:\lazarus\designer\PbAbout.pp
Unitsearch: C:\lazarus\designer\PbAbout.pas
Unitsearch: C:\lazarus\debugger\PbAbout.pp
Unitsearch: C:\lazarus\debugger\PbAbout.pas
Unitsearch: C:\lazarus\debugger\frames\PbAbout.pp
Unitsearch: C:\lazarus\debugger\frames\PbAbout.pas
.
.
.
Unitsearch: C:\lazarus\fpc\2.6.2\bin\i386-win32\PbAbout.pp
Unitsearch: C:\lazarus\fpc\2.6.2\bin\i386-win32\PbAbout.pas
PbAbout.pas(72,12) Fatal: Can not find PbAbout used by ssv1laz, ppu=C:\release_0707141543\bin\LAZ\lib\i386-win32\PbAbout.ppu, package ssv1laz

--- End code ---

So I think the compiler tries to update the binary files because, in another Lazarus configuration, it finds mismatching dates between files PbAbout.ppu from my package and LCLIntf.ppu from target Lazarus installation. Of course it cannot compile without the source file PbAbout.pas and the installation stops.

I get the same error if I try to install the binary version from command line:

--- Code: ---lazbuild --skip-dependencies --add-package ssv1laz.lpk --builde-ide=
--- End code ---
and even if I remove the unit LCLIntf from PbAbout.pas, when the message is:

--- Code: ---(PBABOUT)  Recompiling PbAbout, checksum changed for LCLType
--- End code ---
which is the same error for another necessary unit.

So what can be done about that? How to tell the compiler not to compile PbAbout.ppu if it finds an "old" LCLIntf.ppu? Shouldn't this be obvious, since "-Ur" is activated for the package?

Thanks for your time!

bhreis88:
Updating...

I've discovered I can install the binary version, without the source code, on another machine running Lazarus 1.2.0, i386-win32, fpc 2.6.2, Win8-64, if first I rebuild the IDE with "Clean Up + Build all" + "Clean all" in Tools/Configure Build Lazarus ... .

Unfortunately it doesn't work if I do the same thing in the same target machine with Lazarus 1.2.2 or 1.2.4 and fpc 2.6.4. Even after recompiling the binary files with a brand new installation of Lazarus 1.2.2 or 1.2.4 and fpc 2.6.4 in the source code machine.

Any thoughts? Seriously, any idea is much welcome!

Cheers

Leledumbo:
a unit must be compiled with a compatible compiler in order to be usable. Thus, if it's compiled with FPC 2.6.2, then using it in FPC 2.6.4 will result in PPU checksum error. This has been explained in the wiki: http://wiki.freepascal.org/Releasing_units_without_source_code

BigChimp:

--- Quote from: bhreis88 on July 08, 2014, 02:27:03 pm ---The majority of the tests was done on another computer with exactly the same configuration (Lazarus 1.2.0, i386-win32, fpc 2.6.2, Windows 7 32 bit). But I've also tried on a Windows 8 64, with both Lazarus 1.2.2 and 1.2.4 i386-win32, and the result was the same: only possible after compiling once with the source code first.

--- End quote ---
AFAIR, the Lazarus wiki article on closed source ppus explicilty mentions that only the *exact same* Laz+FPC version is supported. No idea whether the article you linked to mentions that too.

Edit: Leledumbo was there first - what he said ;)

bhreis88:
Thank you very very much, Leledumbo and BigChimp!
It's great to finally have some clarity in this subject!

So it makes sense the need to use the exact same Laz+FPC version. But I have trouble accepting I need also the same OS in both machines, because my package did install in a Win8-64bit machine after compiling with Win7-32bit, both with Laz-1.2.0+FPC-2.6.2. .

I am testing a few more possibilities here and I'll soon post the results.  :D

Navigation

[0] Message Index

[#] Next page

Go to full version