Hi Todd,
> Since I couldn't build 4.0b. I was trying to re-build 4.0a. I had
> difficulty with this, but resolved the problem. I wanted to share in
> case anyone else had this problem.
>
> Right after building everything in runtime/Match it starts trying to use
> bigloo to generate the .c files for the files in runtime/Lalr
>
>
> gcc -I/proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/lib/4.0a
> -O3 -fPIC
> -I/proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/gc/gc-7.2d/include
> -c -o Match-s2cfun.o objs/obj_u/Match/s2cfun.c && \
> mv Match-s2cfun.o objs/obj_u/Match/s2cfun.o
> /proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/bin/bigloo -srfi
> enable-pcre -srfi bigloo-unsafe -O3 -fcfa-arithmetic -q +rm -lib-dir
> /proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/lib/4.0a -mklib
> -cc gcc -fsharing -q -no-hello -copt -fPIC -unsafe -safee -O4 -c
> Lalr/driver.scm -indent -o objs/obj_u/Lalr/driver.c
> make[4]:
> /proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/bin/bigloo:
> Command not found
> make[4]: *** [objs/obj_u/Lalr/driver.c] Error 127
>
> I see that the .c files are already in objs/obj_u/Lalr:
>
> make[1]: Leaving directory
> `/proj/samson/user/tdukes/Downloads/tmp/bigloo4.0a-mod/runtime'
> make: *** [boot] Error 2
> bash-4.2$ ls runtime/objs/obj_u/Lalr/
> driver.c gen.c global.c lalr.c rewrite.c util.c
> bash-4.2$
>
> I couldn't understand the Makefile well enough to see why make is trying
> to rebuild them.
>
> I looked more closely at the time of the files: (this is from different
> directory, but has the same problem)
>
> bash-4.2$ ls -l runtime/objs/obj_u/R5rs/
> total 220
> -rw-r----- 1 tdukes design 218259 Aug 2 14:20 syntax.c
> bash-4.2$ ls -l runtime/R5rs
> total 28
> -rw-r----- 1 tdukes design 20738 Aug 2 14:21 syntax.scm
> bash-4.2$
>
> The .sch file is newer than the .c file. After touching the *.c files
> the build proceeded.
>
> bash-4.2$ touch runtime/objs/obj_u/R5rs/*.c
> bash-4.2$ make
>
> I had to do this for several directories to get them to build.
> Eventually the build finished and after running
>
> make test
>
> responded with
>
> All tests executed...
> all succeeded
>
> I have never had this problem before. Should the tar be extracted with
> something other than
>
> tar -xvzf ../bigloo4.0a.tar.gz
>
> so that the file times are preserved? The .c files need to be newer than
> the .scm files until bigloo is built.
In order to bootstrap Bigloo on a machine in which it is not already
installed, the C files have to be compiled first. That is, the Bigloo
library is first built out the runtime C files. In a second step, the
compiler is built out of the C files located in the comptime
directory. During a third stage, the libraries are built using the
bootstrapped Bigloo compiler. As you noticed, preserving the file dates
is mandatory to enable make to bootstrap successfully. If the dates are
wrong, make will try to obtain the .o files out of the .scm files and
not the .c files. Which is obviously impossible before Bigloo is already
bootstrapped.
In order to produce all the pre-compiled C files I use a bootstrap Bigloo
on my machine. All these C files are bundled into the Bigloo tarball file.
Checking what bigloo4.0a.tar.gz provides, I have found:
-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
$ ls -lt --time-style=full-iso {objs/obj_u/R5rs/,R5rs}
objs/obj_u/R5rs/:
total 220
-rw-r----- 1 serrano users 218259 2013-01-24 17:07:30.000000000 +0100 syntax.c
R5rs:
total 24
-rw-r----- 1 serrano users 20738 2013-01-24 17:07:03.000000000 +0100 syntax.scm
-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
As you see, in the plain tarball file syntax.scm is older than syntax.c,
which is what is expected. Could it be that you have untar the 4.0a
tarball twice in the same directory? This could explain why you got the
dates messed up.
--
Manuel