LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-31-2006, 01:21 AM   #1
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Rep: Reputation: 30
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.
 
Old 03-31-2006, 03:10 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,525

Rep: Reputation: 94
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.
 
Old 03-31-2006, 03:41 AM   #3
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
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...
 
Old 03-31-2006, 04:55 AM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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.
 
Old 03-31-2006, 05:04 AM   #5
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
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?
 
Old 03-31-2006, 05:19 AM   #6
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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.
 
Old 03-31-2006, 05:35 AM   #7
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
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.
 
Old 04-05-2006, 02:36 AM   #8
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
anybody use makepkg? servnov Slackware 20 12-23-2005 04:27 PM
makepkg messed up permissions rgiggs Slackware 1 01-25-2005 05:17 AM
Makepkg Question Eklipz Slackware 5 11-12-2004 03:25 PM
pkgtool, makepkg Rico16135 Slackware 7 02-27-2004 06:12 PM
makepkg? digital bots Linux - Newbie 0 10-21-2002 11:22 PM


All times are GMT -5. The time now is 05:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration