caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Problem native dynlink loading cryptokit
@ 2013-08-09  9:09 Maxence Guesdon
  2013-08-09  9:27 ` Stéphane Glondu
  0 siblings, 1 reply; 7+ messages in thread
From: Maxence Guesdon @ 2013-08-09  9:09 UTC (permalink / raw)
  To: caml-list

Hello,

I'm trying to dynamically load the cryptokit library in native mode.

Here is a test program:

cat > testload.ml
let _ = Dynlink.allow_unsafe_modules true;;

let load_file file =
  try Dynlink.loadfile (Dynlink.adapt_filename file)
  with Dynlink.Error e ->
      failwith (Dynlink.error_message e)

let () =
  match Array.to_list Sys.argv with
    [] | [_] -> prerr_endline "missing arguments"; exit 1
  | _ :: files -> List.iter load_file files

Compiling with
   ocamlopt -linkall -o testload dynlink.cmxa testload.ml

Then, running
  ./testload  ~/.opam/4.00.1/lib/ocaml/nums.cmxs \
      ~/.opam/4.00.1/lib/ocaml/unix.cmxs \
      ~/.opam/4.00.1/lib/cryptokit/cryptokit.cmxs

gives me the following error:

Fatal error: exception Failure("error loading shared
library: /home/guesdon/.opam/4.00.1/lib/cryptokit/cryptokit.cmxs:
undefined symbol: caml_sha1_init")

Am I doing something wrong ? Or is something missing in cryptokit
build ?

Thanks,

Maxence

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-09 12:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09  9:09 [Caml-list] Problem native dynlink loading cryptokit Maxence Guesdon
2013-08-09  9:27 ` Stéphane Glondu
2013-08-09  9:33   ` Maxence Guesdon
2013-08-09  9:43     ` Stéphane Glondu
2013-08-09  9:49       ` Maxence Guesdon
2013-08-09 12:13         ` Maxence Guesdon
2013-08-09 12:41           ` [Caml-list] " Sylvain Le Gall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).