[M3devel] CM3 on Mac OS X Tiger

Mika Nystrom mika at async.caltech.edu
Tue Oct 21 13:05:01 CEST 2008


Hello everyone,

Sorry if I have asked this before---I feel I must have, and Tony
probably answered it, too, but I can't find it anywhere in my email
archives.

It looks like I finally upgraded my Mac to Tiger a half year ago,
and everything broke.  (Modula-3, emacs, make, etc etc etc etc.)
I am finally getting around to fixing it.  Now I am trying to
compile CM3 in accordance with Tony's instructions as of June 24, 2007:

(short quote here)
> cd ~/cm3-cvs
> mkdir boot
> cd boot
> tar xzvf ../cm3-min-POSIX-FreeBSD4-d5.3.1-2005-10-05.tgz
> ./cminstall

Now you will have some kind of cm3 installed, presumably in /usr/
local/cm3/bin/cm3.

Make sure you have a fresh CVS checkout in directory cm3 (let's
assume this is in your home directory ~/cm3).  Also, make sure you
have an up-to-date version of the CM3 backend compiler cm3cg
installed by executing the following:

STEP 0:

export CM3=/usr/local/cm3/bin/cm3
cd ~/cm3/m3-sys/m3cc
$CM3
$CM3 -ship

You can skip this last step if you know your backend compiler is up
to date.

Now, let's build the new compiler from scratch (this is the sequence
I use regularly to test changes to the run-time system whenever I
make them):

STEP 1:

cd ~/cm3/m3-libs/m3core
$CM3
$CM3 -ship
(end short quote, there's much more)

What happens is that when building m3core, my compiler is building
it against the interfaces in /usr/local/cm3, NOT the interfaces
within m3core itself:

--- building in PPC_DARWIN ---

ignoring ../src/m3overrides

new source -> compiling RTCollector.m3
"../src/runtime/common/RTCollector.m3", line 2914: unknown qualification '.' (AMD64_LINUX)
"../src/runtime/common/RTCollector.m3", line 2915: unknown qualification '.' (SPARC32_LINUX)
"../src/runtime/common/RTCollector.m3", line 2916: unknown qualification '.' (SPARC64_OPENBSD)
"../src/runtime/common/RTCollector.m3", line 2917: unknown qualification '.' (PPC32_OPENBSD)
4 errors encountered
stale imports -> compiling RTDebug.m3

Fatal Error: bad version stamps: RTDebug.m3

version stamp mismatch: Compiler.Platform
  <df3c2b13d1d385ee> => RTDebug.m3
  <da77490d024222ef> => Compiler.i3  
version stamp mismatch: Compiler.ThisPlatform
  <8b5a6f513e082750> => RTDebug.m3
  <8e110d4fed998051> => Compiler.i3  

I feel like I should REALLY know the answer to this, but how do I 
get the compiler to use only the local sources and not attempt
to compile things with reference to the already-installed 
interfaces?

    Mika



More information about the M3devel mailing list