Subject: Re: problem with 'make update'
Date: Wednesday 24th March 2010 17:54:56 UTC (over 8 years ago)
On 2010-03-24, at 10:34 AM, Breanndán Ó Nualláin wrote: > I tried to build an up-to-date version of Gambit on Ubuntu 9.10 following > the instructions here: > > http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Contributing_Patches_to_Gambit_Source_Code > > This is the sequence of commands used: > > $ cd ~/code/src/ > $ wget -c http://www.iro.umontreal.ca/~gambit/download/gambit/v4.3/source/gambc-v4_3_2-devel.tgz > $ tar zxf gambc-v4_3_2-devel.tgz > $ rm -rf gambit > $ mv gambc-v4_3_2-devel gambit > $ cd gambit > $ ./configure --enable-single-host --enable-gcc-opts --prefix=/usr/local/lib/gambit > $ make bootstrap > $ make update > > It fails at this point while trying to make all in ./lib > > The command it fails on is > > ../gsc-comp -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm > > The error message is that the usage of the gsc-comp command is incorrect. > > Any suggestions welcome. Let me explain the problem. If you're only interested in a solution: get v4.6.0 and a make update from that. Gambit is a self-hosting compiler. That means that it is bootstrapped using itself. Most of the system is implemented in Scheme (not just the libraries, but the compiler itself). So when a change is made in the compiler's source code, it must be compiled with the current version of the compiler. Roughly speaking, version 2 must be compiled with version 1. Then when changes are made (to get the source code of version 3), then version 3 must be compiled with version 2. And so on. When you "make update" the build process executes the chain of self compilations that led to the most recent version of Gambit. In other words, if the most recent Gambit is v4 and you currently have v1 installed, then the "make update" will: compile the v2 source with the v1 executable to get the v2 executable, then it will compile the v3 source with the v2 executable to get the v3 executable, and finally compile the v4 source with the v3 executable to get the v4 executable. This chain must be followed because features that are used in the source code of the most recent version of the compiler may have appeared (i.e. were implemented) in an intermediate version of the compiler. This self dependency is not easy to handle in the build process and makefiles, and currently there is a bug. In your particular case, Gambit v4.3.2 does not support the same command line options as more recent version of Gambit. So somewhere in this chain of commits, the makefiles were not consistent with the then current compiler. But because the commits can't be "taken back" the self compilation sequence that "make update" executes has some version transitions that will forever be broken. I haven't looked into ways (automatic tool, or better version changing habits) to avoid this problem in the future. Marc