LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-18-2004, 04:48 AM   #1
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Rep: Reputation: 15
Glib & GTK+ versions 1.2.10 & 2.4.0


Ok I have been trying to install some programs. Some require version 1.2.10 and others require 2.4.0 of Glib. Now what is the difference ? Can these to versions exists happily installed together.

Now GTK+-1.2.10 installs perfectly after installing Glib-1.2.10. When trying to install GTK+-2.4.0 it claims that it cannot find Glib-2.4.0 and suggests some thing about pkg_config_path environment variable. I know that GTK+-2.4.0 requires ATK and pango to install but these both have the same problem when trying to configure them... ie: cant find glib-2.4.0 with the same pkg_config_path environment variable.

So could someone please point out how I can go about getting GTK, ATK and Pango to find Glib?
 
Old 06-18-2004, 05:55 AM   #2
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
The difference is that they are incompatible - a program that needs v1 cannot work with v2 and vice-versa. Fortunately they can both be installed simulataneously.

You can get ATK, Pango and the rest from gtk.org
 
Old 06-18-2004, 07:20 AM   #3
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
ok thats fine but i still have the following problem with version 2.4.0:

Quote:
Now GTK+-1.2.10 installs perfectly after installing Glib-1.2.10. When trying to install GTK+-2.4.0 it claims that it cannot find Glib-2.4.0 and suggests some thing about pkg_config_path environment variable. I know that GTK+-2.4.0 requires ATK and pango to install but these both have the same problem when trying to configure them... ie: cant find glib-2.4.0 with the same pkg_config_path environment variable.
Here is the error from Pango, ATK and GTK+ configures:

Code:
GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
As I said above is that I have installed it, restarted and all...

Last edited by RaVilj; 06-18-2004 at 07:31 AM.
 
Old 06-18-2004, 01:20 PM   #4
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Anyone?
 
Old 06-18-2004, 02:51 PM   #5
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
You have installed glib-1.2 libraries, but have you installed the glib-2.x libraries?
 
Old 06-18-2004, 03:20 PM   #6
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
The full description...

Ok so now I am trying to install a program(s) that require GLib-2.2.0 >= and GTK
+-2.2.0 >=. I have the following:

- glib-2.4.0
- gtk+-2.4.0
- pango-1.4.0
- atk-1.6.0

Now I successfully installed glib-2.4.0 without any errors or warnings of (./con
figure -> make -> make install). Next I figured I'd install GTK+-2.4.0 same as a
bove (./configure -> ) but it configure gave the following errors:

Code:
checking for pkg-config... /usr/bin/pkg-config
checking for glib-2.0 >= 2.4.0    atk >= 1.0.1    pango >= 1.4.0... Package glib
-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

configure: error: Library requirements (glib-2.0 >= 2.4.0    atk >= 1.0.1    pan
go >= 1.4.0) not met; consider adjusting the PKG_CONFIG_PATH environment variabl
e if your libraries are in a nonstandard prefix so pkg-config can find them.
[root( at )localhost gtk+-2.4.0]#
The ATK and Pango errors are fine since I haven't installed them yet (didnt know
bout them until it complained). The problem is the error regarding not being ab
le to find glib. So off to trying to install ATK (./configure -> ) It gave the f
ollowing error:

Code:
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0... no
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
[root( at )localhost atk-1.6.0]#
Same glib error, so now off to try pango (./configure -> ) and same error:

Code:
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/.
[root( at )localhost pango-1.4.0]#
So now why arent they seeing the installation of glib, secondly what/where is
this environment variable PKG_CONFIG_PATH found.


Now glib-1.2.10 installed its *.pc files to /usr/lib/pkgconfig where glib-2.4.0
installed its *.pc files to /usr/local/lib/pkgconfig. So heck I decided to copy
glib-2.4.0's *.pc files to /usr/lib/pkgconfig and see what would happen...

Code:
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0... 
*** 'pkg-config --modversion glib-2.0' returned 2.4.0, but GLIB (2.2.1)
*** 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
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
[root( at )localhost atk-1.6.0]#
So now what...HELP! Oh I am running Redhat 9.0, Kernel: Linux 2.4.20-8smp. Um 2.
6.0 is in the download. Not sure what else would be usefull. All of the above wa
s run as root.

Last edited by RaVilj; 06-18-2004 at 03:47 PM.
 
Old 06-18-2004, 04:14 PM   #7
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
My guess is that since you are compiling from source, it is checking for the glib-2 development libraries. You will need to install it if you don't have it.

Last edited by comp12345; 06-18-2004 at 04:37 PM.
 
Old 06-18-2004, 04:38 PM   #8
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Any ideas on how to fix this problem?
 
Old 06-18-2004, 04:41 PM   #9
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks sorry didnt see your edit...

Ok found some info on it:
http://developer.gnome.org/doc/API/2...-building.html
Quote:
If you don't have permission to write to the directory you are installing in, you may have to change to root temporarily before running make install. Also, if you are installing in a system directory, on some systems (such as Linux), you will need to run ldconfig after make install so that the newly installed libraries will be found.

Several environment variables are useful to pass to set before running configure. CPPFLAGS contains options to pass to the C compiler, and is used to tell the compiler where to look for include files. The LDFLAGS variable is used in a similar fashion for the linker. Finally the PKG_CONFIG_PATH environment variable contains a search path that pkg-config (see below) uses when looking for for file describing how to compile programs using different libraries. If you were installing GTK+ and it's dependencies into /opt/gtk, you might want to set these variables as:

Code:
      CPPFLAGS="-I/opt/gtk/include"
      LDFLAGS="-L/opt/gtk/lib"
      PKG_CONFIG_PATH="/opt/gtk/lib/pkgconfig"
      export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
You may also need to set the LD_LIBRARY_PATH environment variable so the systems dynamic linker can find the newly installed libraries, and the PATH environment program so that utility binaries installed by the various libraries will be found.

Code:
      LD_LIBRARY_PATH="/opt/gtk/lib"
      PATH="/opt/gtk/bin:$PATH"
      export LD_LIBRARY_PATH PATH

Last edited by RaVilj; 06-18-2004 at 05:03 PM.
 
Old 06-18-2004, 05:30 PM   #10
RaVilj
LQ Newbie
 
Registered: Jun 2003
Location: South Africa
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Ha solved it! By:
Code:
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH LD_CONFIG_PATH
under root. Ran the ./configures for pango and atk and all sorted! w00t!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
glib & gtk old versions? grayFalcon Linux - Newbie 6 04-27-2005 04:23 PM
glib & gtk headers Donald1000 Solaris / OpenSolaris 1 06-08-2003 12:19 PM
Installing GTK+-2.0.6 & GLIB-2.0.6 Kryptow Linux - Newbie 5 09-06-2002 08:33 AM
missing gtk & glib - config elite Linux - Newbie 2 04-12-2002 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration