-
Notifications
You must be signed in to change notification settings - Fork 119
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
Build sail on Windows? #816
Comments
I know people have had success using WSL if that is an option for you? We could make our readline editing support in the REPL optional. In general I suspect windows support wouldn't be that hard as we don't have many dependencies, I'd just need access to a Windows machine to actually try it... |
Thanks for your reply. WSL definitely works well for building sail, but I have some special need that force me build sail on native Windows. |
HI, out of curiosity, I also tried it and made some discoveries First, I compiled ocaml-linenoise successfully by cloning it locally and adding some cflags in dune You can search for the location of (library
(name linenoise)
(public_name linenoise)
(modules LNoise)
(wrapped false)
(flags :standard -warn-error -3)
+ (c_flags -I C:\Users\user\AppData\Local\opam\.cygwin\root\usr\include)
(c_names linenoise_src linenoise_stubs)) But the troublesome things had just begin; the next compilation failure is lem, and there is already a related issue here rems-project/lem#16 I encountered many issues, mainly related to missing dependencies. By doing a few things, I still managed to complete the compilation The first step is to add two library path in lem/src/Makefile (there may be better ways, but I am not very familiar with ocamlbuild yet), one for all:
ocamlbuild -use-ocamlfind \
-cflag -g \
-cflag -I -cflag /cygdrive/c/Users/user/AppData/Local/opam/.cygwin/root/usr/include \
-lflag -ccopt -lflag "-L /cygdrive/c/Users/user/AppData/Local/opam/.cygwin/root/usr/x86_64-w64-mingw32/sys-root/mingw/lib -L /cygdrive/c/Users/trdthg/AppData/Local/opam/.cygwin/root/lib/gcc/x86_64-w64-mingw32/12" \
main.native In addition, there will be two path not found issues when running this command,
However, the compiled binary is not available; when you run lem, it only reports 127 (I feel that building on Windows is not a good choice 😶) |
Due to my work environment, I need to compile Sail on Windows, but I'm running into some issues.
I know OCaml supports Windows, and I’ve successfully set up the OCaml development environment following the official steps.
However, when I try to compile Sail, I’m encountering problems. Some libraries that Sail depends on, like linenoise, seem to not work properly on Windows. When I try to install it, the compilation fails. I’ve attached the error message below.
Has anyone run into similar issues? Has anyone successfully built Sail on Windows? If so, I’d love to hear about your experience!
It seems that termios.h is not available in MinGW environment. But ocaml seems to work with MinGW toolchain. How can I solve this issue?
The text was updated successfully, but these errors were encountered: