Forum > LCL

GTK2Int of package LCL does not find xlib.

(1/4) > >>

ermeneuta:
Newcomer here to Lazarus. Installed 3.0RC1 with fpc 3.2.2
Just to test the installation, I wrote a very simple application with a just a button and a text field, nothing more.
Trying to build it, I am greeted with this error message :

gtk2int.pas(37,6) Fatal: Cannot find xlib used by Gtk2Int of package LCL.

As said, I am a newcomer to Lazarus, so I am in search of help...Thanks

Fred

ermeneuta:
To complete the info above, the computer is the RADXA Rock 5A board, with the ARM RK3588s CPU, and the os is the Debian 11 customized for this board.

TRon:

--- Quote from: ermeneuta on August 20, 2023, 03:33:33 pm ---Newcomer here to Lazarus. Installed 3.0RC1 with fpc 3.2.2

--- End quote ---
Hello and welcome. Also a newcomer at Linux ?

Dependencies for deployment (also means for development as minimum). Depending on our Linux distribution and if you distribution support it : install the "-dev" packages.

For packages required for building lazarus, see https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_Linux#Required_Linux_packages

ermeneuta:
Yes, newcomer also to Linux... could you please elaborate a bit more about the -dev packages to be installed ? Thanks

Fred

TRon:

--- Quote from: ermeneuta on August 20, 2023, 03:42:47 pm ---Yes, newcomer also to Linux... could you please elaborate a bit more about the -dev packages to be installed ? Thanks

--- End quote ---
Sure. I see you mentioned running debian so that is -dev territory  :)

I usually use apt to install software. So whenever you see something like a dependency named "libpango-1.0-0" then you can do "apt search libpango.*" from a terminal window. for me that displays:

--- Code: ---Sorting... Done
Full Text Search... Done
libpango1.0-dev/stable,now 1.50.12+ds-1 amd64 [installed]
  Development files for the Pango

libpangomm-1.4-dev/stable 2.46.3-1 amd64
  C++ Wrapper for pango (development files)

libpangomm-2.48-dev/stable 2.50.1-2 amd64
  C++ Wrapper for pango (development files)

--- End code ---

Which tells me that the dev package is already installed. Would none of the libpango files be installed then you can issue a "apt-get install libpango1.0-dev" and it will install the correct library + dev package for you. if it is only missing the -dev package then it will install only the dev package.

for answering in more detail about what -dev packages are there are people that do a better job, see for exampe https://stackoverflow.com/questions/1157192/what-do-the-dev-packages-in-the-linux-package-repositories-actually-contain

The development files (headers) itself are not interesting for us but the dev package also takes care for making sure that the correct version of the library is linked in your programs (when you compile them). Otherwise you would have to do that manually.

So either your libx is not installed at all (is a bit problematic if you are seeing a desktop in front of you (unless not using x)  :D ) or it is missing the -dev package and tries to find a specific version for libx and is unable to link it in (which is probably the cause for the error you are receiving).

Hopefully that is enough to get you started, if not he case then please let us know.

PS: as per example you can also use "apt list libpango\*" in a terminal to list all file starting with libpango, which includes all the different version numbers and other libpango named files (including their dev variant). It is preferable over "apt search libpango" as f.e. that will also list bindings for other languages which we usually do not care about.

Navigation

[0] Message Index

[#] Next page

Go to full version