Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem installing GLIB for gnubg

Status
Not open for further replies.

mrrrl

MIS
Dec 26, 2001
179
US
I am tryin to install GNU Backgammon, but it comes up with this error when I run ./configure :

checking for GLIB - version >= 2.0.0... 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.
checking for glib-config... no
checking for GLIB - version >= 1.2.0... no
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
*** You must have installed Glib1 or Glib2 in order to
compile GNU Backgammon


So I downloaded glib-2.6.4.tar.gz unziped it into a folder and then ran ./configure, then make, then make install.

Went back to gnubg, did ./configure and it came up to the same error.

So how do I tell if glib is really installed and where? Then how do I tell gnubg where it is?

TIA
 
Sounds like GLib probably got installed in [tt]/usr/local[/tt].


I'd guess that you just installed GLib and that the dynamic linker probably doesn't know where to look for it yet.

To fix that, look at the file [tt]/etc/ld.so.conf[/tt] and make sure it contains a line for [tt]/usr/local/lib[/tt]. Add it if it isn't there.

Then, run [tt]ldconfig[/tt] as root. That'll update the file [tt]/etc/ld.so.cache[/tt] to contain info the dynamic linker needs to use GLib.

Once you've done that, GNU BG should configure properly.


Note that this procedure (running [tt]ldconfig[/tt]) is required whenever you install a library from source. Installing from RPMs or .debs will normally perform this step automatically.
 
Oh, also follow this advice in the error message, of course:
gnubg configure said:
If GLIB was installed in PREFIX, make sure PREFIX/bin is in your path
[tt]PREFIX[/tt] is, again, probably [tt]/usr/local[/tt].
 
Thanks for getting back to me. I did what you stated and I still get the same error.

How do I find out where glib was installed to?

I am running Mandrake 10.1.
 
If you didn't specify a prefix when configuring GLib, it defaults to [tt]/usr/local[/tt]. I'll assume that's what you did, since if you had specified a prefix, you'd know what it was :).

To check to see if it's really there, you can run
Code:
ls /usr/local/bin/ |grep glib-config

If it got installed there, the command will output that filename.


If you don't get any output from that command, try
Code:
locate glib-config
or
Code:
find / -name glib-config

The first command is faster, but won't work if you just installed it. The second takes longer, but will find it if it's on the system.
 
Thanks again. Here is what i came up with

[root@linux1 bin]# ls /usr/local/bin/ |grep glib-config
[root@linux1 bin]# locate glib-config
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
[root@linux1 bin]# updatedb
[root@linux1 bin]# locate glib-config
[root@linux1 bin]# find / -name glib-config
[root@linux1 bin]#

Nothing. So it appears that it did not install? Even though I did ./configure, make, make install and I received no errors. I will try again in the am to get it to install. Any help/ideas are still welcome.

Thanks
 
It looks like the most recent versions of GLib don't install or use [tt]glib-config[/tt]. So the package was probably installed correctly and I just gave you a bad file to look for. Look in [tt]/usr/local/lib[/tt] for stuff with [tt]glib[/tt] in the name and I'm sure you'll find something.

What do you get for the output of these commands?
Code:
pkg-config --cflags --libs --modversion glib
Code:
pkg-config --cflags --libs --modversion glib-2.0
 
Here is whats in /usr/local/lib

[root@linux1 etc]# cd /usr/local/lib
[root@linux1 lib]# ls
gettext/ libgettextlib.so@ libglib-2.0.la* libgobject-2.0.so@
glib-2.0/ libgettextpo.a libglib-2.0.so@ libgobject-2.0.so.0@
libasprintf.a libgettextpo.la* libglib-2.0.so.0@ libgobject-2.0.so.0.600.4*
libasprintf.la* libgettextpo.so@ libglib-2.0.so.0.600.4* libgthread-2.0.la*
libasprintf.so@ libgettextpo.so.0@ libgmodule-2.0.la* libgthread-2.0.so@
libasprintf.so.0@ libgettextpo.so.0.1.0* libgmodule-2.0.so@ libgthread-2.0.so.0@
libasprintf.so.0.0.0* libgettextsrc-0.14.3.so* libgmodule-2.0.so.0@ libgthread-2.0.so.0.600.4*
libgettextlib-0.14.3.so* libgettextsrc.la* libgmodule-2.0.so.0.600.4* pkgconfig/
libgettextlib.la* libgettextsrc.so@ libgobject-2.0.la* preloadable_libintl.so
[root@linux1 lib]#


and here is what I get with the commands:

[root@linux1 etc]# pkg-config --cflags --libs --modversion glib
sh: line 1: glib-config: command not found
sh: line 1: glib-config: command not found
sh: line 1: glib-config: command not found


[root@linux1 etc]# pkg-config --cflags --libs --modversion glib-2.0
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
[root@linux1 etc]#
 
When building GNU BG, try:
Code:
./configure --with-glib=/usr/local


Otherwise, try
Code:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH":/usr/local/lib/pkgconfig

./configure
 
Not sure if compiling from source installs header files and all by default. Maybe try going back to the source code and do a './configure --help | less' and see if you need to do something like --enable-devel or something. The default configuration may be to not install headers and all.

----
JBR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top