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 install from opam with cygwin #596

Open
Et7f3 opened this issue Mar 23, 2019 · 2 comments
Open

can't install from opam with cygwin #596

Et7f3 opened this issue Mar 23, 2019 · 2 comments

Comments

@Et7f3
Copy link

Et7f3 commented Mar 23, 2019

Hello,

I'm Cygwin user on Windows 10. I have installed all dependencies (you can see dbm, lwt_ssl, and so on are already installed by opam)
I have this eror message. So I decide to clean and retry and get the same erorr

root@Windows10 ~
$ opam clean
Cleaning up switch ocaml-base-compiler
Clearing cache of downloaded files
Clearing logs

root@Windows10 ~
$ eval $(opam env)

root@Windows10 ~
$ opam install ocsigen-start
The following actions will be performed:
  ∗ install eliom           6.7.0 [required by ocsigen-start]
  ∗ install ocsigen-toolkit 2.1.0 [required by ocsigen-start]
  ∗ install ocsigen-start   1.5.0
===== ∗ 3 =====
Do you want to continue? [Y/n] Y

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocsigen-toolkit.2.1.0] downloaded from cache at https://opam.ocaml.org/cache
[eliom.6.7.0] downloaded from cache at https://opam.ocaml.org/cache
[ocsigen-start.1.5.0] downloaded from cache at https://opam.ocaml.org/cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of eliom failed at "/usr/bin/make".

#=== ERROR while compiling eliom.6.7.0 ========================================#
# context     2.0.3 | cygwin/x86_32 | ocaml-base-compiler.4.07.1 | https://opam.ocaml.org#2e1f5d7c
# path        ~/.opam/ocaml-base-compiler/.opam-switch/build/eliom.6.7.0
# command     /usr/bin/make
# exit-code   2
# env-file    ~/.opam/log/eliom-13183-0c525f.env
# output-file ~/.opam/log/eliom-13183-0c525f.out
### output ###
# [...]
# ocamlfind ocamlc -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp_lexer.cmo src/tools/eliompp_lexer.ml
# ocamlfind ocamlc -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp.cmo src/tools/eliompp.ml
# ocamlfind ocamlopt -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp_lexer.cmx src/tools/eliompp_lexer.ml
# ocamlfind ocamlopt -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp.cmx src/tools/eliompp.ml
# ocamlfind ocamlopt -linkpkg -g -keep-locs -package unix,str,findlib -I src/tools src/tools/eliompp_lexer.cmx src/tools/eliompp.cmx -o src/tools/eliompp.native
# ln -f src/tools/eliomc.native src/tools/js_of_eliom.native
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_bus.mli > src/lib/client/eliom_bus.mli.depends
# + ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_bus.mli > src/lib/client/eliom_bus.mli.depends
# File "_none_", line 1:
# Error: Cannot load js_of_ocaml-ppx_deriving_json: error loading shared library: Permission denied
# Command exited with code 2.
# make: *** [Makefile:7: all] Error 10



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build eliom 6.7.0
└─
╶─ No changes have been performed
root@Windows10 ~
$ opam --version
2.0.3
root@Windows10 ~
$ opam switch
#  switch               compiler                    description
   default              ocaml-system.4.04.2         default
→  ocaml-base-compiler  ocaml-base-compiler.4.07.1  ocaml-base-compiler

I gave you the version of opam. My Cygwin package are all up to date.
I have cygwin 32 bits (because 64bits can't buil dune), windows 64 bits.

@Et7f3 Et7f3 changed the title can't install from opam can't install from opam with cygwin Mar 24, 2019
@Et7f3
Copy link
Author

Et7f3 commented Mar 28, 2019

I have tested like the README
make produce the same error
make install produce this eror
make: *** No rule to make target 'eliom.install', needed by 'install'. Stop.

@Et7f3
Copy link
Author

Et7f3 commented Mar 28, 2019

I have tested form cygwin terminal or cmd
and the same bug happen so I show cmd syntax but is easy to convert to bash syntax or whatever (* ask me if you you *)

step to reproduce:

  1. Install cygwin 32 bits

  2. Install dependencies
    set root="X:\cygwin32" setup-x86.exe --site http://cygwin.mirror.constant.com --quiet-mode --root %root% --arch x86 --disable-buggy-antivirus --local-package-dir %root% --prune-install --packages opam,libgmp-devel,libssl-devel,libgdbm-devel,libpcre-devel,zlib-devel,libgtk2.0-devel,xinit

  3. init opam with ocaml-base-compiler switch (* the default can't build dune so it can't build eliom *)
    %root%\bin\opam.exe init -n --compiler=ocaml-base-compiler --switch=ocaml-base-compiler

  4. clone this repo
    %root%\bin\git clone https://github.com/ocsigen/eliom.git

  5. set some environment variable (like path) or switch to cygwin terminal (mintty will do that for you)
    dont forget to eval $(opam env)

  6. cd eliom

  7. make -n
    ocamlbuild -no-plugin -I src/ocamlbuild -no-links -use-ocamlfind build/build.native 1> /dev/null ocaml pkg/build.ml manpage=false native=true native-dynlink=true

  8. execute first line
    Ocamlbuild exit with 0 status code and doesn't print anything.

  9. execute last line
    it exit with status code 10. The last command that fail

File "src/tools/distillery.ml", line 300, characters 16-32:
Warning 3: deprecated: Stdlib.String.lowercase
Use String.lowercase_ascii instead.
+ ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_bus.mli > src/lib/client/eliom_bus.mli.depends
File "_none_", line 1:
Error: Cannot load js_of_ocaml-ppx_deriving_json: error loading shared library: Permission denied
Command exited with code 2.
Compilation unsuccessful after building 67 targets (4 cached) in 00:01:38.

Et7f3 added a commit to Et7f3/eliom that referenced this issue Mar 28, 2019
When trying to link to js_of_ocaml-ppx_deriving_json the error was permission denied so I chmod It if necessary on Cygwin.
patch for ocsigen#596
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

1 participant