[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compilers that self compile



On Fri, Oct 22, 2004 at 10:05:48AM -0300, Antonio S. de A. Terceiro wrote:
> Joel Baker escreveu isso aí:
> [cut]
> > > Will this approach make manual porting unnecessary?
> > 
> > Sadly, no, at least if I understand you correctly. Because, four months
> > down the road when you've uploaded another copy to the archive, that
> > first copy with the pre-translated source that you built will be long
> > gone and unavailable for use - and requiring the use of upstreams binary
> > precompile is impractical in many situations (such as "It's a new port
> > and upstream doesn't have one out yet, or may never put one out").
> > 
> > If it is possible to install the tool on another Debian box and *generate*
> > the necessary files, before trying to do the build, and use those, that
> > would generally be workable; most porters have access to, if nothing else,
> > the Debian machines used for troubleshooting various things, and could
> > compile it there.
> > 
> > However, if it's that complex, I strongly advise writing your rules file to
> > make it as easy as possible, and putting at note in near the top such as "#
> > Porters - please see the BOOTSTRAPPING file for instructions on building
> > this package on a new port." And, of course, document the step by step way
> > of doing this in that file (which, if you're doing it for the first time
> > yourself to get the package into the archive, should be easy enough - just
> 
> Let me be sure I've understood.
> 
> ac++ does source-to-source-translation, and the generated sources are
> platform-independent.
> 
> For building it for the first time, I'll have to install on my box
> (i386) a binary distributed by upstream for i386 (the only architecture
> for which they provide binaries), and build it normally.
> 
> Then, for architectures other than i386, porters will do the same what I
> did (assuming that I'll document it in the debian/rules file), using
> some i386 box they have access to generate the C++ source, copy these
> sources to a target-architecture box, and build it themselves.
> 
> Is that it?
> 
> What I thought is that if the translated sources (which are platform
> independent) went in the diff, there will be no necessary "by hand"
> actions for building in any architecture. But as Joeren wrote, one it is
> not recommended to do that. Am I correct?

Sorry this took a while to respond to; life sort of got in the way.

If the generated sources are platform independant, and you can use the
Debian package for i386 to generate enough to bootstrap something on
another port, then yes, that's quite sufficient (but might still be good to
note somewhere, so folks trying to port it realize that it's that simple).

Putting the post-translated sources into the package is not, as a rule,
a good idea, for the reasons mentioned before, but so long as the tools
necessary to do the bootstrapping are readily available and there's a note
about how to use them to do it, porters won't generally have any problems
(the usual routine is to build the package manually, by hand, in this case
using sources generated with the i386 binary, then install it into the
porting area and do a 'normal' build using the bootstrapped package to
ensure that all of the other Build-Depends and such are OK, and use the
second stage package as the thing to upload).

The fact that the translated sources are portable makes it vastly simpler,
since it reduces the requirement for a new port from "a binary copy
must exist for this architecture" to "a binary copy must exist for SOME
architecture you have access to", and nearly every porter I know of has at
least passing access to an i386 box where they could arrange for it to be
installed long enough to bootstrap the port.
-- 
Joel Aelwyn <fenton@debian.org>                                       ,''`.
                                                                     : :' :
                                                                     `. `'
                                                                       `-

Attachment: signature.asc
Description: Digital signature


Reply to: