dbuenzli / vg

Declarative 2D vector graphics for OCaml
http://erratique.ch/software/vg
ISC License
86 stars 12 forks source link

Problem on min_pdf compiling. #4

Closed glionnet closed 9 years ago

glionnet commented 9 years ago

Hi,

After install vg/gg/otfm/uutf with opam, I tried to run the differents test. It work fine with HTML or SVG output. But when I try to compile the min_pdf.ml example, I have a really strange error :

gregoire@Maredsous:/tmp/vg/test$  ocamlfind ocamlopt -package gg,vg,vg.pdf  -linkpkg -o min_pdf.native min_pdf.ml
File "min_pdf.ml", line 1:
Error: No implementations provided for the following modules:
         Uutf referenced from /home/gregoire/.opam/4.01.0/lib/otfm/otfm.cmxa(Otfm),
           /home/gregoire/.opam/4.01.0/lib/vg/vgr_pdf.cmxa(Vgr_pdf)

All the required file seems to be here, so I didn't understand the source of this error, I tried to fully reinstall vg/gg/otfm/uutf but it changes nothing.

Everything seems to be present :

gregoire@Maredsous:~$ ls ~/.opam/4.01.0/lib/gg
gg.a    gg.cmi  gg.cmxa  gg.mli    gg_top.cma  gg_top.cmx   gg_top.cmxs  META
gg.cma  gg.cmx  gg.cmxs  gg_top.a  gg_top.cmi  gg_top.cmxa  gg_top.ml
gregoire@Maredsous:~$ ls ~/.opam/4.01.0/lib/vg
META    vg.cmx   vgr_htmlc.a    vgr_htmlc.cmxa  vgr_pdf.cma   vgr_pdf.cmxs      vgr_svg.cmi   vgr_svg.mli
vg.a    vg.cmxa  vgr_htmlc.cma  vgr_htmlc.cmxs  vgr_pdf.cmi   vgr_pdf.mli   vgr_svg.cmx
 vg.cma  vg.cmxs  vgr_htmlc.cmi  vgr_htmlc.mli   vgr_pdf.cmx   vgr_svg.a     vgr_svg.cmxa
vg.cmi  vg.mli   vgr_htmlc.cmx  vgr_pdf.a       vgr_pdf.cmxa  vgr_svg.cma   vgr_svg.cmxs
gregoire@Maredsous:~$ ls ~/.opam/4.01.0/lib/otfm
META  otfm.a  otfm.cma  otfm.cmi  otfm.cmx  otfm.cmxa  otfm.cmxs  otfm.mli
gregoire@Maredsous:~$ ls ~/.opam/4.01.0/lib/uutf
META  uutf.a  uutf.cma  uutf.cmi  uutf.cmx  uutf.cmxa  uutf.cmxs  uutf.mli

Is the problem from my side ? Do you know how to correct it ?

dbuenzli commented 9 years ago

It's because the META file forgot to require uutf, see https://github.com/dbuenzli/vg/commit/0611ae56750229ada7b5a4914484980518a3dc60. Just add uutf to the -packages list.

pveber commented 9 years ago

Hi Srax,

the last released version of vg has an incorrect META file which explains your issue. This was fixed in this commit, but there was no release since then. In the meantime, you can just add uutf manually when compiling the example:

ocamlfind ocamlopt -package uutf,vg.pdf  -linkpkg -o min_pdf.native min_pdf.ml
glionnet commented 9 years ago

good, my problem is solved, thanks a lot for the quick answer.