[tex-live] Issues with texlive locating necessary files

Mirko Vogt tex at nanl.de
Sat Mar 14 02:01:29 CET 2015


Hey,

I'm still trying get texlive running within OpenWrt and at least passed
all (cross-)compiling issues so far - facing the runtime now.

I have two issues right now which might or might not be related to each other.

   root at OpenWrt:~# pdftex foo.tex
   This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/devno) (preloaded format=pdftex)
    restricted \write18 enabled.
   
   kpathsea: Running mktexfmt pdftex.fmt
   /usr/bin/mktexfmt: line 1027: //texmf-dist/texconfig/tcfmgr: not found
   fmtutil: config file `fmtutil.cnf' not found.
   I can't find the format file `pdftex.fmt'!

According to source it tries to find tcfmgr in $MT_TEXMFMAIN/texmf-dist/texconfig/

$MT_TEXMFMAIN seems to be derived from $TEXMFMAIN which I can set as an
environment variable:

   root at OpenWrt:~# export TEXMFMAIN="/usr/share/texmf-dist"
   root at OpenWrt:~# pdftex foo.tex
   This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/devno) (preloaded format=pdftex)
    restricted \write18 enabled.
   
   kpathsea: Running mktexfmt pdftex.fmt
   tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found (ls-R missing?).
   fmtutil: config file `fmtutil.cnf' not found.
   I can't find the format file `pdftex.fmt'!

Now it can't find tcfmgr.map in $TEXMFMAIN/texconfig, which however is
actually right there:

   root at OpenWrt:~# ls -l $TEXMFMAIN/texconfig/tcfmgr.map
   -rw-r--r--    1 root     root           401 Mar 13 18:56 /usr/share/texmf-dist/texconfig/tcfmgr.map

Responsible code for locating the file tcfmgr.map seems to be located in setupMap() in tcfmgr:

   setupMap()
   {
     case $setupMapOK in
       "") : ;;
       *) (exit 0); return 0;;
     esac
                                                                    
     case $TFC_MAP in
       "") TFC_MAP=`(kpsewhich -progname=texconfig -format='other text files' tcfmgr.map) 2>/dev/null`;;
     esac
                                                                                                        
     case $TFC_MAP in
       "") abort "config file \`tcfmgr.map' (usually in \$TEXMFMAIN/texconfig) not found (ls-R missing?)";;
     esac
                                                                                                           
     if test ! -f "$TFC_MAP"; then
       abort "config file \`TFC_MAP' does not exist"
     fi
     setupMapOK=true
   }

The switch-case checks two times whether $TFC_MAP is an empty string.
If that's the case the first time it tries to set it with:

   TFC_MAP=`(kpsewhich -progname=texconfig -format='other text files' tcfmgr.map) 2>/dev/null`

That command run by itself prints nothing (-> empty string) on stdout and returns 1 as exit code.

That's why the second test fails and prints respective error message.

Question 1) Is setting $TEXMFMAIN as an environment variable the proper
way? How do other distributions achieve the prefix-path being set correctly?

Question 2) What is necessary to make the map file being found by tcfmgr?

Thanks a lot and have a nice weekend!

   mirko


More information about the tex-live mailing list