[Techtalk] Quirks of RH8 (was: Re: RH8--no gcc??)
Conor Daly
conor.daly at oceanfree.net
Mon Oct 21 18:37:06 EST 2002
On Sun, Oct 20, 2002 at 12:34:11PM +0100 or so it is rumoured hereabouts,
Telsa Gwynne thought:
> On Sun, Oct 20, 2002 at 01:53:15AM -0400 or thereabouts, lain iwakura wrote:
>
> > I went to the GNU website and found that gcc only provides source code,
>
> That's GNU policy: source tarballs are the preferred form of
> distribution.
>
> > no rpms...how can the user compile the source code to get the compiler
> > when he has no compiler? I tried 'up2date gcc' initially before I
>
> (a) compile it on another box of the same architecture and install the
> result.
> (b) "cross-compile it" on another box of a different architecture,
> telling it, "Build a compiler which will work on my architecture",
> and install the result.
> (c) find the binary for your architecture in the first place and
> install that.
(d) build it on your own box. AIUI, the gcc source tarball includes a
stage 1 compiler binary(?) which will build a stage 2 compiler which will,
in turn, build the final gcc compiler. It's much like the way the
computer bootstraps itself. There has to be a precompiled starting point
but after that, it builds itself.
> (b) Mixing and matching package-managed apps and compiled-from-
> source apps can cause confusion down the line later. rpm won't
> know that stuff you compiled locally is there, unless you
> compiled it from a source rpm using the rpmbuild command.
You _can_ make your own rpms from the source tarball. It takes a little
work though. goes something like:
1. Install Some src.rpm or other to create the necessary /usr/src/redhat
directory tree (maybe it's already there, I never checked first) and to
get a sample .spec file to work with. cd to that directory. There should
be directories like: BUILD SOURCE SPECS RPMS SRPMS
2. Put the tarball in the SOURCE directory and extract the README and
INSTALL files.
3. From those, figure out the correct configure / build / install sequence
and put those commands in the spec file (in the SPECS directory).
4. In the spec file, define the RPM_BUILD_DIR and RPM_BUILD_ROOT
variables.
5. Scan the .spec file to se what else you might want to change.
6. Do
rpm -bb SPECS/<rpm-name>.spec
to build the binary rpm
rpm -bs SPECS/<rpm-name>.spec
to build a src rpm and
rpm -ba SPECS/<rpm-name>.spec
to build both.
That way, rpm will knoe about the tarballs you install on your system.
Conor
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
6:30pm up 51 days, 22:58, 0 users, load average: 0.16, 0.03, 0.01
Hobbiton.cod.ie
6:20pm up 51 days, 22:29, 1 user, load average: 0.16, 0.07, 0.01
More information about the Techtalk
mailing list