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 lambda-term on Cygwin (Windows) #333

Open
gildor478 opened this issue Oct 24, 2020 · 0 comments
Open

Cannot build lambda-term on Cygwin (Windows) #333

gildor478 opened this issue Oct 24, 2020 · 0 comments
Labels

Comments

@gildor478
Copy link
Member

This bug has been migrated from artifact #1666 on forge.ocamlcore.org. It was assigned to user100.

user22826 posted on 2016-08-30 21:59:11:

Similar situation as in ocaml-community/lambda-term#27 - I'm trying to install lambda-term (as a dependency required by utop) on Windows (in Cygwin). I'm getting error like below:

---------------->8---------------->8---------------

$ opam install lambda-term
The following actions will be performed:

  • install lambda-term 1.10.1

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lambda-term: ocaml setup.ml] Command started
[lambda-term: ocaml setup.ml] Command started
[lambda-term: ocaml setup.ml] Command started
[lambda-term: ocamlfind remove] Command started

#=== ERROR while installing lambda-term.1.10.1 ================================#

opam-version 1.3.0~dev2 (d4f7e01216dbb44af4e7cc6539a1b0afa9be9d2c)

os win32

command install -m 0755 /home/Mateusz/.opam/system/build/lambda-term.1.10.1/_build/tools/lambda_term_actions.native /home/Mateusz/.opam/system/bin/lambda-term-actions

path C:\cygwin64\home\Mateusz.opam\system\build\lambda-term.1.10.1

exit-code 1

env-file C:\cygwin64\home\Mateusz.opam\log\log-2380-d2d111.env

stdout-file C:\cygwin64\home\Mateusz.opam\log\log-2380-d2d111.out

stderr-file C:\cygwin64\home\Mateusz.opam\log\log-2380-d2d111.err

stderr

install: nie można utworzyć zwykłego pliku '/home/Mateusz/.opam/system/bin/lambda-term-actions': File exists

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed

  • install lambda-term 1.10.1
    No changes have been performed

---------------->8---------------->8---------------

Looking into the directory which fails with "File exists", I'm getting:

---------------->8---------------->8---------------

$ ls /home/Mateusz/.opam/system/bin/
bdump.exe cygwin-dl.exe lambda-term-actions.exe ocamlfind.exe ocamlmod.exe ppx_lwt.exe ydump.exe
cppo.exe cygwin-install.exe oasis.exe ocamlify.exe pkg-config.exe safe_camlp4

---------------->8---------------->8---------------

so, it seems a *.exe file is present (lambda-term-actions.exe), and it results in "install" failing. I suppose this may be some Cygwin peculiarity (?), but still, it results in not being able to install the package on Windows... and as a result, making utop inaccessible, unfortunately. Could you possibly help resolve this issue somehow?

By the way, I've tried doing opam upgrade oasis, and it seems to report as 0.4.7; I then tried to use it to rebuild lambda-term's setup.ml (with oasis setup), but it still seems to fail to install when I do opam install lambda-term afterwards.

Thanks in advance.

user22826 replied on 2016-08-30 22:09:02:

Hmh; it seems the setup.ml gets actually generated by 0.4.6, although I have 0.4.7 installed; not sure how to change it (but not sure if it would help either?).

user22826 replied on 2016-08-30 22:24:03:

Also found additional info here: ocaml/opam#2313, but I don't really understand it, as I'm a total noob in OCaml world :/ was hoping to use utop to help me learn it :/ The lambda-term repo doesn't seem to have "lambda-term.install" file (https://github.com/diml/lambda-term), but on my disk it's present in ~/.opam/system/build/lambda-term.1.10.1 (after opam install atttempt).

user102 replied on 2016-08-31 06:31:34:

The issue is that lambda-term is referenced in the .install (OPAM) and also installed by OASIS. Please forward this issue to the maintainer of the utop package (e.g. diml). He should remove the file from .install (OPAM).

user884 replied on 2016-08-31 16:54:36:

It's a bug in OPAM on Windows. The workaround (mentioned in the issue on github) is to remove the ".install" file from your local OPAM repository in ~/.opam/packages/.... See first item at https://github.com/protz/ocaml-installer/wiki#troubleshooting

user22826 replied on 2016-08-31 20:45:04:

Wow, cool, it worked, thanks Jonathan! I've followed your guide some time ago and started to install the stuff, but this hint wasn't there yet :)

With that said, do you know by chance what's the real place where this actually needs to be solved? It seems to get kinda bounced between OPAM issue tracker, projects themselves, and now here, hot potato style... me, I haven't started learning OCaml yet, so don't know enough to debug this by myself...

user884 replied on 2016-08-31 21:02:19:

Probably in OPAM... I don't know the status of David Allsopp's OPAM-on-Windows fork, but that's probably one of the things that he will eventually fix, I guess.

In the meanwhile, if you have a modern windows, as a Microsoft employee, I would strongly advise you to try my company's greatest innovation for developers, that is, running Linux binaries on Windows (see https://msdn.microsoft.com/en-us/commandline/wsl/about). OPAM works great in that setting!

@gildor478 gildor478 added the bug label Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant