Recent

Author Topic: Compiling on unbutu 20.10 to distibute an OEL7 service  (Read 1590 times)

auRazor

  • New Member
  • *
  • Posts: 17
Compiling on unbutu 20.10 to distibute an OEL7 service
« 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?


auRazor

  • New Member
  • *
  • Posts: 17
Re: Compiling on unbutu 20.10 to distibute an OEL7 service
« Reply #1 on: January 11, 2021, 07:07:15 am »
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?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6685
Re: Compiling on unbutu 20.10 to distibute an OEL7 service
« Reply #2 on: January 11, 2021, 10:36:21 am »
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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

auRazor

  • New Member
  • *
  • Posts: 17
Re: Compiling on unbutu 20.10 to distibute an OEL7 service
« Reply #3 on: January 21, 2021, 05:16:49 am »
This turned out to be LCLwidgets=gui when I set to nogui it ran fine on a server with no GUI

 

TinyPortal © 2005-2018