LinuxQuestions.org
Help answer threads with 0 replies.
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 04-09-2004, 02:38 PM   #1
Tsukasa
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Rep: Reputation: 0
Problem with GTK+ compiling


Before I tried to compile GTK+-2.2.4 I had compilied atk-1.2.4 , glib-2.2.3 , pango-1.2.5 . After I had finished to compile all and I started to compile GTK+, the configure script gave an output that it didn't find the direction of the 3 files.

I had removed all and started to compile the new version (gtk+-2.4 , atk-1.6 , glib-2.4 , pango-1.4). At first I had compiled Atk and Glib, and when I ran Pango's configure script, it gave an output -


Code:
checking for GLIB - version >= 2.4.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. configure: error: ***
 Glib 2.4.0 or better is required. The latest version of ***
 Glib is always available from ftp.gtk.org/.
I tried to compile few times again - Glib succeeded and Pango still gave the fail message.

What could be the problem?

(I work with Mandrake 9.2)
 
Old 04-09-2004, 04:36 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I think it may be the order you did them in, but I'm probably wrong as there are so many things that can go wrong. The order is important because if you build atk before glib it will be linked against some other glib you already have installed. You will may have some parts of glib-2.2.3 installed as part of Gnome or whatever. If you delete them whatever is linked with them will stop working. Do you need to install these things in system wide places? You may find it safer to install them in your home folder, that way you won't break Mandrake. Before you start, define three important variables
Code:
export LDFLAGS="-L~/tmp/lib"
export LD_LIBRARY_PATH=~/tmp/lib
export PKG_CONFIG_PATH=~/tmp/lib/pkgconfig:$PKG_CONFIG_PATH
and the for each of the packages do
Code:
./configure --prefix=~/tmp
make
make install
and install them in the order glib-2.4, atk-1.6, pango-1.4,gtk-2.4.
It may take awhile to work past the problems but once you can install them in tmp in your home folder it should be safe to try installing them as root in a system wide place like /opt that won't break Mandrake.
 
Old 04-09-2004, 05:13 PM   #3
Tsukasa
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks, but where I need to add/change the things you wrote? (stupid question )

By the way, if I will install in 'tmp' directory, the files won't delete? (after I shotdown my computer)
 
Old 04-09-2004, 05:26 PM   #4
kenoichi
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Rep: Reputation: 0
im having almost the same problem
 
Old 04-09-2004, 05:31 PM   #5
Tsukasa
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Original Poster
Rep: Reputation: 0
I had compiled glib-2.4 , atk-1.6 and when I compiled pango-1.4, I get -

Code:
checking for GLIB - version >= 2.4.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.
configure: error:
*** Glib 2.4.0 or better is required. The latest version of
*** Glib is always available from ftp://ftp.gtk.org/.
 
Old 04-10-2004, 01:12 PM   #6
Tsukasa
LQ Newbie
 
Registered: Apr 2004
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks! I compiled GTK like you said and it worked, however, what will be happen when a software like xChat need GTK's librayes. Will be xChat find automaticlly the librayes or I need to give a special parameters?
 
Old 04-10-2004, 02:14 PM   #7
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
If you need to compile a program against those libraries just set those variables before you compile it. It's possible that you may need to set the LD_LIBRARY_PATH before you run whatever it is. I'm not sure.
 
Old 04-13-2004, 05:04 PM   #8
PsYlTrance
LQ Newbie
 
Registered: Apr 2004
Location: Brazil
Posts: 11

Rep: Reputation: 0
whats this

Quote:
Originally posted by Andrew Benton
I think it may be the order you did them in, but I'm probably wrong as there are so many things that can go wrong. The order is important because if you build atk before glib it will be linked against some other glib you already have installed. You will may have some parts of glib-2.2.3 installed as part of Gnome or whatever. If you delete them whatever is linked with them will stop working. Do you need to install these things in system wide places? You may find it safer to install them in your home folder, that way you won't break Mandrake. Before you start, define three important variables
Code:
export LDFLAGS="-L~/tmp/lib"
export LD_LIBRARY_PATH=~/tmp/lib
export PKG_CONFIG_PATH=~/tmp/lib/pkgconfig:$PKG_CONFIG_PATH
and the for each of the packages do
Code:
./configure --prefix=~/tmp
make
make install
and install them in the order glib-2.4, atk-1.6, pango-1.4,gtk-2.4.
It may take awhile to work past the problems but once you can install them in tmp in your home folder it should be safe to try installing them as root in a system wide place like /opt that won't break Mandrake.
I try this and compiling the glib-2.4 getting erro:
libtool: link: cannot determine absolute directory name of `~/tmp/lib'
make[3]: ** [libcharset.la] Erro 1
make[3]: Leaving directory `/home/matcouto/Arquivos/arquivosdesys/glib-2.4.0/glib/libcharset'
make[2]: ** [all-recursive] Erro 1
make[2]: Leaving directory `/home/matcouto/Arquivos/arquivosdesys/glib-2.4.0/glib'
make[1]: ** [all-recursive] Erro 1
make[1]: Leaving directory `/home/matcouto/Arquivos/arquivosdesys/glib-2.4.0'
make: ** [all] Erro 2

What's wrong ?
PS.: I din't had the dir ~/tmp/bin then i add...
 
Old 04-13-2004, 08:09 PM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Well if ~ doesn't work for you, try the absolute path,

export LDFLAGS="-L/home/matcouto/tmp/lib"
export LD_LIBRARY_PATH=/home/matcouto/tmp/lib
export PKG_CONFIG_PATH=/home/matcouto/tmp/lib/pkgconfig

Good luck.
 
Old 04-13-2004, 09:27 PM   #10
PsYlTrance
LQ Newbie
 
Registered: Apr 2004
Location: Brazil
Posts: 11

Rep: Reputation: 0
Quote:
Originally posted by Andrew Benton
Well if ~ doesn't work for you, try the absolute path,

export LDFLAGS="-L/home/matcouto/tmp/lib"
export LD_LIBRARY_PATH=/home/matcouto/tmp/lib
export PKG_CONFIG_PATH=/home/matcouto/tmp/lib/pkgconfig

Good luck.
tk's Andrew
I'm novice in the linux world, and my english is bad. I'm Brazilian hehe =)
tk's for all !!!
bye
 
Old 04-18-2004, 06:12 AM   #11
owain
LQ Newbie
 
Registered: Oct 2003
Posts: 19

Rep: Reputation: 0
I made the same error as the original poster - compiling Atk first, then Glib, and getting the Pango error. How can I undo what I did, so to do it again correctly?
 
Old 04-18-2004, 07:39 AM   #12
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Well there's three ways you can fix it. One is to compile it with the original options

./configure --(options)
make

but then instead of make install do

make uninstall

Not everything supports make uninstall so plan B is to compile it and install it in a temporary folder in your home folder with

./configure --prefix=/home/user/tmp

that will show you what was installed and where it was installed. So if you installed it --prefix=/usr, the things that you've just put in /home/user/tmp/bin will also be in /usr/bin, the files in /home/user/tmp/lib will also be in /usr/lib. That way you can go through and remove only the files that were installed as you'll know what to look for. If you didn't specify --prefix= the default is --prefix=/usr/local. When you're done you can delete the temporary folder in your home.

The third option is simply to do it again in the correct order and reinstall over the old files, which should work, but it may not.
I think it's dangerous to install new things like glib and gtk on a system wide basis as they may interfere with what's already installed and cause problems with other applications. It's safer to not become root and just play with things in your home folder. I used to be more reckless when I used Mandrake as it was easy to spin the disks and reinstall so you weigh up the options yourself.
 
Old 04-19-2004, 06:14 PM   #13
NeoSpawn
LQ Newbie
 
Registered: Feb 2004
Location: 5 Level of hell
Distribution: Fedora Core 1
Posts: 27

Rep: Reputation: 15
Lightbulb

Hey I was having trouble installing pango but i found a way to do it. Took me a while but i got it. Dont install anything in a temp folder, let it install on its own. These are the setting for some varibles that made Pango work
$PKG_CONFIG_PATH=" /usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig"
$LD_LIBRARY_PATH= "/usr/local/lib"
$LDFLAGS ="-L/usr/local/lib"

I hope this helps, you would not believe how long it took me to do all that!

NeoSpawn

PS: I GOT GTK TO INSTALL!!!!!!! YAY!!!!!!

Last edited by NeoSpawn; 04-19-2004 at 06:18 PM.
 
Old 10-27-2004, 11:30 PM   #14
huntex
LQ Newbie
 
Registered: Oct 2004
Location: Taiwan
Posts: 3

Rep: Reputation: 0
Quote:
$PKG_CONFIG_PATH=" /usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig"
$LD_LIBRARY_PATH= "/usr/local/lib"
$LDFLAGS ="-L/usr/local/lib"
thank you very much!!!
 
  


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
problem compiling gaim (GTK+ 2.0 not found) JonEtc Linux - Software 3 10-15-2005 06:14 PM
Problem compiling gtk+-2.6.7 with SuSE 9.2 LegendBreath Linux - Software 1 04-21-2005 12:08 PM
compiling gaim/ gtk error (two versions of gtk) webazoid Linux - Software 0 07-06-2004 06:05 PM
Problem compiling GTK apps in Anjuta MG-Cloud Linux - Software 1 11-16-2003 03:02 PM
Problem when compiling gtk-doc on slackware (9.0) sebemi Slackware 0 09-06-2003 06:40 AM

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

All times are GMT -5. The time now is 08:11 AM.

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