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

Cannot build on windows (Lwt 2.4.5) #84

Closed
braibant opened this issue Sep 22, 2014 · 5 comments
Closed

Cannot build on windows (Lwt 2.4.5) #84

braibant opened this issue Sep 22, 2014 · 5 comments

Comments

@braibant
Copy link

Here is the log according to opam (but I also get this error if I compile "by hand").

===== ERROR while installing lwt.2.4.5 =====
# opam-version 1.1.2 (007c9356a3129fced7c3d7016216839013dbfb90)
# os           cygwin
# command      make build
# path         /home/vagrant/.opam/system/build/lwt.2.4.5
# compiler     system (4.01.0)
# exit-code    2
# env-file     /home/vagrant/.opam/system/build/lwt.2.4.5/lwt-1788-ffb3fd.env
# stdout-file  /home/vagrant/.opam/system/build/lwt.2.4.5/lwt-1788-ffb3fd.out
# stderr-file  /home/vagrant/.opam/system/build/lwt.2.4.5/lwt-1788-ffb3fd.err
### stdout ###
# ...[truncated]
#             ^
# src/unix/lwt_unix_stubs.c:1136:3: warning: implicit declaration of function ‘sigaltstack’ [-Wimplicit-function-declaration]
#    sigaltstack(&new_stack, &old_stack);
#    ^
# src/unix/lwt_unix_stubs.c:1142:21: error: ‘SA_ONSTACK’ undeclared (first use in this function)
#    new_sa.sa_flags = SA_ONSTACK;
#                      ^
# src/unix/lwt_unix_stubs.c:1142:21: note: each undeclared identifier is reported only once for each function it appears in
# Command exited with code 2.
# Makefile:27: recipe for target 'build' failed
### stderr ###
# ocamlfind: Package `wikidoc' not found
# E: Failure("Command ''/usr/bin/ocamlbuild' syntax/optcomp.cma syntax/optcomp.cmxa syntax/optcomp.a src/core/lwt.cma src/core/lwt.cmxa src/core/lwt.a src/logger/lwt-log.cma src/logger/lwt-log.cmxa src/logger/lwt-log.a src/unix/liblwt-unix_stubs.a src/unix/dlllwt-unix_stubs.so src/unix/lwt-unix.cma src/unix/lwt-unix.cmxa src/unix/lwt-unix.a src/simple_top/lwt-simple-top.cma src/simple_top/lwt-simple...[truncated]
# make: *** [build] Error 1

'opam install lwt' failed.
@braibant braibant changed the title Cannot build on windows Cannot build on windows (Lwt 2.4.5) Sep 22, 2014
@braibant
Copy link
Author

In the end, I compiled it using WODI. There is another way to compile Lwt by hand, which involve modifying the first line of setup.data to give a correct path to ocamlfind.

avsm added a commit to avsm/opam that referenced this issue Oct 1, 2014
This uses the Appveyor CI service (similar to Travis) to build
OPAM on Cygwin on Windows.  It currently installs fine, but then
runs into ocsigen/lwt#84 when installing Lwt.

See ocaml#246
@avsm
Copy link
Collaborator

avsm commented Oct 1, 2014

It looks like WODI has a number of patches that haven't been submitted here. Looks like os_type is Cygwin instead of Win32 as the discover.ml expects.

@msprotz
Copy link

msprotz commented Sep 26, 2015

I'm getting a different error here (not enough quoting).

bash: C:cygwinhomeprotz.opamsystembinocamlfind.EXE: command not found

E: Failure("Command 'C:\\OCaml\\bin\\ocamlbuild.EXE -classic-display -no-log -no-links -install-lib-dir C:\\OCaml\\lib\\ocamlbuild -byte-plugin syntax/optcomp.cma syntax/optcomp.cmxa syntax/optcomp.a syntax/optcomp.cmxs src/core/lwt.cma src/core/lwt.cmxa src/core/lwt.a src/core/lwt.cmxs src/logger/lwt-log.cma src/logger/lwt-log.cmxa src/logger/lwt-log.a src/logger/lwt-log.cmxs src/unix/liblwt-unix_stubs.a src/unix/dlllwt-unix_stubs.dll src/unix/lwt-unix.cma src/unix/lwt-unix.cmxa src/unix/lwt-unix.a src/unix/lwt-unix.cmxs src/simple_top/lwt-simple-top.cma src/simple_top/lwt-simple-top.cmxa src/simple_top/lwt-simple-top.a src/simple_top/lwt-simple-top.cmxs src/react/lwt-react.cma src/react/lwt-react.cmxa src/react/lwt-react.a src/react/lwt-react.cmxs src/preemptive/lwt-preemptive.cma src/preemptive/lwt-preemptive.cmxa src/preemptive/lwt-preemptive.a src/preemptive/lwt-preemptive.cmxs src/extra/lwt-extra.cma src/extra/lwt-extra.cmxa src/extra/lwt-extra.a src/extra/lwt-extra.cmxs syntax/lwt-syntax.cma syntax/lwt-syntax.cmxa syntax/lwt-syntax.a syntax/lwt-syntax.cmxs syntax/lwt-syntax-options.cma syntax/lwt-syntax-options.cmxa syntax/lwt-syntax-options.a syntax/lwt-syntax-options.cmxs syntax/lwt-syntax-log.cma syntax/lwt-syntax-log.cmxa syntax/lwt-syntax-log.a syntax/lwt-syntax-log.cmxs examples/unix/logging.native examples/unix/relay.native examples/unix/parallelize.native -tag debug' terminated with error code 127")

(opam is a cygwin executable; ocaml is the native toolchain)

@aantron
Copy link
Collaborator

aantron commented Jun 27, 2016

@braibant I believe this has been solved by Cygwin upstream, as pointed out by fdopen in the duplicate issue #173. Current Lwt does build on Cygwin now.

@msprotz: This looks like a problem with something other than Lwt, I would guess OCamlbuild, but perhaps OPAM instead. Please check those projects, and let me know if you are still having this issue, if you think it is with Lwt, and you would like to resolve it :)

@aantron aantron closed this as completed Jun 27, 2016
@msprotz
Copy link

msprotz commented Jun 27, 2016

Apparently I managed to install it eventually so we're good. Thanks for the reply!

~ jonathan

From: Anton [mailto:notifications@github.com]
Sent: Monday, June 27, 2016 2:58 PM
To: ocsigen/lwt lwt@noreply.github.com
Cc: Jonathan Protzenko protz@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [ocsigen/lwt] Cannot build on windows (Lwt 2.4.5) (#84)

@braibanthttps://github.com/braibant I believe this has been solved by Cygwin upstream, as pointed out by fdopen in the duplicate issue #173#173. Current Lwt does buildhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fci.appveyor.com%2fproject%2faantron%2flwt%2fbuild%2f93%2fjob%2fwxco93cxoa5k1k9u&data=01%7c01%7cprotz%40microsoft.com%7cf25e7bb521ae459dffde08d39ed6c3d4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ojSMcym64t6cLuZSLo3iVQdReW3gEB2mgl6qCa0LE44%3d on Cygwin now.

@msprotzhttps://github.com/msprotz: This looks like a problem with something other than Lwt, I would guess OCamlbuild, but perhaps OPAM instead. Please check those projects, and let me know if you are still having this issue, if you think it is with Lwt, and you would like to resolve it :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/84#issuecomment-228888345, or mute the threadhttps://github.com/notifications/unsubscribe/AKLbmaASLUiwhKhlAXxwDsVCXTekmX-bks5qQEdWgaJpZM4Ck-vj.

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

4 participants