Recent

Author Topic: [SOLVED] Can't find unit Cairo used by gdk2  (Read 13595 times)

JD

  • Hero Member
  • *****
  • Posts: 1802
[SOLVED] Can't find unit Cairo used by gdk2
« on: September 24, 2011, 01:44:00 am »
Hi there everyone,

I have a new Linux Mint 11 installation on which I just installed Lazarus 0.9.31 of August 2, 2011 (SVN version number does not show in Linux versions of Lazarus - see the attachment; but it is svn 31847 in the windows version).

After installation, I can't even run an empty project because it says it can't find the Cairo unit used by gdk2. The exact error as well as the line on which the error occurred is as follows:
Quote
/usr/share/fpcsrc/2.4.4/packages/gtk2/src/gtk+/gdk/gdk2.pas(32,13) Fatal: Can't find unit Cairo used by gdk2

I have the same Lazarus version installed in Ubuntu 11.04 and I did not get this error so it must have something to do with my Linux Mint setup.

What do I do to correct it? Thanks for your assistance.

JD
« Last Edit: September 26, 2011, 01:45:19 am by JD »
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Can't find unit Cairo used by gdk2
« Reply #1 on: September 25, 2011, 01:44:27 pm »
Strange, it looks as if it is trying to compile gtk2 ... did you do anything unusual with your cfg.fpc (or is it fpc.cfg?)? How did you install fpc?

JD

  • Hero Member
  • *****
  • Posts: 1802
Re: Can't find unit Cairo used by gdk2
« Reply #2 on: September 25, 2011, 05:41:22 pm »
I did not do anything at all to the configuration files. I just followed the instructions below

Quote
Install fpc
1) download FPC
2) unpack, and go to unpacked directory
3) sudo dpkg -i * (this will install all debs)

Install Lazarus
1) download Lazarus svn
2) unpack, and go to unpacked directory
3) sudo dpkg -i * (this will install all debs)

I installed the same version of Lazarus on Ubuntu 11.04 and I did not have this problem.  :(
« Last Edit: September 25, 2011, 06:16:16 pm by JD »
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

Fred vS

  • Hero Member
  • *****
  • Posts: 1983
    • StrumPract is the musicians best friend
Re: Can't find unit Cairo used by gdk2
« Reply #3 on: September 25, 2011, 06:27:02 pm »
Hello.
After install FPC and Lazarus, try in Terminal  :
Code: [Select]
sudo apt-get install -f
« Last Edit: September 25, 2011, 07:54:07 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

JD

  • Hero Member
  • *****
  • Posts: 1802
Re: Can't find unit Cairo used by gdk2
« Reply #4 on: September 25, 2011, 08:01:23 pm »
Hello.
After install FPC and Lazarus, try in Terminal  :
Code: [Select]
sudo apt-get install -f

Dosen't work.
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

Rails

  • Guest
Re: Can't find unit Cairo used by gdk2
« Reply #5 on: September 25, 2011, 08:09:06 pm »
What version of FPC do you have installed?



JD

  • Hero Member
  • *****
  • Posts: 1802
Re: Can't find unit Cairo used by gdk2
« Reply #6 on: September 25, 2011, 08:43:08 pm »
What version of FPC do you have installed?

Same version on all my systems; XP, Vista and Ubuntu 11.04

It is FPC 2.4.4 and Lazarus 0.9.31 svn 31847. It works perfectly in all the systems above. I don't know why it is not working with Linux Mint 11 Katya.
« Last Edit: September 25, 2011, 11:40:58 pm by JD »
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

JD

  • Hero Member
  • *****
  • Posts: 1802
Re: Can't find unit Cairo used by gdk2
« Reply #7 on: September 26, 2011, 12:52:59 am »
I've been sniffing around my system and I see that Synaptic lists 3 Free Pascal packages as broken. They are

a) fp-units-gfx-2.4.4
b) fp-units-gtx-2.4.4
c) fp-units-multimedia-2.4.4

These packages were not installed with the rest of Free Pascal 2.4.4 in the file fpc-2.4.4-1.i386.deb.tar

I have no idea why this is the case.  :(

The screenshot of my Terminal (sorry, it's in French  :-[) after installation of Free Pascal 2.4.4 shows the errors.
« Last Edit: September 26, 2011, 01:01:59 am by JD »
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

JD

  • Hero Member
  • *****
  • Posts: 1802
Re: Can't find unit Cairo used by gdk2
« Reply #8 on: September 26, 2011, 01:44:49 am »
Solved it! If at first you don't succeed, keep trying......  :D

Since I discovered that the problem was the broken packages, I did this in the terminal window
Quote
sudo apt-get update
sudo apt-get install -f
I then reinstalled Free Pascal 2.4.4 and Lazarus was now able to compile an empty project.  ;)

I must say it was worth the trouble. Lazarus looks beautiful in Linux.  O:-)

@Fred vS thanks for the hint.

To everyone else, thanks for the comments and thanks for reading this thread.
« Last Edit: September 26, 2011, 01:53:22 am by JD »
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

 

TinyPortal © 2005-2018