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

Olaf Wagner wagner at elegosoft.com
Thu May 28 23:05:54 CEST 2015


On Thu, 28 May 2015 20:14:49 +0000
Jay K <jay.krell at cornell.edu> wrote:

>  > 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.
> 
>  This is very deliberate and should always work, when doing a native upgrade. 
>  It is true it is not always required. 
>  When doing a "clean" cross build, it is true that it is backwards. 
>  It is required when upgrading from an older build. 
> 
>  Native upgrades start at least with a working compiler and its matching runtime.
>  Cross builds start with a working host compiler and nothing for the target -- so they do start with m3core.

I've had a look at the build log, and I think the problem in this case
with upgrade.py might be that it doesn't install the new backend, but
only the new frontend:

[...]
Not shipping cm3cg.
--- shipping from AMD64_FREEBSD ---

missing ".M3SHIP" file, build the package first.
dula3/work/bootstrap/bin/cm3    -build -DROOT=/mech/construction/mech/ptrees/default/lang/modula3/work/cm3-8c1b86a +++
 ==> /mech/construction/mech/ptrees/default/lang/modula3/work/cm3-8c1b86a/m3-sys/m3cc done

 +++ /mech/construction/mech/ptrees/default/lang/modula3/work/bootstrap/bin/cm3  -ship -DROOT=/mech/construction/mech/ptrees/default/lang/modula3/work/cm3-8c1b86a +++
 ==> /mech/construction/mech/ptrees/default/lang/modula3/work/cm3-8c1b86a/m3-sys/m3cc done

mkdir -p /mech/construction/mech/ptrees/default/lang/modula3/work/stage/usr/local/bin
cp -Pv /mech/construction/mech/ptrees/default/lang/modula3/work/cm3-8c1b86a/m3-sys/cm3/AMD64_FREEBSD/cm3 /mech/construction/mech/ptrees/default/lang/modula3/work/stage/usr/local/bin/cm3
[...]

In the upgrade.sh script I used install-cm3-compiler.sh, which always
installs both. In m3-sys/m3cc/src/m3makefile I find the following code:

    if equal($INSTALL_CM3_IN_BIN, "yes")
      deriveds("", ["cm3cg", "cm3cg.exe"])
      write ( "Forced ship of cm3cg." & CR) 
      BindExport (AppendExeExtension ("cm3cg"))
      if DoMipsTfile
        BindExport ("mips-tfile")
      end
    else 
      write ( "Not shipping cm3cg." & CR) 
    end 

So perhaps simply setting INSTALL_CM3_IN_BIN=yes in the environment
will fix that problem?

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com 
               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



More information about the M3devel mailing list