Re: Sorry easy question.


Subject: Re: Sorry easy question.
From: Reid Ellis (rae@tnir.mef.org)
Date: Tue Sep 07 1999 - 17:42:08 MDT


John Olson! <jolson@nco.northfield.mn.us> said:
JO> How does one go about recompiling the source code for a program?

While both of the below are close, and in cases of .tar.gz, .tar.Z and .tgz
files [also called "tarballs"], are quite correct, I thought the rpm side of
things wasn't quite right.

If you have a source rpm for something "something-1.5.src.rpm", then you will
usually do something like this:

% rpm -Uvh something-1.5.rpm

This will put files under /usr/src/redhat. You go to /usr/src/redhat/SPECS/ and there
will be a file and "something-1.5.spec". In that directory you say:

% rpm -ba something-1.5.spec

This should cause a complete configure/build/test, followed by creation of a
shiny new binary rpm file in /usr/src/redhat/RPMS/ppc:

% cd /usr/src/redhat/RPMS/ppc
% ls
something-1.5-1.ppc.rpm
% rpm -Uvh something-1.5-1.ppc.rpm

which installs the binary rpm. If you haven't seen an rpm for ppc before, you
might consider sharing your package with others by uploading it somewhere.

Other advice quoted below...

Reid

------------------------------------------------------------------------------

From: Scott Wood <scott@broadlink.com>
SW> The simplest way to recompile for PPC is to get the source RPM (.src.rpm), put it in
SW> /usr/src/redhat/SRPMS and do:
SW>
SW> rpm --rebuild something-1.0-1.src.rpm
SW>
SW> and if the build process succeeds (some RPMS have limited platform support), you can:
SW>
SW> rpm -i /usr/src/redhat/RPMS/ppc/something-1.0-1.ppc.rpm
SW>
SW> and that's it!
SW>
SW> If the source for the program only comes in .tar.gz format, then 'tar xvzf' it and run ./configure, then 'make' and 'make install'
SW> usually will do the trick.

From: Don Arbow <donarb@nwlink.com>
DA> The basic procedure goes something like this:
DA>
DA> First you need a source package, either an .rpm or .tar.gz. I usually download
DA> those packages in the /tmp directory. Then you need to unpack them.
DA>
DA> for rpm: rpm -ivh package.name.src.rpm
DA>
DA> for tar: tar xvzf package.name.src.tar.gz
DA>
DA> rpm may put the files into another directory heirarchy, like /usr/src/redhat. Tar
DA> should just put the files into the same directory. Change your working directory
DA> into that source directory.
DA>
DA> First, run configure, this sets up options for the compiler. You may get errors
DA> here, if you don't have a certain library installed that your source package
DA> needs. If so, install that library and rerun configure.
DA>
DA> ./configure
DA>
DA> Then, run make (This does the compiling):
DA>
DA> make
DA>
DA> Then, possibly run the install (This moves the files into the correct directory
DA> for execution):
DA>
DA> make install
DA>
DA> The make script may also have options like 'make test' to test the program prior
DA> to installing it.



This archive was generated by hypermail 2a24 : Fri Oct 01 1999 - 16:13:43 MDT