Forum > Packages and Libraries

Help testing LockBox2

(1/1)

jarto:
Me and Sebastian Zierer have been working on improving TurboPower LockBox2 to make it work also on 64 bit platforms. Sebastian has taken care of the new Delphi platforms and I've been working on FPC. As a result we should have a version that works on pretty much any Delphi, Kylix and FPC on Windows, Linux and Mac and both 32 and 64 bits.

Latest sources are at: https://github.com/jarto/lockbox2

Before we can do an official release, we'd like to know how many platforms we actually do support. So if you use FPC/Lazarus on FreeBSD or Mac and you'd be interested to do a simple test, please download the latest code and try something like:

uses ...., LbRsa;
...
with TLbRSA.Create(nil) do begin
  KeySize:=aks1024;
  GenerateKeyPair;
  Free;
end;

Please let me know if it compiles or if there are any errors.

Graeme:

--- Quote from: jarto on February 20, 2013, 09:01:02 pm ---Please let me know if it compiles or if there are any errors.

--- End quote ---

I tried to compile the exact example code you posted. I used 64-bit FreeBSD 9.1 and FPC 2.6.3. It seems LbRSA.pas is referencing the Windows unit, even though I am using the FreeBSD platform. I had a quick look, and it seems your LockBox.inc file is wrong. I would wrap all the Delphi related defines and checks in a {$IFNDEF FPC} block. The problem below was caused by line 49 and line 126 in LockBox.inc.


--- Code: ---Free Pascal Compiler version 2.6.3 [2013/03/17] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling test1.pas
Compiling /data/devel/tests/lockbox2/source/LbRSA.pas
LbRSA.pas(40,3) Fatal: Can't find unit Windows used by LbRSA
Fatal: Compilation aborted
Error: /data/devel/fpc-2.6.3/x86_64-freebsd/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Compilation complete

--- End code ---

...then after fixing the LockBox.inc file for FPC and FreeBSD, I still got a compiler error in the LbRandom.pas unit


--- Code: ---Free Pascal Compiler version 2.6.3 [2013/03/17] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling test1.pas
Compiling /data/devel/tests/lockbox2/source/LbRSA.pas
Compiling /data/devel/tests/lockbox2/source/LbBigInt.pas
Compiling /data/devel/tests/lockbox2/source/LbRandom.pas
Compiling /data/devel/tests/lockbox2/source/LbCipher.pas
Compiling /data/devel/tests/lockbox2/source/LbUtils.pas
Compiling /data/devel/tests/lockbox2/source/LbRandom.pas
LbRandom.pas(366,119) Error: Incompatible type for arg no. 1: Got "TThreadID", expected "QWord"
LbRandom.pas(384) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /data/devel/fpc-2.6.3/x86_64-freebsd/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Compilation complete

--- End code ---

Graeme:
I forked your repository on Github and made some commits fixing compilation issues under FreeBSD. I sent you a pull request.

Navigation

[0] Message Index

Go to full version