* [Caml-list] Dune compilation problems using js_of_ocaml with libraries
@ 2019-12-06 21:05 Helmut Brandl
0 siblings, 0 replies; only message 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:
caml_add_debug_info
caml_dynlink_add_primitive
caml_dynlink_get_current_libs
caml_dynlink_lookup_symbol
caml_dynlink_open_lib
caml_register_code_fragment
Missing primitives provided by +toplevel.js:
caml_get_section_table
caml_realloc_global
caml_reify_bytecode
caml_static_alloc
- If I build with the default profile (i.e. — profile dev), then starting the program I get the error message
/Users/helmut/myprogs/alba/program/_build/default/ocaml/alba-node/alba_node.bc.js:51209
runtime.ml_setup_bridges(0);
^
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.
Helmut
[-- Attachment #2: Type: text/html, Size: 9367 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-06 21:05 UTC | newest]
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox