Installing GTK+/glib

Installing GTK+/glib

Post by Antonio Garcia-Martine » Fri, 07 Dec 2001 14:25:25



I have installed glib, followed by GTK+. However, on the configure for
GTK+ I get the following error message:

checking for extra flags to get ANSI library prototypes... none needed
checking for extra flags for POSIX compliance... none needed
checking for glib-config... /usr/local/bin/glib-config
checking for GLIB - version >= 1.2.8... no
*** Could not run GLIB test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding GLIB or finding the wrong
*** version of GLIB. If it is not finding GLIB, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to
point
*** to the installed location  Also, make sure you have run ldconfig if
that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it,
although
*** you may also be able to get things to work by modifying
LD_LIBRARY_PATH
***
*** If you have a RedHat 5.0 system, you should remove the GTK package
that
*** came with the system with the command
***
***    rpm --erase --nodeps gtk gtk-devel
configure: error:
*** GLIB 1.2.8 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.

I believe I installed GLIB correctly, and at this point I am at a loss
as to what to do.

Any suggestions? Antonio.

 
 
 

Installing GTK+/glib

Post by Michael Schloh von Bennewit » Fri, 07 Dec 2001 18:37:31



> checking for glib-config... /usr/local/bin/glib-config
> checking for GLIB - version >= 1.2.8... no
> *** Could not run GLIB test program, checking why...
> *** The test program compiled, but did not run. This usually means
> *** that the run-time linker is not finding GLIB or finding the wrong

> I believe I installed GLIB correctly, and at this point I am at a loss
> as to what to do.

I had to hack my glib-config script to return the proper LDFLAGS to get
around this.

As you might guess, it is probably a linkage difficulty (that exists on
a lot of software with Solaris, not just glib/gtk.) Gtk tries to link
its test program, but is not linking it with the proper link flags and
thus fails. Its generic response is what you see above.

Before hacking glib-config, you might ensure that you have your LDFLAGS
variable set and exported correctly. It should be something like:

$ export LDFLAGS="-L/usr/local/lib -R/usr/local/lib" or wherever you
have your libglib.

Lastly, please be careful with this advice. I'm no moron, but not an
expert either ;-) Maybe a real one will respond.

Michael

 
 
 

Installing GTK+/glib

Post by Martin Pau » Fri, 07 Dec 2001 20:19:51




>> checking for glib-config... /usr/local/bin/glib-config
>> checking for GLIB - version >= 1.2.8... no
>> *** Could not run GLIB test program, checking why...
>> *** The test program compiled, but did not run. This usually means
>> *** that the run-time linker is not finding GLIB or finding the wrong

>> I believe I installed GLIB correctly, and at this point I am at a loss
>> as to what to do.

> I had to hack my glib-config script to return the proper LDFLAGS to get
> around this.

Me too. And I think it's the best you can do, it'll solve linking problems
for all applications using glib/gtk+.

It's a simple change in glib-config, replace this line:

  echo -L${exec_prefix}/lib $libsp $libsa

with this line:

  echo -L${exec_prefix}/lib -R${exec_prefix}/lib $libsp $libsa

(This is for version 1.2.10). For testing, run "glib-config --libs" and
check the output.

hth, mp.
--
                         Martin Paul | Systems Administrator

Liechtensteinstrasse 22, A-1090 Wien | Tel: 01 4277 38803
        http://www.par.univie.ac.at/ | Fax: 01 4277 9388