zorkow/MaxTract

Installing mikmatch_pcre

Closed this issue · 1 comments

There is a dependency to mikmatch_pcre in
https://github.com/zorkow/MaxTract/blob/master/src/pdfExtract/Makefile#L58

Inspired by opam (the ocaml package installer suggested by @apsexton) I tried the following to install the dependency opam install pcre mikmatch. Results in a strange error message

# ocamlc -c mikmatch.mli
# ocamlc -a -o run_mikmatch_pcre.cma -I /home/physikerwelt/.opam/4.02.3/lib/pcre \
#               mikmatch.ml run_mikmatch_pcre.ml
# make[1]: Leaving directory `/home/physikerwelt/.opam/4.02.3/build/mikmatch.1.0.8/pcre'

(I'll continue looking into this, but I wanted to keep track of the issue in the public).

only works with a specific ocaml version

opam switch 4.02.3
eval `opam config env`
opam install ocamlfind
opam install pcre mikmatch

the last command failed, but I could install it from github

git clone https://github.com/mjambon/mikmatch.git
cd mikmatch/
make
make install

go back to the source directory for example

cd ~/MaxTract/src/pdfExtract
opam install json-wheel
make all
./extractElements -f ../../samples/pdf/gpu.pdf -d ../../samples/json/gpu2

as a result the files in gpu and gpu2 seem to be the same.