[M3devel] bootstrap and Compiler.i3 change?

Jay jayk123 at hotmail.com
Fri Apr 18 12:19:07 CEST 2008


What is the deal with building and the Compiler.i3 change?
I had difficulty here, despite using upgrade.py and upgrade.sh that have gotten things correct before (and I understand what they are doing).

I ended up doing something that didn't make sense to me and I got past it, but then I had another problem.

I ran ugprade until it failed -- it built/shipped compiler and m3core; then libm3 fails.
Then I think I ran either do-cm3-front.py, or I rolled back tools and then ran do-cm3-front.py.

I understand the change to Compiler.i3. It should be ok. It is in m3core, build/ship that and then build libm3 should work, right?

The code that is actually using Compiler.i3 is for fairly unused targets, however it actually sets a good example I intend to follow.
Rather than probing for what Pathname.Join returns a\b or a/b, you can check Compiler.Platform or whatnot directly.
But if there are more uses of this, outside m3core, this build problem needs to be understood.
Probably I'm just missing something?

The other problem I ran into was, merely running a particular cm3 with no parameters, crash in module initialization:

(gdb) r
Starting program: /home/jkrell/cm3/bin/cm3
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1210100032 (LWP 32329)]


***
*** runtime error:
***    Attempt to reference an illegal memory location.
***    file "../src/runtime/common/RTAllocator.m3", line 203
***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1210100032 (LWP 32329)]
0xb7f6d410 in ?? ()
(gdb) bt
#0  0xb7f6d410 in ?? ()
#1  0xbfa24f6c in ?? ()
#2  0x00000006 in ?? ()
#3  0x00007e49 in ?? ()
#4  0xb7e1e811 in raise () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7e1ffb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#6  0x082c4cfe in RTOS__Crash () at ../src/runtime/POSIX/RTOS.m3:20
#7  0x082ba6c5 in RTProcess__Crash (M3_Bd56fi_msg=0x0) at ../src/runtime/common/RTProcess.m3:65
#8  0x082b7e8e in RTError__EndError (M3_AicXUJ_crash=1 '\001')
    at ../src/runtime/common/RTError.m3:118
#9  0x082b7b52 in RTError__MsgS (M3_AJWxb1_file=0x8359a68, M3_AcxOUs_line=203,
    M3_Bd56fi_msgA=0x835cd48, M3_Bd56fi_msgB=0x8358f14, M3_Bd56fi_msgC=0x835cd48)
    at ../src/runtime/common/RTError.m3:40
#10 0x082b8314 in RTException__Crash (M3_Cblw37_a=0xbfa252d8, M3_AicXUJ_raises=0 '\0',
    M3_AJWxb1_rte=0x8358d00) at ../src/runtime/common/RTException.m3:79
#11 0x082b801d in RTException__DefaultBackstop (M3_Cblw37_a=0xbfa252d8, M3_AicXUJ_raises=0 '\0')
    at ../src/runtime/common/RTException.m3:39
#12 0x082b7f59 in RTException__InvokeBackstop (M3_Cblw37_a=0xbfa252d8, M3_AicXUJ_raises=0 '\0')
    at ../src/runtime/common/RTException.m3:25
#13 0x082c5f90 in RTException__Raise (M3_Cblw37_act=0xbfa252d8)
    at ../src/runtime/ex_frame/RTExFrame.m3:29
#14 0x082b80b6 in RTException__DefaultBackstop (M3_Cblw37_a=0xbfa252d8, M3_AicXUJ_raises=0 '\0')
    at ../src/runtime/common/RTException.m3:47
#15 0x082b7f59 in RTException__InvokeBackstop (M3_Cblw37_a=0xbfa252d8, M3_AicXUJ_raises=0 '\0')
    at ../src/runtime/common/RTException.m3:25
#16 0x082c5f90 in RTException__Raise (M3_Cblw37_act=0xbfa252d8)
    at ../src/runtime/ex_frame/RTExFrame.m3:29
#17 0x082a380f in RTHooks__ReportFault (M3_AJWxb1_module=0x8359aa0, M3_AcxOUs_info=6500)
    at ../src/runtime/common/RTHooks.m3:110
#18 0x082a5c81 in _m3_fault (M3_AcxOUs_arg=6500)
---Type  to continue, or q  to quit---
#19 0x082a497e in RTAllocator__GetTracedObj (M3_Eic7CK_def=0x0)
    at ../src/runtime/common/RTAllocator.m3:203
#20 0x082a4524 in RTHooks__AllocateTracedObj (M3_AJWxb1_defn=0x0)
    at ../src/runtime/common/RTAllocator.m3:131
#21 0x08272fae in Pathname__Decompose (M3_Bd56fi_pn=0xb7dbb02c)
    at ../src/os/POSIX/PathnamePosix.m3:31
#22 0x08104d95 in PathRepr__Root (M3_Bd56fi_pn=0xb7dbb02c) at PathReprCommon.m3:37
#23 0x08104e7f in PathReprCommon_M3 (M3_AcxOUs_mode=1) at PathReprCommon.m3:45
#24 0x082b6e9b in RTLinker__RunMainBody (M3_DjPxE3_m=0x830b380)
    at ../src/runtime/common/RTLinker.m3:399
#25 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x830a280)
    at ../src/runtime/common/RTLinker.m3:379
#26 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x8309c00)
    at ../src/runtime/common/RTLinker.m3:379
#27 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x8308360)
    at ../src/runtime/common/RTLinker.m3:379
#28 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x8305c00)
    at ../src/runtime/common/RTLinker.m3:379
#29 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x82f91e0)
    at ../src/runtime/common/RTLinker.m3:379
#30 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x82f89a0)
    at ../src/runtime/common/RTLinker.m3:379
#31 0x082b6b67 in RTLinker__RunMainBody (M3_DjPxE3_m=0x82fccc0)
    at ../src/runtime/common/RTLinker.m3:379
#32 0x082b5911 in RTLinker__AddUnitI (M3_DjPxE3_m=0x82fccc0)
    at ../src/runtime/common/RTLinker.m3:113
#33 0x082b599f in RTLinker__AddUnit (M3_DjPxE5_b=0x808e9a2)
    at ../src/runtime/common/RTLinker.m3:122
#34 0x08057038 in main (argc=1, argv=0xbfa25eb4, envp=0xbfa25ebc) at _m3main.mc:4

which I'll look into further if I still see it, later..

 - Jay


More information about the M3devel mailing list