[Lazarus] Built console app on Linux, but won't run on another Linux machine

Bo Berglund bo.berglund at gmail.com
Sat Oct 27 18:11:46 CEST 2018

On Sat, 27 Oct 2018 18:00:56 +0300, Juha Manninen via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On Sat, Oct 27, 2018 at 4:35 PM Bo Berglund via Lazarus
><lazarus at lists.lazarus-ide.org> wrote:
>> Had to fix sections etc in the old dpr file so it now is a proper unit.
>You have a .lpr file in the Lazarus project, right? Not .dpr?

In the converted Delphi project I started with a .dpr file that
contained all active code except for two units to read Ini files mor
easily and to create Unix style hashed passwords.
When it was done it still used the dpr file as the main program

>> But once done it built OK and worked as expected in Ubuntu 18.04.
>> The stripped size of this program as about 10 Mb whereas the earlier
>> version was only some 7 Mb...
>With LCL it was 7 Mb and without LCL 10 Mb. Strange.
>> (LicMgr:19450): Gtk-WARNING **: cannot open display:
>There is no unit called LicMgr in FPC or Lazarus sources. Is it part
>of your project?

My program is called LicMgr because it ie meant to create and send
demo licenses to people asking on our website.
For this it needs to:
- Read incoming email (Indy 10)
- Parse the messages for validity
- If valid:
  - Create a new login entry on the server, so it needs to:
  - Read the password file from the server using FTP (Indy10)
  - Add the new entry to the end
  - Make sure there is not already a duplicate
  - Upload the modified password file (Indy10)
  - Compose an email to the customer with a link and login
  - Send the email (Indy10)
  - Log all activity including saving who is getting logins
>BTW, the Delphi converter is buggy if it adds LCL dependency for a
>console program. It should not.

Well, I created a new project from scratch and added in my units,
still the same problem.

>If you send me a test program then I can have a look.

I will try to make one from scratch and see what happens.
If still the same then I might take you up on that...

Bo Berglund
Developer in Sweden

More information about the Lazarus mailing list