[metapost] Problem with running MetaPost on Mac OS X 10.5.6 and Mac OS X 10.4.11
Zhiyang Ong
zhiyang at ieee.org
Thu Jan 8 15:16:46 CET 2009
Greetings,
I have downloaded MetaPost, version 1.102, from
http://foundry.supelec.fr/projects/metapost/. Subsequently, I
installed it on my MacBook Pro and PowerBook G4, using the Bash shell
script found in the compressed Tar ball.
However, I have trouble running MetaPost (mpost), and mptopdf. I
have described my attempts to get it running below.
Can you help me find out where have I gone wrong in installing and
setting up MetaPost? Thank you.
Zhiyang
P/S: Description of what I did, and the problems that I faced.
[Problem(s) with running MetaPost on Mac OS X 10.5.6]
When I tried run MetaPost on a sample MetaPost file, I saw the
following on the Terminal.
eris >mpost test.mp
warning: kpathsea: configuration file texmf.cnf not found in these
directories: /Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir:/Applications/apps/graphics/metapost-1.102/build/texk/web2c:/Applications/apps/graphics/metapost-1.102/build/texk:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/share/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/share/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/share/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/texmf-local/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/share/texmf/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/share/texmf/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/share/texmf/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/texmf/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/web2c/texmf/web2c:/Applications/apps/graphics/metapost-1.102/build/texk/texmf/web2c.
Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
eris >
I searched for the file "texmf.cnf" on my computer, and copied that
into ~/build/texk/web2c/mpdir, where the binary executable for
MetaPost is. This seems to have taken care of the issue with
"texmf.cnf." However, I still have problems with the mem and Plain mem
file.
eris >mpost test.mp
Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
eris >
I realized my googling this problem that it could be due to the
initialization of MetaPost. So, I ran the initialization command.
eris >mpost --ini mpost
This is MetaPost, version 1.102 (kpathsea version 3.5.7) (INIMP)
(./mpost
! Text line contains an invalid character.
l.1 ?
???^^G^^@^^@^^@^^C^^@^^@^^@^^B^^@^^@^^@^^L^^@^^@^^@?^^E^^@^^@?^^@^^@^^@...
? q
OK, entering batchmodeeris >
eris >mpost --inimpost
This is MetaPost, version 1.102 (kpathsea version 3.5.7) (INIMP)
**
Please type the name of your input file.
**^C
eris >mpost --inimpost
This is MetaPost, version 1.102 (kpathsea version 3.5.7) (INIMP)
**
Please type the name of your input file.
**/data/2008/projs/metapost/test.mp
(/data/2008/projs/metapost/test.mp
! I can't find file `macros'.
l.1 input macros
;
Please type another input file name:
/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/mpost
(/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/mpost
! Text line contains an invalid character.
l.1 ?
???^^G^^@^^@^^@^^C^^@^^@^^@^^B^^@^^@^^@^^L^^@^^@^^@?^^E^^@^^@?^^@^^@^^@...
?
...
eris>
Upon further googling, I found that I need to load certain files in
the initialization process. So, I tried the following on the command
prompt, after copying the files plain.mp, mpost.mp, and mfplain.mp
into the directory of the MetaPost binary executable.
mpost -ini '\input plain dump'
mpost -ini '\input mpost dump'
mpost -ini '\input mfplain dump'
However, this leads to another problem. It complains that the file
"macros" cannot be found, when I imported "macros" in my MetaPost
file. I believe that "macros" is part of the MetaPost binary
executable, as one of its libraries.
When I tried to initialize MetaPost again, it works now...
eris >mpost --ini mpost
This is MetaPost, version 1.102 (kpathsea version 3.5.7) (INIMP)
(./mpost.mp (./plain.mp
Preloading the plain mem file, version 1.004) )
Beginning to dump on file mpost.mem
(mem=mpost 2009.01.07)
at most 737 strings of total length 3639
3412 memory locations dumped; current usage is 1036&2302
502 symbolic tokens
Transcript written on mpost.log.
eris >
Next, I tried using "fmtutil," to see if that can allow me to use MetaPost.
eris >fmtutil --byfmt mpost
fmtutil: running `mpost -ini -jobname=mpost -progname=mpost
-translate-file=cp227.tcx mpost.mp' ...
warning: mpost: unimplemented option -translate-file=cp227.tcx
This is MetaPost, version 1.102 (kpathsea version 3.5.7) (INIMP)
(/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/mpost.mp
(/Applications/apps/graphics/metapost-1.102/build/texk/web2c/mpdir/plain.mp
Preloading the plain mem file, version 1.004) )
Beginning to dump on file mpost.mem
(mem=mpost 2009.01.08)
at most 737 strings of total length 3639
3412 memory locations dumped; current usage is 1036&2302
502 symbolic tokens
Transcript written on mpost.log.
fmtutil: /Users/zhiyang/.texlive2007/texmf-var/web2c/metapost/mpost.mem
installed.
eris >kpsewhich mpost.mem
./mpost.mem
eris >mpost --mem mpost.mem
However, my efforts seemed to have led me back to square one. The
problem I initially faced, and am facing is:
eris >mpost test.mp
Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
eris >mptopdf --latex test.mp
MPtoPDF 1.3.2 : running 'texexec --mptex '
TeXExec | processing graphic 'test.mp'
warning: mpost: unimplemented option -translate-file=natural.tcx
Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
TeXExec | runtime: 0.006812
MPtoPDF 1.3.2 : no filename matches test
eris >
Other commands that I have tried are:
mpost --kpathsea-debug=7
[This comes to a halt after the following:]
This is MetaPost, version 1.102 (kpathsea version 3.5.7)
**
[When I hit enter, the following appears:]
Please type the name of your input file.
**
[What sort of input file is it expecting? I tried mpost.mem, and
mpost. When I use the former file, it complains of a lot of "invalid
characters." With the latter, it complains of a lot of errors
concerning "redundant equation."]
kpsewhich mpost.mem
[This tells me where the "mpost.mem" file is. It's in ~/build/texk/web2c/mpdir]
mpost --mem mpost.mem test.mp
[Complains of a lot of "invalid characters"]
[Problem(s) with running MetaPost on Mac OS X 10.4.11]
eris > inimpost
warning: Could not open char translation file `cp8bit.tcx'.
! I can't read mp.pool; bad path?
eris > mpost --ini mpost
warning: Could not open char translation file `cp8bit.tcx'.
! I can't read mp.pool; bad path?
eris >kpsewhich mpost.mem
eris >
More information about the metapost
mailing list