LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   glib (https://www.linuxquestions.org/questions/linux-newbie-8/glib-278226/)

nanoprobe 01-15-2005 06:23 PM

glib
 
before

"*** 'pkg-config --modversion glib-2.0' returned 2.4.0, but GLIB (2.0.1)
*** 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"


when i try to install xchat i get the above error after running ./configure


i have 2 glibs installed version 2.0 and 2.4.0, pkg-config is alredy updated, but after reading some pots i executed ( without thinking ) some commands like: xport LD_LIBRARY_PATH=/usr/local/lib, ldconfig etc... and i got this...

checking for GLIB - version >= 2.0.3... 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: "Cannot find glib"

i'm now totally lost and i would be happy if someone helped me out on this...

thanx

__J 01-15-2005 07:01 PM

First, distribution "Linux" doesn't really help at all. You should change that in your profile.

If you wan't two glibs installed thats okay, but beware if you want to link against certain ones you are going to have to manipulate everything to force the compiler to ignore one or the other. The other problem this creates is at runtime you have to manipulate the linker to force it to find the right library to links against (this is where LD_LIBRARY_PATH comes in).

In short, the way I personally prefer is if you want an updated lib that is part of the base system, upgrade that lib instead of installing a new one in /usr/local

If you really want to use both glibs though, go with this:

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


that will force pkg-config to find 2.4 before 2.0

reddazz 01-15-2005 08:01 PM

glib is usually installed in /usr on most distros (most that I have used or tried out anyway), so to completeley replace the old glib, you would need to do
$./configure --prefix =/usr
$make
#make install
Then also do as root
#ldconfig
before trying to compile anything that checks for glib.

nanoprobe 01-16-2005 07:26 AM

tanx to both of you!
It all seems to work.


All times are GMT -5. The time now is 09:37 AM.