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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
06-09-2004, 02:59 PM
|
#1
|
LQ Newbie
Registered: Jun 2004
Distribution: mandrake 9.2
Posts: 14
Rep:
|
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.
|
|
|
06-09-2004, 05:00 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,354
|
"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.
|
|
|
06-09-2004, 05:54 PM
|
#3
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
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.
|
|
|
06-10-2004, 02:10 AM
|
#4
|
LQ Newbie
Registered: Jun 2004
Distribution: mandrake 9.2
Posts: 14
Original Poster
Rep:
|
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.
|
|
|
06-10-2004, 03:32 AM
|
#5
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
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.
|
|
|
06-25-2004, 10:30 AM
|
#6
|
LQ Newbie
Registered: Jun 2004
Posts: 2
Rep:
|
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???
|
|
|
08-02-2004, 12:46 AM
|
#7
|
LQ Newbie
Registered: Oct 2002
Posts: 23
Rep:
|
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
|
|
|
08-02-2004, 09:42 AM
|
#8
|
LQ Newbie
Registered: Jun 2004
Posts: 2
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 06:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|