LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-09-2004, 02:59 PM   #1
uv1
LQ Newbie
 
Registered: Jun 2004
Distribution: mandrake 9.2
Posts: 14

Rep: Reputation: 0
trouble installing gtk, on glib pkgconfig returned 2.4.2 but 2.2.3 was found


I am a newbie so I don't completely understand what is wrong. When I try to install gtk, and the libs it requires, on configuring the atk-1.6.0 lib I get:

checking for pkg-config... /usr/local/bin/pkg-config
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.4.2, 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:


I am using mandrake 9. The updated glibs I installed are at /usr/local/lib (I think). /etc/ld.so.conf = $PKG_CONFIG_PATH = /usr/local/lib and that path is also in $PATH.

Please, I need help. How can I get the installer to use the proper version of glib?

Here is the contents of glib-2.0.pc:

[root /]# more /usr/local/lib/pkgconfig/glib-2.0.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.4.2
Libs: -L${libdir} -lglib-2.0
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include



Last edited by uv1; 06-09-2004 at 03:16 PM.
 
Old 06-09-2004, 05:00 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,354

Rep: Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554
"How can I get the installer to use the proper version of glib?"

I think that the installer is complaining that you have glib 2.2.3 installed and that does not match the "Version: 2.4.2" given in /usr/local/lib/pkgconfig/glib-2.0.pc. I suggest that you edit /usr/local/lib/pkgconfig/glib-2.0.pc and change "Version: 2.4.2" to "Version: 2.2.3". If that doesn't work then change it back to "Version: 2.4.2".

Another possibility is that you may have mismatched versions of glib and glib-devel installed. Try:
rpm -qi glib2
rpm -qi glib2-devel
and see what you have.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 06-09-2004 at 05:03 PM.
 
Old 06-09-2004, 05:54 PM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Don't edit the glib-2.0.pc file. Point the linker at the correct libraries with these variables
Code:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LDFLAGS="-L/usr/local/lib"
If you close the shell it will forget so you'll need to reset those variables if you want to start work on the next thing you want to compile.
Another option is to install the new versions over the old by running
./configure --prefix=/usr
This is risky as some things which are linked against the old libraries may break so I would advise against it.
 
Old 06-10-2004, 02:10 AM   #4
uv1
LQ Newbie
 
Registered: Jun 2004
Distribution: mandrake 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks, problem solved! I however have another dead end with the error message

configure: error: Pango 1.2.0 and Xft backend is required for x11 target

BTW, how can I write permanent variables?

Last edited by uv1; 06-10-2004 at 02:11 AM.
 
Old 06-10-2004, 03:32 AM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Well the Pango thing, basically you need to install some sort of XFree86-dev-lib.rpm thing and then build Pango again. When you ./configure Pango it should finish with
Code:
configuration:
        backends: FreeType X Xft
If it just says backends: X then don't go any further. You need to install some development libs off your Mandrake CD's.
"permanent variables"? To set a variable every time you open a terminal write the lines you want in the hidden file .bashrc in your home folder. If it doesn't exist, create it. Use a simple text editor like Gedit or Kedit. Or copy and paste these lines into a shell
Code:
cat >> ~/.bashrc << "EOF"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LDFLAGS="-L/usr/local/lib"
EOF
It's better that you learn to do it yourself with a text editor though.

Last edited by Andrew Benton; 06-10-2004 at 03:35 AM.
 
Old 06-25-2004, 10:30 AM   #6
MrBlonde
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Hi!

I met the same issues as uv1 and this topic helped a lot... I managed to install glib 2.4 which is now recognized when I start "./configure" in my gtk directory...

But the make generates this error. I think this still has a link with glib :

/home/cedric/Documents/gtk+-2.4.2/gdk/.libs/libgdk-x11-2.0.so: undefined reference to `g_unsetenv'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_type_instance_get_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_completion_complete_utf8'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_param_spec_get_redirect_target'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_class_override_property'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_type_class_add_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_interface_install_property'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_markup_printf_escaped'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_value_take_string'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_markup_vprintf_escaped'
/usr/local/lib/libpango-1.0.so: undefined reference to `g_unichar_get_mirror_char'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Erreur 1
make[4]: Leaving directory `/home/cedric/Documents/gtk+-2.4.2/gtk'
make[3]: *** [all-recursive] Erreur 1
make[3]: Leaving directory `/home/cedric/Documents/gtk+-2.4.2/gtk'
make[2]: *** [all] Erreur 2
make[2]: Leaving directory `/home/cedric/Documents/gtk+-2.4.2/gtk'
make[1]: *** [all-recursive] Erreur 1
make[1]: Leaving directory `/home/cedric/Documents/gtk+-2.4.2'
make: *** [all] Erreur 2

Can you help me please???
 
Old 08-02-2004, 12:46 AM   #7
acidream
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Rep: Reputation: 15
I am having the same problem with GTK+ 2.2.4. Did you ever get the problem you were having in your last post solved?

thanks
 
Old 08-02-2004, 09:42 AM   #8
MrBlonde
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Post

If my reminds are correct, my first version of gtk had been installed during the installation of my Linux in the /usr/ directory.

I installed the newer version (so 2.2.4 in your case, 2.4.2 in mine) in the /usr/local directory (which is the default directory when installing from sources), so there was a conflict between the older version in /usr/ and my new version in /usr/local.

So I simply reinstalled the new version in the /usr/ directory so that the older version was erplaced. To do so, simply write "./configure --prefix=/usr/" in order to install in the /usr/ directory instead of the default directory. The do "make" and "make install"...

Instead of installing from the sources, you can also find the rpm file for your distrib. This will automatically install the whole stuff in the convenient directories.

Note : When installing programs from sources, it's preferable to install them in the /usr/local directory (usually the default one for the installation). But for libraries like gtk, or any other libraries used by your different programs, which are sometimes automatically install with your Linux, prefer to choose the /usr/ directory, especially when there already is an older version installed.

Good work
 
  


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
having trouble with glib, gtk, etc HKJGN Linux - Software 8 05-10-2005 11:34 AM
having trouble with glib, gtk, etc HKJGN Linux - Software 0 04-26-2005 10:55 AM
Trouble installing XMMS, gtk/glib issues. MDBlueIce Linux - Newbie 11 02-26-2005 09:00 PM
program not installing glib6 and pkgconfig not found RRolleston Debian 5 12-19-2004 05:16 PM
2 different versions of glib and pkgconfig! karl0s Linux - Software 4 09-01-2004 06:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:03 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