> OK, but I've done some checking using KPATHSEA_DEBUG=-1, and it turns out
> that kpsewhich and mktextfm read /usr/share/texmf/web2c/texmf.cnf, but
> the kpathsea lib does not -> so no default paths. If I set
>
> export TEXMFCNF=/usr/share/texmf/web2c
>
> the kpathsea lib does read the texmf.cnf file, but still can't find
> any tfms. I know where the tfm file is, kpsewhich knows it, but I
> can't seem to tell kpathsea where to look; TEXFONTS, TEXTFM, TEXMF,
> TFMFONTS, VARTEXFONTS? I'm using tetex on a pcc (tetex-0.9-17.src.rpm),
> all 1.x versions I tried crash on ppc.
My guess is that your libkpathsea.a wasn't compiled for your
texmf directory setup. The search strategy of the library is
to first look for texmf.cnf in a directory relative to the full
path of the calling program, that's why your kpsewhich works
(if it even was compiled with the same library version).
Since Lilypond isn't located in the same bin/ directory
as latex and kpsewhich, it has to fall back to the paths
compiled into the lib file. If you recompile libkpathsea,
and see to it that the configuration agrees with the
contents of your `kpsewhich texmf.cnf` it should work
fine.
/Mats