No .pc file for libgail when trying to build Caja

Not sure if this goes here or under development, but it is part of a topic related to using extensions from a user point of view so, I will include it here.

I am trying to build Caja, so I can better understand the python extensions interface. I am running into difficulties with libgail-3-0 in that it does not seem to install a .pc (project configuration) file. The install script recommends that I set an env var, but I think that is to just point to a .pc file. Some Internet research claims that constructing my own .pc file is fraught with potential issues, and that something likely went wrong with the installation since the install script is clearly expecting there to be a .pc file, and that one should focus on the install itself (re-install, and so on, which I tried to no avail).

Next, I tried just deleting the check from autogen.sh hoping that since it was installed all would go well, but I must have also deleted the setup necessary to find libgail.

Does Caja build out-of-the-box for others? If so, please help me discover what is wrong with my setup or the way I am building it. Thanks!

So I just tried installing all the gail packages with -dev appended to them. I could not find a libgail-3-0-dev, but I did find a libgail-dev which did have a .pc file. So I tried copying that gail.pc file to gail-3-0.pc (and making the obvious edits), and it did pass the checks, but I am getting many errors in compilation which might be related to my hacked .pc file:

/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
547 | struct _GTimeVal
| ^~~~~~~~~
In file included from eel-gtk-extensions.h:32,
from eel-art-gtk-extensions.h:38,
from eel-art-gtk-extensions.c:27:
eel-gdk-extensions.h:100:61: error: unknown type name ‘GdkRGBA’; did you mean ‘GdkGC’?
100 | void eel_gdk_rgba_parse_with_white_default (GdkRGBA *parsed_color,
| ^~~~~~~
| GdkGC
eel-gdk-extensions.h:106:67: error: unknown type name ‘GdkRGBA’
106 | guint32 eel_gdk_rgba_to_rgb (const GdkRGBA *color);
| ^~~~~~~
eel-gdk-extensions.h:107:1: error: unknown type name ‘GdkRGBA’; did you mean ‘GdkGC’?

As always, any hand-holding is very much appreciated! Thanks!

OK, so I thought maybe it would be easier to build Nautilus on Ubuntu as a first step. So I tried this:

sudo apt-get install fakeroot build-essential dpkg-dev gnome-core-devel
sudo apt-get build-dep nautilus

mkdir nautilus-ubuntu && cd nautilus-ubuntu
apt-get source nautilus
dpkg-source -x nautilus_3.2.1-0ubuntu3.2.dsc
cd nautilus-3.2.1/

edit src/nautilus-places-sidebar.c

dpkg-buildpackage -rfakeroot -us -uc -nc -b
sudo dpkg -i ../nautilus_3.2.1-0ubuntu3.2_amd64.deb
killall nautilus

Which I found from a build nautilus search. I got the same error as some other poor sap: no gnome-core-devel. Maybe there are better suggestions on github or wherever nautilus is hosted. I guess I could also try building the gnome tools and see where that leads. lalalalala.

NorbertX was able to solve the issues I had building Caja. Here is a recap of what he suggested, which worked:

You should enable Source Code repositories in Software & Updates (software-properties-gtk) and then get all the build dependencies for Caja using below commands:

sudo apt-get update
sudo apt-get build-dep caja

I also recommend to hack Caja version which is shipped with your Ubuntu MATE version. So you can run

apt-get source caja

and then play with it or even make a deb-package of it. VM snapshots will allow you to play without problems.

Regarding search of relevant .pc files or any other you can use package contents search on https://packages.ubuntu.com . Exact search results for gail-3.0.pc is here