[gambit-list] Bootstrapping from the Gambit github repo

Marc Feeley feeley at iro.umontreal.ca
Thu Apr 12 20:45:00 EDT 2012


On 2012-04-12, at 4:55 PM, Bakul Shah wrote:

> On Thu, 12 Apr 2012 15:46:21 EDT Marc Feeley <feeley at iro.umontreal.ca>  wrote:
>> 
>> This "direct bootstrap" is not possible because the .c files generated by the
>> Gambit compiler from the .scm files when compiling itself are not stored on 
>> the github repository.  The generated .c files are very large and including a
>> ll versions would make the repository considerably larger.
>> 
>> I am proposing to include the generated .c files in the repo, but only commit
>> changes occasionally.  Basically, every time a new release would be published
>> (i.e. a .tar.gz with a new version number) the new .c files would be commited
>> to the repository.
> 
> I think the key idea is that bootstrap .c files must not be in
> the same place as generated .c files otherwise If/when you
> make local changes there will be conficts when you later do a
> git pull. I'v seen a similar problem in OS projects (where you
> need an initial set of binaries to get anything done but later
> you want to install locally built binaries in the same place).

Can you explain this more?  Do you mean manual changes to the generated .c files?  That should *never* be done!  The .c files are not meant for human consumption.

> Separating them also helps when you don't catch your mistake
> until after the buggy compiler generates a new set of .c file
> (and you have already installed it)!

That's not a problem because when you do a "make" it builds the Gambit compiler executable in gsc/gsc .  The compiler that is used to generate the .c files is ./gsc-comp (which will be renamed gsc-boot in the near future) which is the bootstrapped compiler.  The executable gsc/gsc is copied to gsc-boot by a "make bootstrap", but this is done infrequently (basically when a new release is created).  Note that because we are using git, it is easy to checkout the previous working version, build it and copy it to gsc-boot, and move back to the head to fix things (and only do a "make bootstrap" after proper testing).

> How about if `make bootstrap' fetches .c files from a
> gambit-bootstrap repo strictly for bootstrapping?
> 
> "make commit-major" can then copy generated files to the
> separate gambit-bootstrap repo and commit them there.  I like
> a separate repo because you can then blow it away once
> bootstrapped -- typical users won't want it beyond the initial
> bootstrap. Also note that what you really want is an initial
> gambit binary -- generated .c files is just one way to get it.
> I'd be happy to just start with a signed binary for my
> platform!

Binaries are not a good idea since they are not portable (and it is a pain to maintain a fairly complete set).  The closest to that model, but completely portable, is what we have currently, i.e. the .tar.gz releases that are self-contained (you grab the latest one, then "make", then pull the latest sources from the repo, and "make" again).  But that's not the model people expect.  I want a "clone + make" model.

Marc




More information about the Gambit-list mailing list