ocaml-nocrypto icon indicating copy to clipboard operation
ocaml-nocrypto copied to clipboard

Custom runtime does not compile on FreeBSD

Open orbitz opened this issue 8 years ago • 5 comments

I'm not sure if it compiles elsewhere but I get:

/tmp/camlprim076048-c98550.o:(.data+0x1038): undefined reference to `caml_nc_xor_into'
/tmp/camlprim076048-c98550.o:(.data+0x1040): undefined reference to `caml_nc_sha512_init'
/tmp/camlprim076048-c98550.o:(.data+0x1048): undefined reference to `caml_nc_sha512_update'
/tmp/camlprim076048-c98550.o:(.data+0x1050): undefined reference to `caml_nc_sha512_finalize'
/tmp/camlprim076048-c98550.o:(.data+0x1058): undefined reference to `caml_nc_sha512_ctx_size'
/tmp/camlprim076048-c98550.o:(.data+0x1060): undefined reference to `caml_nc_sha384_init'
...

I would guess this is the same issue as:

https://github.com/dbuenzli/mtime/issues/16

orbitz avatar Feb 25 '17 14:02 orbitz

This appears to have been introduced in 0.5.4.

orbitz avatar Feb 25 '17 15:02 orbitz

Cannot reproduce, 0.5.4 installs fine for me on both FreeBSD and Linux.

cfcs avatar May 16 '17 06:05 cfcs

Reproducible test case:

(* test.ml *)
let x = Nocrypto.Hash.digest
;; jbuild
(jbuild_version 1)
(library
  ((name test)
   (libraries (nocrypto))))

Command to reproduce: opam pin add jbuilder --dev-repo && jbuilder utop

This is on 0.5.4.

copy avatar Oct 03 '17 12:10 copy

@copy thanks for the test case, I could reproduce -- when I pin ocb-stubblr to https://github.com/hannesm/ocb-stubblr.git#fix and recompile nocrypto afterwards, the error is gone.

See https://github.com/pqwy/ocb-stubblr/pull/11 for the fix to ocb-stubblr.

hannesm avatar Oct 03 '17 13:10 hannesm

@hannesm Thanks for the super-quick fix.

copy avatar Oct 03 '17 14:10 copy