[M3devel] m3cgc1: fatal error: *** bad M3CG version stamp (0x100), expected 0x110

Rodney M. Bates rodney_bates at lcwb.coop
Thu May 28 17:01:21 CEST 2015


On 05/28/2015 06:49 AM, John Marino wrote:
> I got stuck again trying to build the latest on FreeBSD.
>
> 1. tar extracted to working directory along with a bootstrap compiler
> 2. CM3 and CM3_INSTALL defined in environment
> 3. executed scripts/python/upgrade.py
>
> result:
> http://leaf.dragonflybsd.org/~marino/m3.log
>
> I could guess that something is picking up a bootstrap component instead
> of a newly built one.

Yes.

   >> m3cgc1: fatal error:  *** bad M3CG version stamp (0x100), expected 0x110

means it is trying to compile using a new cm3cg backend and an old cm3 front end.
I just added this error message after Olaf had this problem.  (Otherwise it would
have failed anyway, but with a less informative message.)

> I guess it's trying to build the c backend?
>

It finished the C backend and was trying to build m3core, using the inconsistent
compiler.  Usually, neither cm3 nor cm3cg is copied to the bin directory,
even when doing a ship, in order to avoid this, which is an exception.  For all
other executables, ship copies them to the bin directory.  The shell script
scripts/install-cm3-compiler.sh is then run manually, after both cm3 and cm3cg
are compiled, to copy them to bin atomically (sort of).

I don't know why that happened.  I don't have experience with the Python scripts.

Jay?

Also, this script built the compiler before the support libraries m3core and
libm3.  I think there may have been one bootstrap scenario where this was the
way it needed to be done, but usually it is the other way around--these two
libraries first.


> Am I doing some kind of obvious mistake?
>

No, it's a bootstrap barrier.  These pop up somewhat regularly.  We all usually
just build from the most recent development build, which works for getting new
things tried out initially.  But we need to make a habit of regularly rebuilding
from the previous release to flush these out.

You might try scripts/do-cm3-front.sh realclean
               scripts/do-cm3-front.sh buildship

(I usually save /usr/local/cm3/bin/cm3 and /usr/local/cm3/bin/cm3cg at this point.
  The step below does it somewhat redundantly, but only one level, unless the
  version number changes.)

               scripts/install-cm3-compiler.sh upgrade.

 From here, you are using the new compiler.

               scripts/do-cm3-<whatever-else-you-want>.sh buildship

That this works, starting with the previous release compiler, is my criterion
for having removed bootstrap barriers.



> John
>

-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the M3devel mailing list