[M3devel] The undefined ROOT problem, rebuilding cm3

Tony Hosking hosking at cs.purdue.edu
Fri Nov 14 03:50:07 CET 2008


I generally run with buildship for these commands.

On 13 Nov 2008, at 20:01, Rodney M. Bates wrote:

> Jay wrote:
>> I don't know, but something doesn't seem right.
>> D:\cm3>dir /s/b bund* *ov* *temp* *tmp*
>> ...
>> D:\cm3\pkg\libm3\src\bundleintf\bundle.tmpl
>> if defined("M3BUNDLE")
>>  _M3BUNDLE = M3BUNDLE
>> else
>>  _M3BUNDLE = BIN_USE & SL & "m3bundle"
>> end
>> D:\dev2\cm3.2>dir /s/b /a-d bund*tmp*
>> D:\dev2\cm3.2\doc\help\gen_html\libm3\src\bundleintf\bundle.tmpl.html
>> D:\dev2\cm3.2\m3-libs\libm3\src\bundleintf\bundle-ov.tmpl
>> D:\dev2\cm3.2\m3-libs\libm3\src\bundleintf\bundle.tmpl
>> :\dev2\cm3.2>dir /s/b /a-d bund*tmp*
>> :\dev2\cm3.2\doc\help\gen_html\libm3\src\bundleintf\bundle.tmpl.html
>> :\dev2\cm3.2\m3-libs\libm3\src\bundleintf\bundle-ov.tmpl
>> :\dev2\cm3.2\m3-libs\libm3\src\bundleintf\bundle.tmpl
>> bundle-ov.tmp:
>> if defined("M3BUNDLE")
>>  _M3BUNDLE = M3BUNDLE
>> else
>>  _M3BUNDLE = format(ROOT & SL & "m3-tools" & SL & "m3bundle" & SL &  
>> "%s" &
>>                     SL & "m3bundle", BUILD_DIR)
>>  M3BUNDLE = _M3BUNDLE
>> end
>> => this file requires ROOT or M3BUNDLE like you say, but this isn't  
>> normally used.
>> D:\dev2\cm3.2>dir /s/b m3makefile | findstr /i bundleintf
>> D:\dev2\cm3.2\m3-libs\libm3\src\bundleintf\m3makefile
>> if defined("_M3BUNDLE_OVERRIDE")
>>  template  ("bundle-ov")
>> end
>> template  ("bundle")
>> You defined _M3BUNDLE_OVERRIDE somewhere along the way?
>
> Maybe I should have given more detail on the chain of events.
> You got most of it.  The missing piece is:
>
> m3-libs/libm3/src/m3overrides contains:
> _M3BUNDLE_OVERRIDE = "T"
>
> So, 'do-cm3-*.sh build' runs 'cm3 -build -override', causing the
> above file of quake code to be interpreted, defining  
> _M3BUNDLE_OVERRIDE,
> and the rest is as you have noted.
>
>> Try replacing the one file with the other..
>>  - Jay
>> > Date: Thu, 13 Nov 2008 17:29:17 -0600
>> > From: rodney.bates at wichita.edu
>> > To: m3devel at elegosoft.com
>> > Subject: [M3devel] The undefined ROOT problem, rebuilding cm3
>> >
>> > Here is how the undefined ROOT problem happens when trying to  
>> rebuild
>> > cm3 with itself.
>> >
>> > I had been making the assumption that commands build, ship,  
>> clean, when
>> > supplied to the do-cm3-*.sh scripts, did the same things as -build,
>> > -ship, -clean supplied to the cm3 command. Not so.
>> >
>> > build actually does cm3 -build -override, as do buildlocal and  
>> empty
>> > commands to the scripts. clean does cm3 -clean -override, as does  
>> cleanlocal.
>> > There is a buildglobal command that does -build without - 
>> override, but
>> > it also does a ship as well. There appears to be no way to just  
>> build,
>> > without either overriding or shipping.
>> >
>> > So, I have been running do-cm3-*.sh with no argument (and  
>> sometimes build).
>> > This starts a chain of events that eventually leads to an  
>> installed libm3
>> > that always executes quake script bundle-ov.tmpl, and it requires  
>> that
>> > either M3BUNDLE or ROOT be defined, neither of which normally is.  
>> This
>> > will happen trying to compile any program that uses libm3, which  
>> is just
>> > about everything.
>> >
>> > We should document this somewhere.




More information about the M3devel mailing list