user132797
user132797

Reputation: 359

why is the install procedure for gtk+ so complicated?

I am trying to install gtk+ (3.20.3) on ubuntu 14.04. I downloaded the gtk + package & ran the configure command. I got

Requested 'atk >= 2.15.1' but version of Atk is 2.10.0

Requested 'pango >= 1.37.3' but version of Pango is 1.36.3

Requested 'cairo >= 1.14.0' but version of cairo is 1.13.1

Requested 'cairo-gobject >= 1.14.0' but version of cairo-gobject is 1.13.1

I also got the above version mismatch error for glib which I installed & after installing some other pre-requisites it asked for.

I am now recursively stuck in installing each one of the above, each asks something else. For ATK I get some error like "../atk/.libs/libatk-1.0.so: undefined reference to `g_type_check_instance_is_fundamentally_a'", whcih I have to try and solve.

The question why is it so complicated ? AM I doing something wrong? Is there no step like "apt-get install gtk" or something like that. I have spent more than 2 hours and nowhere near completion.

I just wanted gtk+ installed as I needed a simple UI for a certain C program. I did not realize installation will be so difficult.

Upvotes: 1

Views: 998

Answers (2)

ebassi
ebassi

Reputation: 8815

The procedure for build GTK+ from source is not any more complicated than the procedure for building other projects. GTK+ has various dependencies, instead of bundling everything into its own repositories; this means that you need to check the list of dependencies (as specified inside the configure.ac file) and install or build them.

If you want to set up a development environment the suggestion is to use jhbuild, which is similar to virtualenv for Python. The jhbuild command knows all the dependencies needed to build various projects in the GNOME platform, including GTK+, and will download, build, and install those dependencies in a separate prefix, allowing you to build your own code in that prefix as well.

You can get quickly started with jhbuild by reading the GNOME Newcomers guide.

Upvotes: 1

Blake
Blake

Reputation: 368

@ebassi is correct assuming you need a newer version of GTK+, or want to develop GTK+ itself. If all you want is to write a GTK application, and aren't picky about the version, check out the Ubuntu package libgtk-3-dev.

Upvotes: 5

Related Questions