[LispM-Hackers] Compile problems

James A. Crippen james@unlambda.com
05 Oct 2001 13:30:31 -0800


For a good time try the following:

  ## Get a fresh copy of the sources.
  $ cvs -d :pserver:jrh@kappa.unlambda.com:/home/cvsroot checkout e3
  [...]
  ## Compile.
  $ cd e3
  $ make
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c app.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c band.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c e3.cc
  make: *** No rule to make target `error.h', needed by `error.o'.  Stop.
  
That's because the error.* and throwable.* targets are still in the
Makefile, but have been flushed.  Mea culpa, and I'll commit a new
version of the Makefile that fixes this RSN.  Editing those out, we
continue:

  $ make cycle
  rm -f e3 app.o band.o e3.o error.o lispm.o macroop.o mainops.o memmap.o memobj.o physmemregion.o throwable.o types.o word.o
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c app.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c band.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c e3.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c lispm.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c macroop.cc
  make: *** No rule to make target `macros.h', needed by `mainops.o'.  Stop.

This make error is due to some crufty file "macros.h" listed in
depend.mk.  Either 'make depend' or editing the depend.mk file fixes
this.  Continuing,

  $ make cycle
  rm -f e3 app.o band.o e3.o lispm.o macroop.o mainops.o memmap.o memobj.o physmemregion.o types.o word.o
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c app.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c band.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c e3.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c lispm.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c macroop.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c mainops.cc
  mainops.cc:3: macros.h: No such file or directory
  make: *** [mainops.o] Error 1

Damn, that "macros.h" file is still included in mainops.cc.  Flushing
it, we continue:

  $ make cycle
  rm -f e3 app.o band.o e3.o lispm.o macroop.o mainops.o memmap.o
  memobj.o physmemregion.o types.o word.o
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c app.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c band.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c e3.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c lispm.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c macroop.cc
  g++ -O0 -ggdb3 -pg -Wall -DPARANOID -c mainops.cc
  mainops.cc: In function `static void e3MacroOpTemplateClass<68>::execute<68>(e3MacroOpCodeEngine *)':
  mainops.cc:133: invalid operands `const char[55]' and `int' to binary `operator <<'
  mainops.cc:133: implicit declaration of function `int E3ThrowError(...)'
  mainops.cc:138: implicit declaration of function `int E3NotYetImplemented(...)'
  mainops.cc:153: invalid operands `const char[55]' and `int' to binary `operator <<'
  mainops.cc:161: invalid operands `const char[56]' and `int' to binary `operator <<'
  mainops.cc:193: invalid operands `const char[65]' and `int' to binary `operator <<'
  mainops.cc:206: invalid operands `const char[52]' and `int' to binary `operator <<'
  mainops.cc:206: implicit declaration of function `int E3FatalError(...)'
  mainops.cc:212: invalid operands `const char[56]' and `int' to binary `operator <<'
  mainops.cc:216: invalid operands `const char[55]' and `int' to binary `operator <<'
  make: *** [mainops.o] Error 1

(Sorry for the long lines, it's GCC's fault.)

It appears we have some wonderful little errors here.  Problem is, I
don't get what E3ThrowError, E3NotYetImplemented, and E3FatalError are
supposed to do.  I could write them, but what are their actions (and
where should they live)?

Not sure what the cruft about invalid operands to 'operator <<' are.
Obviously E3ThrowError, etc are supposed to be taking some sort of
cout but I don't quite grok the idea.  Can you explicate, JM?

And what exactly was 'macros.h' supposed to do?  Was it something that
didn't get checked in?

I get the funny idea that 'macros.h' contained those error functions
as macros to cout.  Right?

'james

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.