GTK+ hates me

I am very new to the linux environment. I have been interested in it for years but have just recently had the courage to pop that install disk into my PC. Because of it's ease of installation, I installed Mandrake 9.1 and I'm running KDE3.1 for my GUI. Right now I'm trying to conquer the world of building and installing software using the shell... I've read all the documentation and I think I'm understanding it correctly, but I'm having no luck.

Here's what's happening...
In order to install programs like GAIM and GIMP I have to have GTK+ and Glib installed (according to the error i recieved trying to install GAIM). I have downloaded and extracted the tar files for Glib, I ran ./configure, make, and make install and I didn't recieve any errors so I assumed that it installed correctly (all of this was done from the /usr/local/src directory with root btw). I then tried to install GTK+ and it tells me that I have to have GLIB installed!!! Which leads me to believe that I didn't install Glib correctly. So... I find myself sitting late at night staring at the shell dumbfounded. I'm sure i'm missing something that is obvious to users that have been running linux for longer than 4 days, so I would really appreciate it if somebody could point out what i'm doing wrong!

You can even point & laugh and call me names - i'm ok with it :wink: THANKS ALL!

GNOME and most GTK apps are well known to be tedious to compile properly. The gtk version of vim is the only GTK app that I can properly compile so far.

If you would like to experience compilation, KDE is okay though time consuming, and KDE apps usually compile good unless you miss a lot of really basic things.

Are you really sure the glib version shipped as of MK9.1 is out-of-date? MK9.1 is already the newest version so its glib should be very recent already!

In general, you may need to mess with the options of ./configure to have the configure script finds the installations properly. You can get a listing of options by ./configure --help. You can also see the list of shared libraries installed by

ldconfig -p

to confirm the required libraries needed by "configure" are installed and can be found.

Usually when I compile packages I use a few techniques like these when problems come. But if there are severe problems like missing GTK components, I would rather give up.

I sympathise, installing libraries needed to build an app can be a real headache.

some bits of advice to help you persevere

A common mistake is to install as root and then try compiling as a lower user. The components you want may not be readable. Check permissions and make sure all are world readable.

If you can get RPMs these make life very easy.

Use find to make sure all the libs are where they should be.

Lastly, dont be scared to look at the makefiles. These contain fairly obvious entries like

$foolibpath = /usr/lib/foo

which indicate to you where the script is expecting to find certain libraries.

Ocassionally makefiles for different systems (BSD, SysV, RedHat etc) mean you need to edit the makefile a bit to point it in the right direction.

Thanks you so much for your replies! At the time I took your advice and found an RPM and made my life a bit easier. Now I'm understanding the way linux's filesystem is structured a bit better, so I'm trying to build GTK-Gnutella (i can't find an rpm for it) and I'm running into the same kind of problem. I have tar'd the source files for the program into /usr/share/gtk-gnutella-0.92c . Every time I run ./configure in this directory I eventually get the following error:

Checking for gtk-config... no
checking for GTK - version >= 1.2.0... no
***The gtk-config script installed by GTK could not be found
***If GTK was installed in PREFIX, make sure PREFIX/bin is in your path, or set the GTK_CONFIG environment variable to the full path to gtk-config.

I have the following directories pertaining to gtk:
/etc/gtk
/etc/gtk-2.0
... however, I do not have a gtk-config or gtk_config file.

So... i have the following questions:
1 - isn't GTK required for KDE to run? I'm currently running 3.1!
2 - I've seen many references to "making sure something is on you PATH". In windows you can edit the path line and add what you want, is this pre-set in linux or is it configurible... or does it mean something altogether different?
3 - Is this software possibly written before gtk-2.0 and therefore doesn't know how to recognize it?

I'm really confused and frustrated... any help would be greatly appreciated! THANKS ALL!!!

No. GTK+ and KDE (strictly speaking kdelibs) are two different GUI toolkits. You may install either one of them, or both if you like. KDE apps don't use GTK+. Gnome does.

If you mean the PATH environment variable, yes. You may change that on the command line. However, you rarely have to change its content. If some programs complain it doesn't find some other program on PATH, very likely that program is not installed at all.

I don't use Mandrake so I don't know which package has the gtk-config executable. Possibly you have to get some ways to find out. I think you miss some development packages (possibly the RPM package name ends with "-dev") for GTK, which are possibly not installed by default.

From the log you quoted it seems like the program you are compiling uses GTK 1.2 (or perhaps compile with both 1.x and 2.x). You have to dive for the installation README or docs to find out for sure. If it requires certain libs and headers, install them.

KDE uses the Qt Toolkit.