caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] Dune compilation problems using js_of_ocaml with libraries
@ 2019-12-06 21:05 Helmut Brandl
  0 siblings, 0 replies; 1+ messages in thread
From: Helmut Brandl @ 2019-12-06 21:05 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]

Hello list.

I have a project with various libraries which I compile using dune. One of the executable is a javascript executable (executable under nodejs).

For the javascript executable I encounter the following problem:

- If I build with ‘—profile release’ everything works fine, except that I get a warning that some primitives are missing. But the program works fine i.e. the missing primitives are obviously not used.

There are some missing primitives
Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime.
You can prevent the generation of dummy implementations with the commandline option '--disable genprim'
Missing primitives provided by +dynlink.js:
Missing primitives provided by +toplevel.js:

- If I build with the default profile (i.e. — profile dev), then starting the program I get the error message


TypeError: runtime.ml_setup_bridges is not a function
    at /Users/helmut/myprogs/alba/program/_build/default/ocaml/alba-node/alba_node.bc.js:51209:13
    at Object.<anonymous> (/Users/helmut/myprogs/alba/program/_build/default/ocaml/alba-node/alba_node.bc.js:51243:3)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
    at executeUserCode (internal/bootstrap/node.js:342:17)
    at startExecution (internal/bootstrap/node.js:276:5)

I assume that there is something missing to load the libraries.

Using the release profile is no principal problem, but compile times are much longer than compiling with the development profile.

Does anybody have an idea how to get the build with development profile working? Should I report the problem to another forum?

Thanks for any hints.

[-- Attachment #2: Type: text/html, Size: 9367 bytes --]

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 21:05 [Caml-list] Dune compilation problems using js_of_ocaml with libraries Helmut Brandl

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox