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

Graphics #197

Closed
Luc-Saccoccio opened this issue Apr 27, 2021 · 4 comments · Fixed by #273
Closed

Graphics #197

Luc-Saccoccio opened this issue Apr 27, 2021 · 4 comments · Fixed by #273

Comments

@Luc-Saccoccio
Copy link

I tried using this variant with graphics, I endend up having this error message :

┌─<luc@Bouquinbourg in ~/repos/perso/AtomasOCaML>
└─<git@AtomasOCaML:master>──» ocamlfind -toolchain windows ocamlopt -linkpkg -package graphics -package unix atomas.ml -o atomas
File "atomas.ml", line 1:
Error: Files /home/luc/.opam/4.11.1+32bit/windows-sysroot/lib/graphics/graphics.cmxa
       and /home/luc/.opam/4.11.1+32bit/windows-sysroot/lib/ocaml/stdlib.cmxa
       make inconsistent assumptions over implementation Stdlib__sys

Is there a way to fix this ?

@alexblanche
Copy link

alexblanche commented Jul 2, 2023

I have a similar issue with the Graphics package.
Ocamlfind successfully finds the Graphics module when not using the windows toolchain, but when I used ocamlfind -toolchain windows ocamlopt -linkpkg -package graphics ..., I got an "Unbound module Graphics" error.

So I copied the content of "/home/alex/.opam/4.14.1/lib/graphics/" to "/home/alex/.opam/4.14.1/windows-sysroot/lib/graphics/" and added "env" "OCAMLFIND_TOOLCHAIN=windows" to my opam file, and I now have the same message.

ocamlfind -toolchain windows ocamlopt -linkpkg -package graphics test_graphics_aux.ml test_graphics.ml -o test_graphics.exe
File "test_graphics.ml", line 1:
Error: Files /home/alex/.opam/4.14.1/windows-sysroot/lib/graphics/graphics.cmxa
       and /home/alex/.opam/4.14.1/windows-sysroot/lib/ocaml/stdlib.cmxa
       make inconsistent assumptions over implementation Stdlib__Sys

Anyway, I am stuck.

@toots
Copy link
Member

toots commented Jul 7, 2023

@alexblanche you can't copy compiled units from the normal compiler to the cross-compiler, this won't work!

Just added a proper graphics-windows package!

@alexblanche
Copy link

@toots Thanks a lot!

1 similar comment
@alexblanche
Copy link

@toots Thanks a lot!

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

Successfully merging a pull request may close this issue.

3 participants