On Mon, Nov 19, 2012 at 4:34 AM, Aditya Mahajan wrote:
> On Sun, 18 Nov 2012, Bill Meahan wrote:
>
>>> 2. Something is messed up in $HOME/texmf or $HOME/.texlive2012. Rename
>>> these directories to something different and try again.
>>
>>
>> Done that several times -- no dice
>
> I normally do not use TL, but looked into it, and the texmfcnf.lua script
> distributed with texlive does not look right. I am attaching the output of
> mtxrun --generate that I get. Note the following liines:
>
> resolvers       | resolving | variable 'SELFAUTOLOC' set to '/usr/bin'
> resolvers       | resolving | variable 'SELFAUTODIR' set to '/usr'
> resolvers       | resolving | variable 'SELFAUTOPARENT' set to '.'

It looks as if you were using Debian/Ubuntu? Or any other flavour of
Linux with a native TeX Live package?

> resolvers       | resolving | variable 'TEXMFCNF' set to ''
> resolvers       | resolving | variable 'TEXMF' set to ''
> resolvers       | resolving | variable 'TEXOS' set to '/usr'
> ....
> resolvers       | resolving | found configuration file
> '/usr/share/texmf/web2c/texmfcnf.lua'
> ....
> resolvers       | resolving | loading configuration file
> 'selfautodir:/share/texmf/web2c/texmfcnf.lua'
> ...

> mtxrun --generate

resolvers       | resolving | variable 'SELFAUTOLOC' set to
'/usr/local/texlive/2012/bin/x86_64-darwin'
resolvers       | resolving | variable 'SELFAUTODIR' set to
'/usr/local/texlive/2012/bin'
resolvers       | resolving | variable 'SELFAUTOPARENT' set to
'/usr/local/texlive/2012'
resolvers       | resolving | variable 'TEXMFCNF' set to ''
resolvers       | resolving | variable 'TEXMF' set to ''
resolvers       | resolving | variable 'TEXOS' set to 'bin'
resolvers       | resolving |
resolvers       | resolving | using configuration specification
'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf/web2c,selfautoparent:/../texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf/web2c}'
resolvers       | resolving |
...
resolvers       | resolving | found configuration file
'/usr/local/texlive/2012/texmfcnf.lua'
...
resolvers       | resolving | found configuration file
'/usr/local/texlive/2012/texmf/web2c/texmfcnf.lua'
resolvers       | resolving |
resolvers       | resolving | loading configuration file
'selfautoparent:/texmfcnf.lua'
resolvers       | resolving |
resolvers       | resolving | loading configuration file
'selfautoparent:/texmf/web2c/texmfcnf.lua'

> Now, the /usr/share/texmf/web2c/texmfcnf.lua file says:
>
>  TEXMFSYSVAR     = "selfautoparent:texmf-var",
>  TEXMFVAR        = "home:.texlive2012/texmf-var",
> ....
>  TEXMFMAIN       = "selfautoparent:texmf",
>  TEXMFDIST       = "selfautoparent:texmf-dist",
> ....
>
> Note from the mtxrun that selfautoparent is set to '', therefore, TEXMFMAIN
> is set to 'texmf' and TEXMFDIST is set to 'texmf-dist'. And therefore,
> `mtxrun --generate` is not scanning the right trees, therefore does not
> build a cache of the right trees, and consequently, cannot find
> mtx-context.lua.
>
> To check my theory, I followed the following steps:
>
> 1. Create a directory ~/mytexmfcnf and copied the texmfcnf.lua file from
> /usr/share/texmf/web2c/ to this directory.
>
> 2. Open ~/mytexmfcnf/texmfcnf.lua and change
>
>    %s/selfautoparent:/\/usr\/share\/
>
> 3. Run
>
>    TEXMFCNF=~/mytexmfcnf mtxrun --generate
>
> 4. Run
>
>    TEXMFCNF=~/mytexmfcnf context --version
>
> which then gives
>
> mtx-context     | ConTeXt Process Management 0.52
> mtx-context     |
> mtx-context     | main context file:
> /usr/share/texmf-dist/tex/context/base/context.mkiv
> mtx-context     | current version: 2012.05.30 11:26
>
> So I wonder how does context (MkIV) work at all with TL2012!

Maybe it just doesn't work with your linux box :P
One explanation could be that texmfcnf.lua hasn't been configured properly.
It works with plain TeX Live with default installation.

MacPorts would do the following:

post-patch {
    foreach x {texmf.cnf.d/10paths.cnf texmfcnf.lua texlive-update-cnf} {
        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXMFMAIN@@|${texlive_texmfmain}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXMFPORTS@@|${texlive_texmfports}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXMFLOCAL@@|${texlive_texmflocal}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXMFSYSVAR@@|${texlive_texmfsysvar}|g"
${worksrcpath}/${x}
        reinplace "s|@@TEXMFSYSCONFIG@@|${texlive_texmfsysconfig}|g"
${worksrcpath}/${x}
        reinplace "s|@@TEXMFHOME@@|${texlive_texmfhome}|g" ${worksrcpath}/${x}
        reinplace "s|@@TEXLIVE_BINDIR@@|${texlive_bindir}|g" ${worksrcpath}/${x}
    }
}


To Bill: can you try
    which luatex context
    sudo which luatex context
and in particular because you have TeX Live installed in home dir, I
would suggest not to run any command as sudo at all. In particular,
don't try to run "mtxrun --generate" or "context --make" as sudo. It
might be that the cache is not writable by you any more. But then
again - something seems to be wrong with your configuration. How
exactly did you install TeX Live.  Where do you have any texmfcnf.lua?
Please also post the output of a working ConTeXt run and/or "mtxrun
--generate", in particular the part that Aditya posted (definition of
SELFAUTOLOC etc.).

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to