[tex-live] Initial installing ptex package reports errors

.麻那水無 axnnoindexr11 at gmail.com
Mon May 1 01:55:52 CEST 2017


Dear tex-live list members,

I have a tlmgr (and fmtutil) bug.  However, I cannot find the solution
for fixed this bug.
I want feedback (, and a patch to fix tlmgr and fmtutil sources).


When I installed ptex package on texlive 2017 pretest, I got below errors:

```
# tlmgr install ptex
tlmgr: package repository http://ftp.math.utah.edu/pub/tlpretest (verified)
...
regenerating fmtutil.cnf in /usr/local/texlive/2017/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine eptex ...

tlmgr: fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine ptex failed (status 1), output:
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil:   /usr/local/texlive/2017/texmf-dist/web2c/fmtutil.cnf
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /usr/local/texlive/2017/texmf-config/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /usr/local/texlive/2017/texmf-var/web2c
fmtutil [INFO]: --- remaking ptex with ptex
fmtutil [ERROR]: not building ptex due to missing engine ptex.
fmtutil [INFO]: Disabled formats: 1
fmtutil [INFO]: Not selected formats: 20
fmtutil [INFO]: Failed to build: 1 (ptex/ptex)
fmtutil [INFO]: Total formats: 22
fmtutil [INFO]: exiting with status 1
...
tlmgr: package log updated: /usr/local/texlive/2017/texmf-var/web2c/tlmgr.log
tlmgr: An error has occurred. See above messages. Exiting.
# tlmgr install ptex
tlmgr: package repository http://ftp.math.utah.edu/pub/tlpretest (verified)
tlmgr install: package already present: ptex
```

This error raised by
https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl?view=markup#l630.

tlmgr runs fmtutil when you install some package including engines.
Because TLUtils::which search only in $PATH env, fmtutil misses engine
installed by tlmgr in texlive local.

This bug can be fixed by adding texlive local bin directory to PATH env:

```
# export PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH
# tlmgr install ptex
tlmgr: package repository http://ftp.math.utah.edu/pub/tlpretest (verified)
...
regenerating fmtutil.cnf in /usr/local/texlive/2017/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine ptex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine ptex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine eptex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit
--no-error-if-no-format --byengine eptex.
tlmgr: package log updated: /usr/local/texlive/2017/texmf-var/web2c/tlmgr.log
```

However, I'm a `tlmgr path add` user.  So, I'm finding another solutions.
The path action of tlmgr adds symlinks on /usr/local/bin.  That means:

```
# tlmgr install ptex
fmtutil raised errors
# tlmgr path add
# tlmgr install --reinstall ptex
no error
```

1. When `tlmgr install ptex`, tlmgr creates
/usr/local/texlive/2017/bin/x86_64-linux/ptex
2. Initial `fmtutil-sys ... --byengine ptex` miss local ptex script,
so, raise error
3. `tlmgr path add` creates /usr/local/bin/ptex ->
/usr/local/texlive/2017/bin/x86_64-linux/ptex
4. Second `fmtutil-sys ... --byengine ptex` by `tlmgr install
--reinstall ptex` find the symlink for the local ptex

Above steps are all.

I think TLUtils::which should also search texlive local directory
($Master/bin/$arch), but, I understand the fixing affects widely, too.

Is there anyone having the best solution?

Regards,

Nishiyama Shun,
A user of TeXLive


More information about the tex-live mailing list