[luatex] Segfault and kpse.find_file()

taco taco at elvenkind.com
Fri Feb 13 13:41:44 CET 2009


Elie Roux wrote:
> Hello,
> 
> the dev-luatex doesn't seem to work today, so here are two mails I sent:
> 
> I found that a problem in the mplib package was to find mpost.mem in 
> TeXLive: It cant be found with kpse.find_file(). I can't be found 
> neither with "kpsewhich --format mem --must-exist mpost.mem", but in 
> TeXLive 2008, it can be found with "kpsewhich --format mem --engine 
> metapost mpost.mem". The problem is that I can't pass the "engine" 
> option to kpse.find_file(). Is it is possible to add it? 

If you do

    os.setenv('engine', 'metapost')

before asking for the first file, that should work.

But I agree that is (perhaps more than) a little weird. I will redo the
kpathsea interface next month anyway, and I will definately  keep this
problem in mind.

> and the other mail :
> 
> s kpse.find_file can't get the path of mpost.mem, I made some 
> experimentations and got a segmentation fault with texlua (revision 
> 1858, on debian/sid 32 bit) on the following code:
> ..
> you have to replace filename by the true value of you mpost.mem to get 
> the segfault.

I cannot reproduce this crash (#1861 on linux32). I checked that
it enters the correct branch for my machine to return the literal

  /opt/tex/texmf-linux/web2c/metapost/mpost.mem

Are you sure that that mpost.mem is generated by the same version
of metapost/mplib? (it still *should* not crash, but I can see how
that *could* happen: detecting whether a mem file is valid for the
current executable is harder now then it was before the switch to C)

Best wishes,
Taco


More information about the luatex mailing list