Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a MDK10 system, and I love to compile apps. So I compiled my kernel (atm 2.6.9), my apps and a few days ago I decided to compile GTK+ myself (wanted the new GAIM, and decided not to get an RPM) . Therefore I need the following things:
-ATK
-GLIB
-Pango
Note: I've got gtk+ version 2.4.13
ATK compiled without any problems, and Pango needed the new GLIB (I got 2.4.7 from gtk.org).
So I've build GLIB:
./configure
make
(as root) make install
Afterwards, I tried to compile Pango:
Code:
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 fo
*** exact error that occured. This usually means GLIB is incorrectly insta
configure: error:
*** Glib 2.4.0 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.
Well, it should be no surprise to hear that I've decided that Glib isn't recognized correctly (in other words: the old GLIB is use
d instead of the new one).
I tried:
/sbin/ldconfig , which didn't work either
I also set some environment variables, although I do not remember exactly which ones , so this is the output of 'env'
first don't confuse glib with glibc !!!!
ok on to glib
look in th directory /usr/lib/pkgconfig
in there is there a file glib-2.0.pc
if so run
pkg-config --modversion glib-2.0.pc
and see what you get
now go to /usr/local/lib/pkgconfig
see there if you don't also have a file glib-2.0.pc ??
if so do
pkg-config --modversion glib-2.0.pc
and see what you get
now if you have two of these files they are in conflict
if both directories are in the shell variable
PKG_CONFIG_PATH
(you don't seem to have a variable PKG_CONFIG_PATH ??? that's a problem)
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
will fix you
by default pkg-config will only look at /prefix/lib/pkgconfig where prefix is it's own install prefix
so you just have to manipulate these files and they point to what version to configure against
rename the old one or something and keep it around if you need it later.
Ok, there is indeed (as you suggested) a discrepancy between those files. And I've exported the environment variable. However:
Quote:
so you just have to manipulate these files and they point to what version to configure against
rename the old one or something and keep it around if you need it later.
I've copied the file which indicated 2.4.7 to the location of the 2.2.3 and replaced the lather one. After that I did (as root): export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
When I run the pango configure:
Code:
checking for GLIB - version >= 2.4.0...
*** 'pkg-config --modversion glib-2.0' returned 2.4.7, but GLIB (2.2.3)
*** 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.4.0 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.
it is possible for a package to use pkgconfig differently
and use linker flags to make sure it links to the correct lib with the path included in the executable
but since that's not happening
this is kind of tricky but worth a try
you don't want to mess with the glib library in /usr/lib/libglib-2.0.so.0.200.3
lots of stuff on your system needs it
but in there with it is a link libglib-2.0.so and it can point to the newer version
but after you are done put it back to pointing to libglib-2.0.so.0.200.3 again
ln -s <target> <linkname> (make sure you don't type the target linkname in the reverse order)
after you change the link it will configure and compile
i think at this point configure this with a strange prefix like "./configure --prefix=/opt/newgaim"
then after you install it fix the /usr/lib link back and i think fix the old .pc file back as well
now you kind of don't want your system finding the newer glib library but you need the newer programm to find it. so i think the safest thing is to just move the new libglib (the one in /usr/local/lib) and it's links
to the new gaim folder /opt/newgaim/bin ?? put it in the same folder as the executable wherever that is
and it should load from there....
if it doesn't load just add a dot "." to LD_LIBRARY_PATH at the start like
export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
Note1: do you know a nice reference about this stuff? (preferably on the internet)
Note2: is the new glib incompatible with the old one; do I have to move the symlinks back to their normal state?
I hope this post isn't too offtopic, but I was just trying to compile GAIM and I've encountered the same problem but instead of GLIB, GTK+ was missing.
So I've looked for gtk*.pc and gtk*.so using (s)locate, but I wasn't able to find them. I've also added the GTK path to my env variables.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.