LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Trouble Installing GTK (https://www.linuxquestions.org/questions/mandriva-30/trouble-installing-gtk-219009/)

The Oate 08-17-2004 08:37 PM

Trouble Installing GTK
 
I'm attempting to install GTK 2.4.0, but I get the following error when I run ./configure for it.

checking for glib-2.0 >= 2.4.0 atk >= 1.0.1 pango >= 1.4.0... Requested 'glib-2.0 >= 2.4.0' but version of GLib is 2.2.3

configure: error: Library requirements (glib-2.0 >= 2.4.0 atk >= 1.0.1 pango >= 1.4.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

I downloaded and installed GLib 2.4.6, so what do I need to do now? What is the PKG_CONFIG_PATH environment variable that it mentions?

Micro420 08-17-2004 09:33 PM

Have you tried going into the Mandrake Control Center and just installing it from there?
Or, install by using URPMI? it's guaranteed to work.

slyman 08-17-2004 09:41 PM

Re: Trouble Installing GTK
 
Quote:

I downloaded and installed GLib 2.4.6, so what do I need to do now?
Download and install atk and pango.

Quote:

What is the PKG_CONFIG_PATH environment variable that it mentions?
PKG_CONFIG_PATH is like a path variable for pkgconfig (*.pc) files, e.g.

export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig" etc etc

The Oate 08-17-2004 10:38 PM

Re: Re: Trouble Installing GTK
 
Quote:

Originally posted by slyman
Download and install atk and pango.
I don't see why I'd need to do this. The versions I have are current enough to work. How do I get GTK to see the newer version of GLib that I've installed?

slyman 08-18-2004 02:20 AM

Have you got the development packages installed?

You should have the following on your system somewhere, probably /usr/lib/pkgconfig or /usr/local/lib/pkgconfig:

atk.pc
pango*.pc
gdk*2.0.pc

Make sure the directory/directories where those files are is/are in your PKG_CONFIG_PATH variable.

The Oate 08-18-2004 09:36 AM

Quote:

Originally posted by slyman
Have you got the development packages installed?

You should have the following on your system somewhere, probably /usr/lib/pkgconfig or /usr/local/lib/pkgconfig:

atk.pc
pango*.pc
gdk*2.0.pc

Make sure the directory/directories where those files are is/are in your PKG_CONFIG_PATH variable.

How do I edit or even find the PKG_CONFIG_PATH variable?

slyman 08-18-2004 09:46 PM

To see it, you can either (the dollar at the begining $ is the prompt i.e. do not type the $. When # is used it means that you must be root).

Code:

$ set
Which will give you a list of all the variables.

Or

Code:

$ echo $PKG_CONFIG_PATH
Which will display just the PKG_CONFIG_PATH variable.

To set it use:
Code:

$ export PKG_CONFIG_PATH="..."
where ... = the path you want. Each entry in the path is seperated by a : (colon).

e.g.
Code:

$ export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig"
I would suggest that you find all the pkgconfig directories and put them in the PKG_CONFIG_PATH. You can find them with:
Code:

# find / -type d -name "pkgconfig"
But they are probably some or all of and maybe some more:

/usr/lib/pkgconfig
/usr/local/lib/pkgconfig
/usr/X11R6/lib/pkgconfig
/opt/pkgconfig

I would also suggest you put this in /etc/profile so the PKG_CONFIG_PATH is set in every shell. Just edit /etc/profile with a text editor (vi, vim, nano etc) and add the line:
Code:

export PKG_CONFIG_PATH="..."
(where ... = the path you want).

Louis_Carole 08-19-2004 04:09 PM

Dear All,

I'm having quite the same problem. PKG_CONFIG_PATH is defined, I installed glib-2.4.6 moments before, and indeed glib-2.0.pc is in both /usr/lib/pkgconfig and /usr/local/lib/config. However, the one in /usr... cats "Version: 2.2.3" while the one in /usr/local... cats "Version: 2.4.6".

Three things I thought of that I could try:

./configure --prefix=/usr # Do this, then make and make install, to glib-2.4.6 to reinstall

OR

cp /usr/local/lib/pkgconfig/glib-2.0.pc /usr/lib/pkgconfig/glib-2.0.pc # Write over the old pc

OR

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
# This switches the path order I have now

Wish me luck!

- Ben

Louis_Carole 08-19-2004 04:12 PM

Dear All,

Oh! A fourth idea. On my LFS partition I made /usr/local a symlink to /usr :)

The Oate 08-20-2004 12:27 PM

Quote:

Originally posted by slyman
To see it, you can either (the dollar at the begining $ is the prompt i.e. do not type the $. When # is used it means that you must be root).

Code:

$ set
Which will give you a list of all the variables.

Or

Code:

$ echo $PKG_CONFIG_PATH
Which will display just the PKG_CONFIG_PATH variable.

To set it use:
Code:

$ export PKG_CONFIG_PATH="..."
where ... = the path you want. Each entry in the path is seperated by a : (colon).

e.g.
Code:

$ export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig"
I would suggest that you find all the pkgconfig directories and put them in the PKG_CONFIG_PATH. You can find them with:
Code:

# find / -type d -name "pkgconfig"
But they are probably some or all of and maybe some more:

/usr/lib/pkgconfig
/usr/local/lib/pkgconfig
/usr/X11R6/lib/pkgconfig
/opt/pkgconfig

I would also suggest you put this in /etc/profile so the PKG_CONFIG_PATH is set in every shell. Just edit /etc/profile with a text editor (vi, vim, nano etc) and add the line:
Code:

export PKG_CONFIG_PATH="..."
(where ... = the path you want).

I tried doing what you suggested, but I still receive the exact same error. I didn't have a PKG_CONFIG_PATH variable, so I created one as you said. Even after doing this, I still had the problem. Is there not some easier way to get GLib 2.4.6 recognized?

slyman 08-21-2004 09:36 AM

Have you got the correct versions of atk and pango installed (and their .pc files are in PKG_CONFIG_PATH)?

The Oate 08-21-2004 11:18 AM

I thought that I did, but could you tell me how I would find out if I have them installed and if I do, what version I currently have?

slyman 08-23-2004 02:07 AM

Find the files atk.pc and pango.pc - they are probably in /usr/lib/pkgconfig or /usr/local/lib/pkgconfig and cat them:

e.g.

Code:

# cat atk.pc
There should be something like:

Code:

Name: Atk
Description: Accessibility Toolkit
Version: 1.6.1
Requires: gobject-2.0 gmodule-2.0

in both of them. Copy and paste them up here.

Also, there should be a few pango*.pc files in the pkgconfig directories. Posty their names up here too.

The Oate 08-24-2004 04:46 PM

Ok, I had made a mistake previously. I did not have ATK or Pango either. I downloaded ATK and installed it with no problems. However, I downloaed Pango 1.4.1 and I can't get it to complete the ./configure run because it says I don't have a version of glib that it wants. The version it's looking for is 2.4.0 and I have 2.4.6 installed. Is it a problem that I have a newer version than what it wants installed? And if not, what do I need to do so I can get Pango installed and subsequently finish installing my other things?

Here's what I get when I run ./configure. I left off some of the earlier stuff. I can post it too if it'd be helpful.

checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for pkg-config... /usr/bin/pkg-config
checking for fontconfig >= 1.0.1... yes
checking FONTCONFIG_CFLAGS...
checking FONTCONFIG_LIBS... -lfontconfig
checking for freetype-config... /usr/bin/freetype-config
checking for FT_Get_Next_Char in -lfreetype... yes
checking for xft >= 2.0.0... yes
checking XFT_CFLAGS... -I/usr/X11R6/include -I/usr/include/freetype2
checking XFT_LIBS... -L/usr/X11R6/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.4.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** Glib 2.4.0 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.

acid_kewpie 08-24-2004 05:27 PM

ou can easily replicate what's going on inside the configure script. Just do this:
Code:

kermit root # pkg-config glib-2.0 --modversion
2.4.1

i would expect you are probably getting a check output more like
Code:

kermit root # pkg-config glibpants-2.0 --modversion
Package glibpants-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glibpants-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glibpants-2.0' found

in which case install the -devel rpm for glib-2.0.


All times are GMT -5. The time now is 12:20 AM.