LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   glib and gtk issues (https://www.linuxquestions.org/questions/linux-software-2/glib-and-gtk-issues-626713/)

Yawgm0th 03-08-2008 10:29 PM

glib and gtk issues
 
I'm trying to install gtk++ 2.12.16. I successfully installed Pango, and glib-2.14.5 seemed to install correctly, but when I try to ./configure gtk, it comes up with this:

Code:

*** 'pkg-config --modversion glib-2.0' returned 2.14.5, but GLIB (2.12.12)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no

After much searching and trying various things, I've finally given up. It seems lots of people have the same error on different versions when trying to update. I've seen all sorts of different solutions that so far, haven't worked or haven't been applicable for me. I haven't been able to figure out how to use ldconfig for this purpose or how to edit the environmental variable for this purpose. Other threads do seem to indicate ldconfig is the way to solve the problem.

Perhaps someone can point me in the right direction on this or tell me what to do? Ideally, I'd like to learn as much as possible in this process. Actually knowing what I did wrong, if anything, and why the solution is the solution, would be ideal.

I'm on slackware 12.0, which I installed earlier today.

Note: The whole reason I'm updating is because when trying to use zenmap (the GUI version of nmap) I get dependency errors indicating the version of GTK I have installed it too old.

berbae 03-09-2008 11:55 AM

Hi Yawgm0th
I presume you searched first for newer versions of GLib, Pango and gtk+ at a Slackware repository site. As I don't use the Slackware distro, I don't know if they provide upgrades/updates for their packages.
If it's not the case and you definitely have to compile yourselves the newer versions, some precisions about exactly what you've done are necessary.
Quote:

I successfully installed Pango, and glib-2.14.5 seemed to install correctly
1) Can you precise the old versions of GLib, Pango and gtk+ already installed on your machine ? and exactly the new ones you want to install ?
Because as far as I can see, the last stable gtk+ release is 2.12.8, for pango it should be 1.18.4, and for glib 2.14.6 . Take care to choose stable versions not development releases.
Can you tell also if you want to replace the old versions with the new ones or if you want to keep the old ones in place ?

2) Can you precise where you installed pango and glib ?
You can tell the options you gave to the configure script for each of them.

3) Can you give the results of the commands, logged in as the user when you tried to compile gtk+ (should not be root) :
echo $LD_LIBRARY_PATH
cat /etc/ld.so.conf
echo $PKG_CONFIG_PATH

Quote:

Other threads do seem to indicate ldconfig is the way to solve the problem.
But you must first have the right paths in /etc/ld.so.conf .
And for the configure script to find and use the right versions, you need to have the right paths in the PKG_CONFIG_PATH variable.
All these precisions are necessary to find a good solution to what you want to get.

Yawgm0th 03-09-2008 01:53 PM

Quote:

Originally Posted by berbae (Post 3083115)
Hi Yawgm0th
I presume you searched first for newer versions of GLib, Pango and gtk+ at a Slackware repository site. As I don't use the Slackware distro, I don't know if they provide upgrades/updates for their packages.
If it's not the case and you definitely have to compile yourselves the newer versions, some precisions about exactly what you've done are necessary.

I got Glib, Pango, and GTK+ from the GTK site. I had grabbed GLib 2.14.5 and GTK+ 2.12.6 from their FTP site. I successfully did ./configure, followed by make and make install on Pango. I did the same on GLib. The INSTALL and README documentation didn't indicate I should need to do anything else.


Quote:

Originally Posted by berbae (Post 3083115)
1) Can you precise the old versions of GLib, Pango and gtk+ already installed on your machine ? and exactly the new ones you want to install ?
Because as far as I can see, the last stable gtk+ release is 2.12.8, for pango it should be 1.18.4, and for glib 2.14.6 . Take care to choose stable versions not development releases.
Can you tell also if you want to replace the old versions with the new ones or if you want to keep the old ones in place ?

I guess I want to replace the old ones. Given the error message, I'd assume I need to.

Quote:

Originally Posted by berbae (Post 3083115)
2) Can you precise where you installed pango and glib ?
You can tell the options you gave to the configure script for each of them.

How do I determine this? I didn't manually set any options. I just went with what the configure script had to start with, so I don't know where it installed.

Quote:

Originally Posted by berbae (Post 3083115)
3) Can you give the results of the commands, logged in as the user when you tried to compile gtk+ (should not be root) :
echo $LD_LIBRARY_PATH
cat /etc/ld.so.conf
echo $PKG_CONFIG_PATH

The first command gives me nothing.
The second gives me:
Code:

/usr/local/lib
/usr/i486-slackware-linux/lib
/usr/lib/qt/lib
/usr/lib/seamonkey

The third gives me:
Code:

/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

berbae 03-09-2008 05:01 PM

1) You didn't say the pango version but I presume it is the last one from the gtk+ site. There is a newer gtk+ release, but it's not available at the gtk+ site, which is not very up to date.
You will find better updated source tarballs at the GNOME site.
2) In the INSTALL file you can read :
Quote:

By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
As you didn't give any option to the configure scripts, pango and glib were installed in the /usr/local directory tree. So your old versions were not overwritten.
But I think this can be good enough presently, because in that way you don't risk to mess up your original installation, which stays intact.
So this can stay like that presently.
3) As I can see, you seem to have the good paths in the /etc/ld.so.conf file and the PKG_CONFIG_PATH variable.
So what you can do now is first read 'man ldconfig' and run it without any argument, under root login. You can read also the output of './configure --help'.
Then you can try to configure/compile/install gtk+ again without changing anything of what you've done before.
You didn't say if you were logged in as a user or as root, but it is recommended not to be root to run the configure script and the 'make' command, but only to install the compiled program with the 'make install' command.
After that you have to run the 'ldconfig' command for a new package with shared libraries in it.

Normally that should work and you will be able to compile the zenmap package you want to use.


All times are GMT -5. The time now is 10:40 AM.