On Monday 23 August 2004 01:24, Marv Boyes wrote:
> Hello, everyone.
>
> Some of you may recall my whining in earlier posts about how I've never
> been able to build and install anything from source on my Mandrake 9.2
> system. Until now, I've been content to use RPMs to install older
> versions of the softare I want, but it's clear that I will NEVER be
> proficient in Linux until I've conquered this problem I seem to have
> with source.
>
> I'm familiar with the whole ./configure-make-make install thing. That's
> not the problem. Time and again, I end up with errors (lately, with
> autoconf supposedly not being installed. This is wrong; I _have_
> autoconf installed). Source packages are claiming to not be able to find
> the stuff they need, when I KNOW I have everything necessary installed.
>
> I think the main problem is that I have no clear idea of where to drop
> my untarred source directories. I've read that they absolutely _must_ be
> in /usr/src-- and that they _must_ be in /opt/src; or /usr/local/src,
> or... You get the picture. I haven't been able to get a clear answer to
> where my sources should live. I've tried them all, and nothing has ever
> worked. I've read tutorial after tutorial, and all they seem to say is
> 'unpack the tarball, then cd to the directory, then run ./configure,
> then...' Unpack _where_?
>
> I know a lot of you get frustrated having to spoon-feed newbies, but
> this is driving me crazy. If it's all been done before, I'm sorry-- but
> can someone please walk me through this step-by-step? (Again, this is on
> Mdk 9.2.) Let's say I have source package n00bsource-1.0.0.tar.gz. Where
> do I unpack it, and what should I be doing to make sure that the thing
> will successfully build, install, and run?
>
> Any guidance would be greatly appreciated-- I _think_ that this is my
> last real obstacle to getting the most out of Linux. Thanks very much in
> advance.
>
>
> Marv

Others have told you that it does not matter where your source directory is. 
So that is one worry off your mind.

Now as for your lack of success compiling stuff. :-

First start off trying to compile something easy without many dependencies.
Do not compile something for KDE as your first project. They all have a 
gazillion dependencies.
Do not try compiling anything fundamental to your system. You will only end up 
with everything screwed up.

Having chosen your project unpack the tar.gz file. You can do that simply by 
clicking on it with konqueror and dragging the folder to your home.

'cd' to the file and read the README and INSTALL files
That will probably tell you to use "./configure make install"
Start with ./configure
It will very likely fail at some point because you are missing some dependent 
library. Read the error messages prior to the failure and try to work out 
what is missing.

 Use 'urpmf string'  to work out which package contains the missing file 
(replace string with the file name or part of the file name you are looking 
for)

Install the missing package and also the "-devel" package.  For each library 
package there is also a -devel package which contains the header files. You 
need these header files if an application you are compiling is to link to the 
package.  (urpmq is good for finding which packages exist)

When ./configure runs cleanly, then 'make' should also run clean.

All of the above should be run as normal user. Now switch to root user and run
make install
to put the compiled code into your system folders
make uninstall will remove it again if it does not work.
If when you try to execute the application your system says it cannot find it, 
then it may have been installed in somewhere outside your "path". Look 
in /opt , /local, and /usr/local/bin  You can always run it by using the full 
explicit path.

I would still emphasise however that it is not usually necessary to compile 
your own code. The only time I compile code is if there is no RPM package of 
the application I want, or the RPM package is broken in some way. And when I 
do compile, I try where possible to build from .src.rpm  or failing that I 
use 'checkinstall'  to create an RPM for me from a compiled tarball.
The reason I do that is because if you mix RPMs with self compiled code the 
RPM database has no way of knowing what you have installed by tarball, and 
can start to get screwed up.

But then screwing your system up, and then working out how to fix it is a 
great learning experience :-)

derek


-- 
www.jennings.homelinux.net
http://twiki.mdklinuxfaq.org

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to