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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-31-2006, 01:21 AM
|
#1
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Rep:
|
Learning makepkg
Alright, I made my first package and installed it with pkgtool. My first package was made for the glib-2.6.8 library; however, after I installed it the command pkg-config --modversion glib gives this error message.
sh: glib-config: command not found
sh: glib-config: command not found
sh: glib-config: command not found
If I type pkg-config --modversion glib-2.6.8, I get this error message:
Package glib-2.6.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.6.8.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.6.8' found
It is important that pkg-config knows that my package was installed because I can't install a dependant library called ATK unless it does. How can I make that happen?
One other thing, after I installed my package, I checked which files pkgtool installed. There are no .so files listed. Given that this is a shared library, I think I have done something wrong. The are a bunch of .mo files thought. Are .so and .mo related, or did I just mess up completely.
|
|
|
03-31-2006, 03:10 AM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 current
Posts: 1,649
Rep: 
|
I'm not sure if you should really call pkg-config with the version. Try "pkg-config --modversion glib" only and look which version number it shows as installed.
EDIT: I didn't see you had already tried that first. This should work if it's installed properly.
Last edited by titopoquito; 03-31-2006 at 03:16 AM.
|
|
|
03-31-2006, 03:41 AM
|
#3
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
Ya, I mentioned that already. It's in my second sentance
root@blacktop:~# pkg-config --modversion glib
sh: glib-config: command not found
sh: glib-config: command not found
sh: glib-config: command not found
pkgtool shows the package in its list though...
|
|
|
03-31-2006, 04:55 AM
|
#4
|
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973
Rep:
|
you have to use whatever the .pc file is named, for instance if you want to check gtk+-2.x , you need this:
Code:
pkg-config --modversion gtk+-2.0
it doesn't matter if your version of gtk+-2 is 2.6 or 2.8, you use gtk+-2.0 for pkgconfig
what you probably want is:
Code:
pkg-config --modversion glib-2.0
btw, glib-1.x uses the glib-config script, which is why you are getting the message you are, glib-2.x uses pkg-config, instead of a glib-config script.
Last edited by __J; 03-31-2006 at 04:56 AM.
|
|
|
03-31-2006, 05:04 AM
|
#5
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
Thanks, that worked:
root@blacktop:~# pkg-config --modversion glib-2.0
2.8.6
root@blacktop:~#
So, why wouldn't the atk ./configure script find this? How does the .pc file get created?
|
|
|
03-31-2006, 05:19 AM
|
#6
|
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973
Rep:
|
well it mostly depends on where you installed it ( the commands you passed to configure ). it sounds like you did a vanilla "./configure, make, make install" ( personally I'd disagree with this, but one of the nice things about open source is you can do what you want how you want to do it). if this is the case, do:
Code:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
and atk should find everything ok.
it looks like you are building gtk, make sure before you get to pango, type this in:
Code:
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig:$PKG_CONFIG_PATH
this will allow the pango configure script to find the xft library, which is required to install gtk2 ( gtk2 will refuse to use the pango you built unless it has xft support built in). if it is a newer gtk2, you will also need cairo support built into pango too. At the end of the configure process for pango, it will print out a list of backends to be built, make sure that xft and cairo are listed or you cannot build gtk2.
|
|
|
03-31-2006, 05:35 AM
|
#7
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
I'm in the process of learning script writing. So, I will write a make package script for glib and post it here soon. That way everything I'm trying to do will be easy to follow (I didn't do a vanilla installation, I followed a whole list of recommendations). I really, really want to know how to install something properly.
Also, I wanted to say that Linux is awsome once you get the hang of it. The more I use it; the more I grow attached. It's taking me from a stupid Windows user/programmer (Yes, I have been programming for 8 years, but only in Windows) to an intermediate computer user who knows his system inside and out from hardware to software. Thanks for the help everyone.
|
|
|
04-05-2006, 02:36 AM
|
#8
|
Member
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444
Original Poster
Rep:
|
OK, I've made my make package script. Here's what the file looks like. Forgive me, for this is an early release and is partly and extension of some of the earlier install scripts I have made. I will make a more advance script later.
Yes()
{
read ans
while [ $ans != "y" ] && [ $ans != "n" ]
do
echo -n "Invalid option enter y or n: "
read ans
done
[ $ans == "y" ] && return 0 || return 1
}
FileExists()
{
if [ -f $1 ]
then
echo -n "The file $1 already exists. Should I delete it? (y/n) "
if Yes
then
rm $1
else
echo "Error: Cannot copy file $1. Unable to continue."
exit 1
fi
fi
return 0
}
DirExists()
{
if [ -d $1 ]
then
echo -n "The directory $1 already exists. Should I delete it? (y/n) "
if Yes
then
rm -r $1
else
echo "Error: Cannot create directory. Unable to continue."
exit 1
fi
fi
return 0
}
pkg_loc=/mnt/backup/Linux/Reinstall/Packages #I store all my packages in this directory
pkg_name="glib-2.8.6"
pkg_ext="tar.gz"
if [ $1 ]
then
echo $1
pkg_loc=$1
fi
DirExists work
mkdir work
cd work
#We don't have to check if the directory build exists because we just created its parent directory work
mkdir builds #work/builds will how the comiled and installed package
echo "Copying package $pkg_name to current directory."
FileExists $pkg_name.$pkg_ext
cp $pkg_loc/$pkg_name.$pkg_ext .
if [ ! $? ]
then
echo "Error: Could not copy the file $pkg_name.$pkg_ext. Unable to continue."
exit 1
fi
echo "Unpacking $pkg_name"
gunzip -c $pkg_name.$pkg_ext | tar -xf -
cd $pkg_name
echo "Running configure script."
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
if [ ! $? ]
then
echo "Error: The configure script had a problem. Unable to continue."
exit 1
fi
echo "Fixing file permissions"
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
echo "Building and installing $pkg_name"
make install DESTDIR=../builds
if [ ! $? ]
then
echo "Error: A problem occured while building the package. Unable to continue."
exit 1
fi
mkdir ../builds/usr/doc
cp COPYING ../builds/usr/doc
cp LICENSE ../builds/usr/doc
cp NEWS ../builds/usr/doc
cp README ../builds/usr/doc
cd ../builds
makepkg $pkg_name-i486-1.tgz
This is how I built my package. I installed it using pkgtool. When I try to compile the pygtk package it complains.
checking for GLIB - version >= 2.8.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: gobject is required to build pygtk?
root@blacktop:~/pygtk-2.8.4#
What did I do wrong?
|
|
|
All times are GMT -5. The time now is 12:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|