Lazarus
Installation => Linux => Topic started by: auRazor on January 11, 2021, 06:50:55 am
-
Hello,
I have converted a Delphi service application into a freepascal Daemon application. I am compiling on ubuntu 20.10 and it works fine but when I run the executable on an OEL7 server, that has no GUI, I am getting this error:
libgdk-x11-2.0.so.0: cannot open shared object file: No such file or directory
The application had zeoslib which I have used on another CLI with no issue and the Indy components. I want to remove this dependency as I am unable and unwilling to install xwindows. I have gone through all files and removed
I have removed LCLIntf, LCLType, Graphics, Controls, Forms, Dialogs from the project files and left SysUtils, Classes. ldd is showing the so as a dependency.
How can I find what is loading this dependency or is there a switch to exclude it?
-
Hmm a bit more research seems to indicated that Indy may be the problem. Has anyone been able to use Indy in a non GUI environment? Can anyone suggest an alternative to listening for UDP/TCP ports?
-
I can't comment directly on Ubuntu and Indy. However handling TCP and UDP ports depends on exactly what you're doing: if you're handling a standard protocol then stick to well-used components, but if you're doing something non-standard you're often as not better off setting up a thread and going direct to the (Berkeley) sockets API.
Remember that low-numbered ports (can't remember whether it's < or <= 1024) need special handling on unix.
MarkMLl
-
This turned out to be LCLwidgets=gui when I set to nogui it ran fine on a server with no GUI