Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2087 Unable to make mpx file

open
nobody
MetaPost (40)
2014-03-02
2011-09-10
john lask
No

This bug re-opens: 3137165 metapost fails with MiKTeX 2.9 on Win 7 - there definitly is a problem
bug 3273553 Problem with label in Metapost, may be related.

compiling metapost file eg1.mp (attached file) fails with

tex: The memory dump file could not be found.
tex: Data: tex.fmt
fatal: Command failed: tex --parse-first-line --interaction=nonstopmode mp455818.tex; see mpxerr.log

the eg1.log file (see test1.tar.gz)
This is MetaPost, version 1.211 (MiKTeX 2.9) (MiKTeX 2.9) (mem=mpost 2011.09.07) 8 SEP 2011 13:53
**eg1.mp
(F:/tmp/eg1.mp

eg1.mp
eg1.mpx
! Unable to make mpx file.
l.9 label.top(btex
$a$ etex, .5[z0,z1]);
The two files given above are one of your source files
etc etc.

to note about eg1.mp, it uses
prologues:=1; i.e.
plain tex (not latex)
i.e. a simple use of metapost with tex.

in fact the expected eps file is eg1.1.ps (also attached) has been renamed from eg1.1 (in attached test6.zip)
the associated eg1.log and mpxerr files have been included in test1.tar.gz.

running the tex file through (test2.tar.gz)
tex mpxerr.tex
produces a good result when run through dvitomp etc
(see the associated makefile attached for all the commands run to generate test results)

similarly running the same example eg1.mp through MiKTeX 2.7 processes the file without error
see test1b.tar.gz

to cut a long story short (for a full description of the series of tests see the makefile)
I observed the following:

MiKTex 2.9 sets an environment variable when invoking the tex (or latex) command. The
environment variable is set in the spawned process the setting is:

engine=metapost

There is no documentation available about what this could be for. However,
MiKTeX 2.7 does not set this environment variable.

when this environment variable is set (see testtex.bat) and tex is run from the command line
to process the a tex file as in test2. It fails with the same error as
that reported here (test5.tar.gz).

setting up allternative batch files:

  • mptex
  • mplatex

with a simple command

@set engine=
@tex %1

i.e. unsetting the environment variable and running metapost with these
as follows

mpost -tex mptex eg1.mp

now metapost works like it should.

Discussion

  • john lask
    john lask
    2011-09-10

    test metapost file

     
    Attachments
  • john lask
    john lask
    2011-09-10

    expectd result

     
    Attachments
  • john lask
    john lask
    2011-09-10

    makefile to run tests

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test1 results

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test1 results with MikTex 2.7

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test2 results

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test5 results

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test6 results

     
    Attachments
  • john lask
    john lask
    2011-09-10

    test scripts

     
    Attachments
  • john lask
    john lask
    2011-09-10

    example work around

     
    Attachments