[Lazarus] Built console app on Linux, but won't run on another Linux machine
pascaldragon at googlemail.com
Sat Oct 27 13:39:12 CEST 2018
Am 27.10.2018 um 13:03 schrieb Bo Berglund via Lazarus:
>>> The dev machine has a GUI interface (otherwise Lazarus would not work)
>>> but the program itself is purely non-gui, it is just a Pascal program
>>> and it does not even send output to the console, just handles files
>>> and networking. Still the name libgdk-x11-2.0 suggests that it has
>>> something to do with X...
>> Maybe your project uses the LCL either directly or indirectly. See
>> Project Inspector.
>> If yes, remove it or set it to lclwidgettype "nogui".
> I had LCL there as Required package, but I removed it.
> When I build the project the resulting binary is exactly the same
> size, so there could not be anythingadded or deleted to the program...
> The only external I can think of is needed is OpenSSH since my Indy10
> external mail connection uses encrypted communication. But tah would
> not be related to X11, right?
> And I have not used any directive for it (other than what mau be
> hidden inside Indy10).
Binaries usually have aligned sections so removing or adding just a
small bit (like the dependency on gdk in your case introduced by the
LCL) does not necessarily mean a change in size.
You could also try "objdump -x /path/to/your/binary" and look at was is
listed as NEEDED in the Dynamic Section. You'd then need to find out
what dependencies you don't want to have and then figure out which units
led to their inclusion. Maybe it's just a stray unit that pulls in some
More information about the Lazarus