[tex-live] Windows (MSYS2) : kpathsea does not find texmf.cnf

Vincent Torri vincent.torri at gmail.com
Wed Jun 8 22:20:20 CEST 2016


Hello

I am writing a library using the kpathsea library. kpathsea reports,
on Windows, this message:

warning: kpathsea: configuration file texmf.cnf not found in these
directories: etc...

Here are the steps that described what and how I install and use TeX Live:

1) I installed TeX Live 2016 (using install-tl-windows.exe) in the
directory E:\Documents\programmes_x86\texlive, so I have texmf.cnf in
E:\Documents\programmes_x86\texlive\2016

2) just after the installation of TeX Live, I have added the binary
directory to PATH (that is :
E:\Documents\programmes_x86\texlive\2016\bin\win32)

3) As there is only the kpathsea DLL (no import library, no header
file for developping with kpathsea), I have loaded the DLL with
LoadLibrary and retrieve the symbols with GetProcAdress(). The code
can be find here :

https://github.com/vtorri/libdvi/blob/master/src/lib/dvi_kpathsea.c

(lines 281 and after, and the macros are defined lines 230 and after)

4) I test my code with a DVI file using the font files cmr12.tfm and
cmsy10.tfm, with the code of the above file, function
dvi_kpathsea_path_name_get(), line 357.

5) I install my program in /opt/efl_i686/bin, that is :
E:/Documents/MSYS2/opt/efl_i686/bin

6) When I run my program, with MSYS2, the kpathsea message is :

warning: kpathsea: configuration file texmf.cnf not found in these
directories: E:/Documents/MSYS2/opt/efl_i686/bin;E:/Documents/MSYS2/opt/efl_i686/bin/share/texmf-local/web2c;E:/Documents/MSYS2/opt/efl_i686/bin/share/texmf-dist/web2c;E:/Documents/MSYS2/opt/efl_i686/bin/share/texmf/web2c;E:/Documents/MSYS2/opt/efl_i686/bin/texmf-local/web2c;E:/Documents/MSYS2/opt/efl_i686/bin/texmf-dist/web2c;E:/Documents/MSYS2/opt/efl_i686/bin/texmf/web2c;E:/Documents/MSYS2/opt/efl_i686;E:/Documents/MSYS2/opt/efl_i686/share/texmf-local/web2c;E:/Documents/MSYS2/opt/efl_i686/share/texmf-dist/web2c;E:/Documents/MSYS2/opt/efl_i686/share/texmf/web2c;E:/Documents/MSYS2/opt/efl_i686/texmf-local/web2c;E:/Documents/MSYS2/opt/efl_i686/texmf-dist/web2c;E:/Documents/MSYS2/opt/efl_i686/texmf/web2c;E:/Documents/MSYS2/texmf-local/web2c;E:/Documents/MSYS2/opt;E:/Documents/MSYS2/opt/share/texmf-local/web2c;E:/Documents/MSYS2/opt/share/texmf-dist/web2c;E:/Documents/MSYS2/opt/share/texmf/web2c;E:/Documents/MSYS2/opt/texmf-local/web2c;E:/Documents/MSYS2/opt/texmf-dist/web2c;E:/Documents/MSYS2/opt/texmf/web2c.

So, it seems to search texmf.cnf only in subdirectories of
E:/Documents/MSYS2/opt/.

Maybe it is because I load kpathsea DLL with LoadLibrary, and kpathsea
searches texmf.cnf from where my program is installed.

Maybe it is the code of dvi_kpathsea_path_name_get() : I call
kpathsea_set_program_name() and kpathsea_init_prog() with the name of
my program ("dvi.exe", installed in
E:/Documents/MSYS2/opt/efl_i686/bin)

I tried to set TEXMF and TEXMFCNF in the shell  to some values,
without success. But maybe i've wrongly set those environment
variables.

Does someone have ideas to solve this issue ?

thank you

Vincent Torri



More information about the tex-live mailing list