%check section fails if ocaml-perl4caml has been installed. The explanation for this is in the spec file: %check # This fails if perl4caml is installed. The bytecode programs # load dllperl4caml.so from OCaml's stublibs, instead of the # one we just built. Since dllperl4caml.so in stublibs # (wrongly) lacks an rpath for libperl.so, it won't find # libperl.so in the obscure directory where it resides. # Monkeying around with LD_LIBRARY_PATH doesn't help because # ocamlrun uses $libdir/ocaml/ld.conf to find directories # containing the stublibs. make test ||: It should be possible to fix this by setting an environment variable such as CAML_LD_LIBRARY_PATH. See section 10.3 of the manual: http://caml.inria.fr/pub/docs/manual-ocaml/manual024.html