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

esy build error: 'graphics' cannot be found #38

Open
bentxt opened this issue May 25, 2020 · 2 comments
Open

esy build error: 'graphics' cannot be found #38

bentxt opened this issue May 25, 2020 · 2 comments

Comments

@bentxt
Copy link

bentxt commented May 25, 2020

I cannot build with esy

esy
info esy 0.6.2 (using package.json)
ocaml (internal)
ocamlfind: Package `graphics' not found
ocaml (internal)

but it is installed:
ocamlfind query graphics
/Users/ben/.opam/4.10.0/lib/graphics

and ocamlfind can be used to compile a simple test program

ocamlfind ocamlopt -o out -linkpkg -package graphics gtest.ml

@robz
Copy link
Collaborator

robz commented Jul 1, 2020

I believe this is just a warning, since I can successfully use the compiler after running esy.

I haven't found a good way to get the dune dependency tree, but from grepping around, it seems that graphics is referenced by ./lib/lwt/graphics/dune and ./toplevel/examples/lwt_toplevel/dune, and that ./lib/lwt/graphics is referenced by ./toplevel/examples/lwt_toplevel/dune. I’m not sure how the chain of dependencies connects from there to building other things.

In any case, I tried unsuccessfully to bring in the graphics library to package.json. For posterity, here are the errors I encountered:

  1. After adding graphics to package.json, there’s an error about not finding x11: https://gist.github.com/robz/a4d7fe9cc97ed2e7e17f867028f49556
  2. I found this related issue about that error: Unable to install on Mac OS 10.14.6 ocaml/graphics#16. The folks working on graphics might have fixed it with this commit: ocaml/graphics@b212a8b. I previously had "@opam/graphics": “*” which resolved to graphics@opam:4.08.1. But setting it to "@opam/graphics": "^5.0.0”, which would include the fix, causes an error about ocaml versions conflicting: https://gist.github.com/robz/8efa68d9dd5718f99bbe0f5dda2e19fd
  3. If I change package.json devDependencies.ocaml to “~4.9.0”, there’s an error about circular dependency with dune, which I don’t understand: https://gist.github.com/robz/47fbb143918f5be2f199b7cea767f31f

@Lupus
Copy link
Contributor

Lupus commented Jul 2, 2020

@robz you want to look at this announcement, dune-deps might be helpful in building dune dependency tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants