LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-20-2005, 06:16 PM   #1
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Rep: Reputation: 15
Please!!!! Help me with Glib 2.6.1 installation


I'm trying to install gtk+ 2.6.1 and it ask me for glib, atk and pango. I'd installed glib 2.6.1 but when i install pango it gives me this error:

checking for GLIB - version >= 2.5.7... 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.5.7 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.

I'd installed glib by this way:
$ configure --prefix=/usr
$ make
# make install

I'm using SUSE 9.0

Thanks.
 
Old 01-21-2005, 12:19 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
try as root to run the command
ldconfig
and see if that helps
 
Old 01-21-2005, 06:56 AM   #3
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
I'd tried with ldconfig, but nothing happens. How can i use this command?? I put it in the command line and run it. I think it's something like this "/folder_location/ ldconfig". But i don't know the location of glib.

Thanks
 
Old 01-21-2005, 07:18 AM   #4
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
What's the output of echo "LD_LIBRARY_PATH" ? If it isn't "/usr/local/lib:/lib:/usr/lib:/usr/X11R6/lib", the following commands (as root) may fix your problem.
Code:
LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/usr/X11R6/lib
export LD_LIBRARY_PATH
ldconfig
Thomas
 
Old 01-21-2005, 07:39 AM   #5
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
I do exactly what you told me, but it gives me same error.
 
Old 01-21-2005, 10:17 AM   #6
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
The output mentions config.log will show the exact error, what does config.log say?

Thomas
 
Old 01-21-2005, 10:43 AM   #7
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Re: Please!!!! Help me with Glib 2.6.1 installation

Quote:
Originally posted by Lier
I'm trying to install gtk+ 2.6.1 and it ask me for glib, atk and pango. I'd installed glib 2.6.1 but when i install pango it gives me this error:

checking for GLIB - version >= 2.5.7... 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.5.7 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.

I'd installed glib by this way:
$ configure --prefix=/usr
$ make
# make install

I'm using SUSE 9.0

Thanks.
Do you have /usr/lib/pkgconfig in your PKG_CONFIG_PATH variable and /usr/lib in your LD_LIBRARY_PATH variable?
 
Old 01-25-2005, 01:58 PM   #8
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
Yes, i have the two variable

The config.log show this:

configure:21613: checking for GLIB - version >= 2.5.7
configure:21762: result: no
configure:21795: gcc -o conftest -g -O2 -Wall conftest.c >&5
conftest.c:27:18: glib.h: No such file or directory
conftest.c: In function `main':
conftest.c:33: error: `glib_major_version' undeclared (first use in this function)
conftest.c:33: error: (Each undeclared identifier is reported only once
conftest.c:33: error: for each function it appears in.)
conftest.c:33: error: `glib_minor_version' undeclared (first use in this function)
conftest.c:33: error: `glib_micro_version' undeclared (first use in this function)
configure:21801: $? = 1
 
Old 01-25-2005, 03:38 PM   #9
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
if your just exporting the LD_LIBRARY_PATH and not the PKG_CONFIG_PATH it will probably fail due to picking up the libraries out of /usr/local/include but using the headers elsewhere. ( which will give you undefined reference/symbol errors)
 
Old 01-25-2005, 05:01 PM   #10
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
This is what i'm doing:

# LD_LIBRARY_PATH=/usr/local/lib:/usr/X11R6/lib:/usr/lib
# export LD_LIBRARY_PATH
# ldconfig
# PKG_CONFIG_PATH=/usr/lib/pkgconfig/
# export LD_LIBRARY_PATH
# ldconfig

I don't know what does this code do, but "twsnnva" told me to do that.
It's that right????
Still don't work.
 
Old 01-25-2005, 05:08 PM   #11
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
I don't know, it depends on where you installed glib to. technically:

PKG_CONFIG_PATH=/usr/lib/pkgconfig

won't do anything except overwrite the rest of the PKG_CONFIG_PATH the distro sets up and b0rking any chances you have of compiling anything.

so:

don't use LD_LIBRARY_PATH for what your doing. just make sure /usr/local/lib is listed as one of the directories in /etc/ld.so.conf and run ldconfig as root (which will eliminate the need for LD_LIBRARY_PATH in this example)

then:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

if your new glib is installed in the prefix /usr/local. what this does is set /usr/local/lib/pkgconfig to the FIRST directory pkg-config will search ( if you have an old glib in /usr this is why your running into problems, but we can get around that now but you will have to set LD_LIBRARY_PATH at runtime or the program will bail).

so try these and tell me:

1). where is the new glib at?

2). do you have an old glib that came with your system installed somewhere else?
 
Old 01-25-2005, 05:52 PM   #12
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
This problem is easy to solve as I had the exact same problem. What you do is install GLIB to /usr, and install ATK and pango and GTK to /usr, assuming you are trying to install GTK.

[code]
./configure --prefix=/usr
[/code[

su
make
make install

BAM! You're set.
 
Old 01-25-2005, 08:58 PM   #13
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
Thanks "Micro420" but it doesn't work.

1) I think the new glib it's at "/usr/local/include/glib-2.0/glib"

2) I run "rpm -q glib" and it appears this: glib-1.2.10-482 (this one come with my distro)
I've tried to uninstall it but i don't know how. I write (as root) "rpm -e glib-1.2.10-482" but nothing happens, i think because of some programs that use the libraries
 
Old 01-26-2005, 11:18 AM   #14
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Original Poster
Rep: Reputation: 15
I think that "./configure" install glib in "/usr/local/include/glib-2.0/glib", and if i put "./configure --prefix=/usr" it's going to install glib in "/usr/include/glib-2.0/glib"
 
Old 01-26-2005, 12:20 PM   #15
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
did you install glib-2.x ( your gonna need 2.6.0 at least for gtk-2.6 I think)?

glib-1.2.x is the older glib and has nothing to do with gtk-2.6 ( gtk-1.2.x uses glib-1.2.x).

look in /usr/local/lib/pkgconfig and see if there is a file name glib-2.0.pc or type this in a console/xterm:

Code:
pkg-config --cflags --libs --modversion glib-2.0
and post the output, then we will know if you have glib-2.x installed and where it is

Edit: make sure if glib-2.0.pc is in /usr/local/lib/pkgconfig to export that directory to your PKG_CONFIG_PATH before running the pkg-config command above:

Code:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
EDIT#2:

when you use a prefix like "configure --prefix=/usr", /usr becomes the root of the installation. So for example, if you install gtk with a root of /usr, the libraries will be placed in /usr/lib, the executable (binary) files will go in /usr/bin, the header files will go in /usr/include, man pages in /usr/man, and so on.

Last edited by __J; 01-26-2005 at 12:24 PM.
 
  


Reply



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
glib installation GTBlackwell Linux - Software 1 10-31-2008 02:03 AM
glib installation trumpetdork Linux - Software 6 04-16-2005 10:54 PM
Verifying installation of glib? jake3217 Linux - Software 3 08-16-2004 01:13 PM
GLib installation Darksun Linux - Software 2 04-02-2004 09:10 AM
Mandrake Glib installation rolandi Linux - Newbie 2 10-23-2003 08:43 PM

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

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