eliom icon indicating copy to clipboard operation
eliom copied to clipboard

Cannot compile - js_of_ocaml missing primitives

Open pat227 opened this issue 7 years ago • 1 comments

I'm just trying out js_of_ocaml in conjunction with eliom and I've run into a brick wall of errors.

This dummy project (at https://github.com/pat227/jsbroken.git) is intended to exhibit my issue. It has numerous warnings during compilation that result in fatal runtime js errors were this a real project. I cannot figure out what is wrong. I only use Pervasives and nothing fancy; certainly no Core or Base.

Yet, compilation warnings include missing primitives in Base_am_testing and "overriding primitive 'caml_ephe_key_offset'". Complete relevant compilation warnings can be seen at: https://pastebin.com/MYk3i0dU

Based on others with similar issues I think I might have to add some custom modifications to js_of_eliom, but so far no luck. Not sure how to do that correctly, or if even possible.

Thank you in advance.

pat227 avatar Apr 12 '18 15:04 pat227

We have the following chain of dependencies: eliom -> ocsigenserver -> ipaddr -> ppx_sexp_conv. ... and the latest version of ppx_sexp_conv depends on base.

You can edit Makefile as follows as a workaround:

JS_OF_ELIOM       := js_of_eliom -ppx -jsopt +base/runtime.js

But I'm not sure what we should do about that.

vouillon avatar Apr 13 '18 15:04 vouillon