[tlbuild] A strange probem with TL2016 mendex binary
Nikola Lečić
nikola.lecic at anthesphoria.net
Tue Apr 4 21:04:15 CEST 2017
Hello all,
A TeX Live 2016 FreeBSD user from Japan sent me a report and analysis
of a strange behaviour of mendex binary. I'm not sure if it's
FreeBSD-specific, but... mendex tries to write to a log file with a
strange extension (I don't know it those symbols actually mean
something in Japanese).
Test files attached. If you run
platex -kanji=euc mendbug.tex
mendex -E -d mendbug.dic mendbug.idx
you will get something like
This is mendex version 2.6f [14-Aug-2009] (euc) (TeX Live 2016).
Scanning dictionary file ./mendbug.dic....done.
Scanning input file mendbug.idx.
Error: 愛上尾 is no entry in dictionary file in mendbug.idx, line
1....done (0 entries accepted, 1 rejected). 0 entries accepted, 1
rejected.
1 errors, written in mendbug.愛上尾.
^^^^^^^^^^^^^
Nothing written in output file.
Can someone shed some lite on what is going on here?
Excerpts from the anaysis:
-----------------------------------
truss mendex -E -d mendbug.dic mendbug.idx
Then I got an evidence of strange character's as ...
...<snip>...
mwrite(2,"m",1) = 1 (0x1)
ewrite(2,"e",1) = 1 (0x1)
nwrite(2,"n",1) = 1 (0x1)
dwrite(2,"d",1) = 1 (0x1)
bwrite(2,"b",1) = 1 (0x1)
uwrite(2,"u",1) = 1 (0x1)
gwrite(2,"g",1) = 1 (0x1)
.write(2,".",1) = 1 (0x1)
==> <B0>write(2,"\M-0",1) = 1 (0x1)
==> <A6>write(2,"\M-&",1) = 1 (0x1)
==> <BE>write(2,"\M->",1) = 1 (0x1)
==> <E5>write(2,"\M-e",1) = 1 (0x1)
==> <C8>write(2,"\M-H",1) = 1 (0x1)
==> <F8>write(2,"\M-x",1) = 1 (0x1)
.write(2,".",1) = 1 (0x1)
write(2,"\n",1) = 1 (0x1)
Nwrite(2,"N",1) = 1 (0x1)
owrite(2,"o",1) = 1 (0x1)
twrite(2,"t",1) = 1 (0x1)
hwrite(2,"h",1) = 1 (0x1)
iwrite(2,"i",1) = 1 (0x1)
nwrite(2,"n",1) = 1 (0x1)
gwrite(2,"g",1) = 1 (0x1)
write(2," ",1) = 1 (0x1)
wwrite(2,"w",1) = 1 (0x1)
...<snip>...
I traced this table with gdb, if you like please check my trace report.
- - - < - - - - - - < - - - - - - < - - - - - - < - - - - - - < - - - report START
$153 = 0x800e15218 "mendbug.ilg"
(gdb) n
431 cache (kpse, elt, ret);
(gdb) p logfile
$154 = 0x800e15218 “mendbug.ilg"
======= global valuable logfile still OK =====
(gdb) n
434 if (KPATHSEA_DEBUG_P (KPSE_DEBUG_EXPAND))
==== after above line 434 =====vvvvvvv
(gdb) p logfile
$155 = 0x800e15218 "mendbug..”
====^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^=== BROKEN === suffice .ilg ==> .
(gdb) list
429 /* Remember the directory list we just found, in case future calls are
430 made with the same ELT. */
431 cache (kpse, elt, ret);
432
433 #ifdef KPSE_DEBUG
434 if (KPATHSEA_DEBUG_P (KPSE_DEBUG_EXPAND))
435 {
436 DEBUGF1 ("path element %s =>", elt);
437 if (ret)
438 {
==== stack TRACE ====
(gdb) w
#0 kpathsea_element_dirs (kpse=0x642680 <kpse_def_inst>, elt=0x800e56600 ".") at ../../../texk/kpathsea/elt-dirs.c:434
#1 0x000000000041a5ad in path_search (kpse=0x642680 <kpse_def_inst>, path=0x420b9e ".", name=0x800e1cb40 "mendbug.dic", must_exist=1, all=0)
at ../../../texk/kpathsea/pathsearch.c:291
#2 0x000000000041a7b2 in search (kpse=0x642680 <kpse_def_inst>, path=0x420b9e ".", original_name=0x800e170b0 "mendbug.dic", must_exist=1, all=0)
at ../../../texk/kpathsea/pathsearch.c:376
#3 0x000000000041adb4 in kpathsea_path_search (kpse=0x642680 <kpse_def_inst>, path=0x420b9e ".", name=0x800e170b0 "mendbug.dic", must_exist=1)
at ../../../texk/kpathsea/pathsearch.c:577
#4 0x000000000041ae3f in kpse_path_search (path=0x420b9e ".", name=0x800e170b0 "mendbug.dic", must_exist=1)
at ../../../texk/kpathsea/pathsearch.c:598
#5 0x000000000040956d in KP_find_file (info=0x641dd0 <kp_dict>, name=0x800e170b0 "mendbug.dic") at ../../../texk/mendexk/kp.c:40
#6 0x0000000000401eb4 in dicread (filename=0x800e170b0 "mendbug.dic") at ../../../texk/mendexk/convert.c:74
#7 0x000000000040a46e in main (argc=5, argv=0x7fffffffea28) at ../../../texk/mendexk/main.c:303
- - - < - - - - - - < - - - - - - < - - - - - - < - - - - - - < - - - report FINISH
--
Nikola Lečić = Никола Лечић
fingerprint : FEF3 66AF C90E EDC3 D878 7CDC 956D F4AB A377 1C9B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 331 bytes
Desc: OpenPGP digital signature
URL: <http://tug.org/pipermail/tlbuild/attachments/20170404/6bab8758/attachment.sig>
More information about the tlbuild
mailing list