[M3devel] CM3 on Mac OS X Tiger

Tony Hosking hosking at cs.purdue.edu
Tue Oct 21 23:29:07 CEST 2008


Hmm.  Not sure.  Looks like it.

On 21 Oct 2008, at 21:18, Mika Nystrom wrote:

> Hi Tony,
>
> Thanks for helping, as usual!
>
> I ran into this now, is this also a bootstrapping problem?  (Moving
> on to building libm3, cleared out existing PPC_DARWIN, have rebuilt
> m3cc... only see a single version of Compiler.i3 anywhere...)
>
> Here's the log:
>
> [lapdog:~/cm3/m3-libs/libm3] mika% $CM3 && $CM3 -ship
> --- building in PPC_DARWIN ---
>
> ignoring ../src/m3overrides
>
> new source -> compiling Atom.i3
> new source -> compiling AtomList.i3
> new source -> compiling OSError.i3
> new source -> compiling File.i3
> new source -> compiling RegularFile.i3
> new source -> compiling Pipe.i3
> new source -> compiling TextSeq.i3
> new source -> compiling Pathname.i3
> new source -> compiling FS.i3
> new source -> compiling Process.i3
> new source -> compiling Socket.i3
> new source -> compiling Terminal.i3
> new source -> compiling FS.m3
> new source -> compiling Terminal.m3
> new source -> compiling RegularFile.m3
> new source -> compiling Pipe.m3
> new source -> compiling Socket.m3
> new source -> compiling OSConfig.i3
> new source -> compiling OSErrorPosix.i3
> new source -> compiling Fmt.i3
> new source -> compiling OSErrorPosix.m3
> new source -> compiling FilePosix.i3
> new source -> compiling FilePosix.m3
> new source -> compiling FSPosix.m3
> new source -> compiling PipePosix.m3
> new source -> compiling PathnamePosix.m3
> new source -> compiling SocketPosix.m3
>
> Fatal Error: bad version stamps: SocketPosix.m3
>
> version stamp mismatch: Compiler.Platform
>  <df3c2b13d1d385ee> => SocketPosix.m3
>  <da77490d024222ef> => Compiler.i3
> version stamp mismatch: Compiler.ThisPlatform
>  <8b5a6f513e082750> => SocketPosix.m3
>  <8e110d4fed998051> => Compiler.i3
> [lapdog:~/cm3/m3-libs/libm3] mika%
>
> Tony Hosking writes:
>> This is a phase ordering problem that arises when you use an old
>> compiler to compile newer sources.  It really should be fixed
>> somehow.  In any case, the problem is those lines in RTCollector at
>> the bottom (I deleted them yesterday on the main trunk) that refer to
>> values supposedly built in to the compiler (which are not there for
>> the old binary you are using).  I think if you delete those lines  
>> then
>> you should be OK.  Once you have a new compiler bootstrapped (with
>> those configuration values available built in) then you should be  
>> able
>> to compile that code (excepting that I just deleted those lines
>> yesterday).
>>
>>
>> On 21 Oct 2008, at 12:05, Mika Nystrom wrote:
>>
>>> 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