LinuxQuestions.org
Visit Jeremy's Blog.
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 03-23-2006, 11:21 AM   #1
sivart
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Rep: Reputation: 0
Question glib version missmatch. trying to install gtk+


Hi all,
Here is the background to my story, its been a long few days i can tell you...

I am trying to learn OpenGL for a project i am working on, and i have bought this book, "Linux 3D Graphics Programming". It comes with a CD with Debian 2.2 on it and some sample programs etc.

The things on the CD that the book tells me i need on my linux installation are:

glib-1.2.8
gtk+-1.2.8
libsigc++-1.0.1
gtkmm-1.2.1
rplay-3.2.0b5

yup, these are all pretty old versions cos the book came out in 2001. i tried installing these on my laptop installation of RedHat Enterprise Workstation, but they would have dependences or somethin stupid. And im guessing because these libraries weren't installed properly, the programs wouldnt compile

so i gave up on the laptop, and tried installing the Debian onto a clean machine, so i could do it all in the environment the author intended. well to cut a long story short, after all the hassle's of the debian installer interface, it wouldn't install for some unknown reason. So now i've installed a fresh copy of RHES (not newest version (V3 U5)). I downloaded all of the newest versions of the above packages. glib-2.8.6 installed without a problem. then when i go to install gtk+-2.8.9 it comes up with this error in the ./configure stage:

checking for BASE_DEPENDENCIES... Requested 'glib-2.0 >= 2.7.1' but version of GLib is 2.2.3
configure: error: Package requirements (glib-2.0 >= 2.7.1 atk >= 1.0.1 pango >= 1.9.0 cairo >= 0.9.2) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively you may set the BASE_DEPENDENCIES_CFLAGS and BASE_DEPENDENCIES_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.

now i dont really understand how libraries work in linux. Where they install, how they are recognised by other programs/installers... i just dont know. so since i have installed a newer version of glib than requested in the error, how come it has not recognised that?

so any help from anyone would be very much appreciated. I've been tearing my hair out over multiple problems with this. all i want is to be able to learn OpenGL and compile things without a problem. *sigh*

thanks in advance
 
Old 03-23-2006, 05:01 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
So now i've installed a fresh copy of RHES (not newest version (V3 U5)). I downloaded all of the newest versions of the above packages. glib-2.8.6 installed without a problem. then when i go to install gtk+-2.8.9 it comes up with this error in the ./configure stage:
For any RHEL or RH-alike systems I would suggest not compiling from scratch (especially base libs like Glibc and GTK) unless the packages are not in any RH mirror or other repo. If you compile I'd suggest always turning it into an rpm and installing that. Keeps the system a wee bit more manageable.


configure: error: Package requirements (glib-2.0 >= 2.7.1 atk >= 1.0.1 pango >= 1.9.0 cairo >= 0.9.2) were not met.
OK. You should be able to find Atk and Pango as rpm's. DAG has an rpm for Cairo but that's 0.2.0-1.1. Looking at the spec (http://dag.wieers.com/packages/cairo/) it doesnt show any "difficult stuff" so you should have no problem using it to build an rpm with using the tarball. You'll find you need freetype-devel, fontconfig-devel, libpixman-devel, XFree86-devel and libpng-devel though which should all be available as rpm.


now i dont really understand how libraries work in linux. Where they install, how they are recognised by other programs/installers...
In general libraries are installed in the /lib, usr/lib and /usr/local/lib trees. You can install libraries outside of the trusted paths (ldconfig -p) but then you'll have to point to it using the LD_LIBRARY_PATH env var or use a preload (/etc/ld.so.preload). Applications "contain" a "list" (ldd /path/to/binary) of what libraries they need. Before executing the app the linker (/lib/ld*.so) uses the cache (/etc/ld.so.cache) and looks in the trusted paths for the libraries.


so since i have installed a newer version of glib than requested in the error, how come it has not recognised that?
Weird. What path was it installed into? Anyway. Go for rpms or compile to rpm. Using rpm the right way, letting it resolve dependencies all by itself, saves time and frustration. Frustration leads to anger and anger leads to ahhh, well, y'know.
 
Old 03-23-2006, 09:52 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
glib2 and gtk2 are designed to coexist with glib1 gtk1
lots of programs or people still use gtk1 on new systems
should be rpms


what wont work is multiple versions of glib2 gtk2
don't even try to go there
 
Old 03-24-2006, 02:53 AM   #4
sivart
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
hi thanks for the replies. I'll have a look into turning them into RPMs. Any tips from you guys in the meantime?

thanks for explaining the libraries thing for me. and yes, this really has led me to frustration and AGHGHHHHHHH!! really put me off linux, but lets see if it pulls me back.

i'll be back with my progress.
 
Old 03-24-2006, 03:18 AM   #5
sivart
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
well i tried downloading the gtk+ as an RPM, the newest i could find was 2.6.1-2, but it has dependences as well... SIGH:


warning: gtk+-2.6.1-2.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
error: Failed dependencies:
iconv is needed by gtk+-2.6.1-2
libXinerama.so.1 is needed by gtk+-2.6.1-2
xcursor is needed by gtk+-2.6.1-2
xft is needed by gtk+-2.6.1-2
xrender is needed by gtk+-2.6.1-2


i just tried installing iconv (libiconv-1.9.1) but it still shows up as missing in the rpm error. should i have to update something to make it show up? or is it just meant to be found?

for libiconv i followed the README installation instructions and used this command: ./configure --prefix=/usr/local

should i be pointing that rpm to this or something?

thanks
 
Old 03-25-2006, 01:57 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I think it's weird rpm doesn't pick up the dependencies automagically. What do you use to install rpm's? Apt-get, Yum, Synaptic, Autoupdate? If the libiconv tarball contains a .spec file (in the root or contrib dir) you can build a rpm right away: "rpm -tb libiconv-version.tar.gz".
 
  


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
GTK+ programs on Windows without having to install GTK+, GLib, etc Nylex Programming 2 02-19-2006 01:33 PM
GIMP Toolkit - Glib/GTK+ Version Problem lucky6969b Programming 1 01-05-2006 05:16 PM
gtk keeps finding the wrong version of glib slzckboy Linux - Software 5 10-21-2005 08:26 AM
can't install gtk 2.4.4: "Requested 'glib-2.0 >= 2.4.0' but version of GLib is 2.2.3 webazoid Linux - Software 0 07-15-2004 06:07 PM
CANT INSTALL GTK and GLIB please HELP! cantrooper Linux - Software 0 08-15-2003 09:27 AM

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

All times are GMT -5. The time now is 05:25 AM.

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