environment variables for compiling from source


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers environment variables for compiling from source
# 1  
Old 10-21-2012
environment variables for compiling from source

Hello,
I was trying to istall Gdkpixbuff 2.26.1 in my laptop ubuntu 11.10, when I did:
Code:
./configure

and I got these error message
Code:
*** 'pkg-config --modversion glib-2.0' returned 2.33.1, but GLIB (2.30.0) 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: 
*** GLIB 2.31.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.

A bunch of things I am not sure:
1) glib2.0 must have been installed. The one that comes with the system is untouched (i.e GLIB2.31.0; although I am not sure where it is!), and the newest version is installed $HOME/Downloads/glib-2.33.1
Code:
$yifangt@laptop:$ pkg-config --modversion glib-2.0
2.33.1

2) How do I remove the old version? It's better to replace it with the new one, but how? I am quite nervous if I move the old one, my system would be screwed.
3) How do I modify my environment varaibles LD_LIBRARY_PATH or/and PKG_CONFIG_PATH for this particular compiling?
4) Or how to modify the /etc/ld.so.conf. I tried searching, but do not understand what supposed to do.

I have found this type of problem is quite often when I compile other packages/programs from source. Please someone walk me thru this problem. Thanks a lot!

yt
# 2  
Old 10-22-2012
You have to check your installed libraries with the package management tool. In Ubuntu it is called "Synaptics" and should be available. Start it and search for "glib" to find out which version is installed.

Quote:
Originally Posted by yifangt
1) glib2.0 must have been installed. The one that comes with the system is untouched (i.e GLIB2.31.0; although I am not sure where it is!), and the newest version is installed $HOME/Downloads/glib-2.33.1
This is not "installed", just "downloaded". Check if it is installed with "Synaptics".


Quote:
Originally Posted by yifangt
2) How do I remove the old version? It's better to replace it with the new one, but how? I am quite nervous if I move the old one, my system would be screwed.
Again: use Synaptics Package Manager. You can install the newer version of the library as well as deinstall the old version of the library there.


Quote:
Originally Posted by yifangt
3) How do I modify my environment varaibles LD_LIBRARY_PATH or/and PKG_CONFIG_PATH for this particular compiling?
You simply open a terminal, where you want to compile. Prior to use "./configure" or "make" or something such you issue:

Code:
LD_LIBRARY_PATH=/some/path/here ; export LD_LIBRARY_PATH

Then, without closing the window, you issue your make- or configure-command in there. Truth be told, i suppose you don''t need to do that once you have updated your library.

Quote:
Originally Posted by yifangt
4) Or how to modify the /etc/ld.so.conf. I tried searching, but do not understand what supposed to do.
The file is a simple text file, so you can modify it with any text-editor you want. I'd point you to "vi", but probably you are not comfortable with it so i suggest you use any text editor you know how to operate or get some knowledgeable help. CAUTION: stay away from transferring the file to a Windoze machine for editing and then transferring it back. This is in principle possible but chances are you (Windoze respectively) get the recoding of the line ends wrong and end up with an unusable file back in Unix. In total it is easier to do the editing in Unix.

The variable "LD_LIBRARY_PATH" and the file "/etc/ld.so.conf" serve more or less the same purpose and you will have to change only one of these (see above, if any at all). The effect of the variable setting lasts only for the session (which is, in this case, the terminal window you issued it in - once you close that its effect is gone), while changing the file effects the whole system (all users). You will need root privileges to do so.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compiling source code issue

Need assistance in compile a source code with PERL flags Compile source code CDFconvert-2.2.3 which requires Fortran 90,Perl interpreter , Perl/TK module , NetCDF library , Gempak I have all the above required libraries . Issue is when compiling the source code it looks for local... (4 Replies)
Discussion started by: ajayram_arya
4 Replies

2. Programming

Compiling C++ source file

I am trying to compile a c++ source file print_options.cpp and getting lot of errors g++ -I/media/ios120/chrisd/research/tomso-branches/tomso_12_05 /media/ios120/chrisd/research/tomso-branches/tomso_12_05/libs/program_options/print_options.cpp In file included from... (2 Replies)
Discussion started by: kristinu
2 Replies

3. AIX

Compiling samba from source in AIX 5.3

Hello all. I have never had any issues like this when compiling applications from source. When I try to compile samba-3.5.0pre2, configure runs with no issues, but when the time comes to make, this happens: make: make 1254-025 There must be an existing description file or specify a target. ... (4 Replies)
Discussion started by: raidzero
4 Replies

4. Programming

Help with Compiling large source file using g++

HI All, I m compiling a 27 MB cpp file and compiler crashes. My enviroment : RH 9, compiler g++ how i m compiling g++ -fPIC -DWITH_OPENSSL -DWITH_COOKIES -c soapC.cpp it took almost 30 -32 to throw error like report bug etc. I will post the same error, but if can any body tell how to... (2 Replies)
Discussion started by: helpmeforlinux
2 Replies
Login or Register to Ask a Question