Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build the hello_world example. #24

Open
joanimato opened this issue Jun 15, 2022 · 4 comments
Open

Can't build the hello_world example. #24

joanimato opened this issue Jun 15, 2022 · 4 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@joanimato
Copy link

Hi,

I'm trying to get started with the hello_world example, but when I try to build it I'm getting the following error

dune build ./main.bc.js

Entering directory 'path/to/bonsai'
File "web/dune", line 4, characters 18-47:
4 |   bonsai_protocol incr_dom.javascript_profiling)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "incr_dom.javascript_profiling" not found.
-> required by library "bonsai.web" in _build/default/web
-> required by executable main in examples/hello_world/dune:1
-> required by _build/default/examples/hello_world/main.bc.js

As far as I can tell, incr_dom is installed. I've also tried adding the janestreet repository to my current opam switch, but the same error persists.

I'm using Ocaml 4.13 on WSL/Windows.
Opam list: https://gist.github.com/joanimato/55207a2352daa16c142b052342b8231a

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Jun 15, 2022
@TyOverby
Copy link
Member

could you make an empty switch, add the janestreet repository to it, and then install bonsai again?

@joanimato
Copy link
Author

Sorry for the late reply. For some reason I'm not receiving notifications on these....

Still not working. I even tried it on a Mac this time and got a similar error.

List of commands:

opam switch create ./ --empty
opam repo add janestreet-bleeding https://ocaml.janestreet.com/opam-repository
opam install bonsai
dune build ./main.bc.js

the output that I got was:

Entering directory 'path/to/bonsai'
File "web/dune", line 4, characters 18-47:
4 |   bonsai_protocol incr_dom.javascript_profiling)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "incr_dom.javascript_profiling" not found.
Hint: try:
  dune external-lib-deps --missing ./main.bc.js

I tried the command in the hint and it doesn't seem to do anything.

@joanimato
Copy link
Author

I was able to resolve the issue by using the standard opam repository with Ocaml 4.13 installed. I was initially confused because I expected the build folder to be inside the hello_world directory, but it actually appears at the root folder of the repository. Once I figured that out, the hello_world example compiles fine.

Some of the examples still gave me dependency issues (like "bonsai_web_ui_panels_experimental" or "piecewise_linear_kernel" not found...), but I was able to build most of them.

@crackcomm
Copy link

I was trying to build dygraph example but I can't find Piecewise_linear_kernel.Make_invertible anywhere, where can I find it to build this example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

4 participants