Recent

Author Topic: [SOLVED]Daemon requiring libgdk-x11-2.0.so.0  (Read 271 times)

hrayon

  • Full Member
  • ***
  • Posts: 106
[SOLVED]Daemon requiring libgdk-x11-2.0.so.0
« on: September 23, 2020, 02:53:28 am »
Hi!
I'm developing a linux daemon in this VM: lubuntu-18.04-alternate-amd64.
And after build and run from console for tests:
Code: Pascal  [Select][+][-]
  1. sudo ./myapplication -r
it's possible get some expected results.
But if I copy my application to another computer (not VM):
Ubuntu Server 20.04 LTS (without graphical interface)
to try run the same prompt commands to test my application then I'm receiving the folowing error:

"error while loading shared libraries: libgdk-x11-2.0.so.0: cannot open shared object file: No such file or directory"

I'm not a Linux expert, but this library is about graphical interface, right?
If yes, I belive that some graphic dependency exists in my code, but I'm not finding.

My project file has this uses list:
Code: Pascal  [Select][+][-]
  1. Uses
  2. {$IFDEF UNIX}
  3.   CThreads,
  4. {$ENDIF}
  5.   Interfaces, DaemonApp, lazdaemonapp, daemonmapperc3scnpj, daemonc3scnpj,
  6.   indylaz, zcomponent
  7.   { add your units here };

My daemon has:
Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes, SysUtils, SyncObjs, IdSchedulerOfThreadPool, IdHTTPServer,
  3.   IdCustomHTTPServer, IdContext,  DaemonApp,
  4.   variants, ZConnection, ZDataset, ZDbcIntfs, ZCompatibility;

And my DaemonMapper:
Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes, SysUtils, DaemonApp;

And my Project Inspector is attached.

Can any Linux expert give me any suggestions, please?
« Last Edit: September 23, 2020, 10:52:44 pm by hrayon »

PascalDragon

  • Hero Member
  • *****
  • Posts: 2268
  • Compiler Developer
Re: Daemon requiring libgdk-x11-2.0.so.0
« Reply #1 on: September 23, 2020, 09:29:04 am »
Can any Linux expert give me any suggestions, please?

It might be the Indy components that pull in the visual code. You can either try to use the NoGUI widgetset or you need to find out which part of Indy pulls in the GUI code and adjust accordingly.

mig-31

  • Sr. Member
  • ****
  • Posts: 279
Re: Daemon requiring libgdk-x11-2.0.so.0
« Reply #2 on: September 23, 2020, 11:17:56 am »
"error while loading shared libraries: libgdk-x11-2.0.so.0: cannot open shared object file: No such file or directory"
I'm not a Linux expert, but this library is about graphical interface, right?
This is library of X Server, basic graphical interface. It is not full desktop GUI like KDE Plasma, Gnome. In case you want to GUI program on Linux server you also need some libraries of X Server.

As @PascalDragon mention "try to use the NoGUI widgetset", replace Indy with Synapse or Lnet.
Lazarus 2.0.6 - CentOS 7.x, Mageia 7.1

hrayon

  • Full Member
  • ***
  • Posts: 106
Re: Daemon requiring libgdk-x11-2.0.so.0
« Reply #3 on: September 23, 2020, 10:52:19 pm »
You all are right guys!
Using NoGUI widgetset solved the problem!
Thanks!

 

TinyPortal © 2005-2018