Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

opam install depext fails; poss due to tar given a Windows path #45

Open
sishtiaq opened this issue Mar 24, 2016 · 11 comments
Open

opam install depext fails; poss due to tar given a Windows path #45

sishtiaq opened this issue Mar 24, 2016 · 11 comments

Comments

@sishtiaq
Copy link
Contributor

  1. Start on a clean Windows 10 machine.
  2. Run the installer as per instructions: I get OCaml in C:\OCaml; I put cygwin64 in C:\cygwin64.
  3. Run 'opam init', OK.
  4. Run 'opam install depext'. The command fails while trying to bunzip2 cmdliner. An 'opam install depext --debug' output attached.

opam-install-depext

Notice that the tar command that unpacks the cmdliner package has a Windows style path. If I type this command (tar xfj c:\cygwin64... ) in a Cygwin shell, it doesn't work (fails with a very similar message of buzip2 complaining that Compressed file ends unexpectedly).

/usr/bin/tar version 1.28; /usr/bin/bunzip2 version 1.0.6.

This is not a reproducible bug. On my Windows 10 laptop, this all runs fine (tar is given a Unix-type path of /home/sishtiaq/.opam/packages.dev/cmdliner.0.9.8/cmdliner-0.9.8.tbz).
I would think this is unlikely to be a bug in the ocaml-installer, more likely in opam or Cygwin. But recording here because of the combination of circumstances to get to this bug,
Possibly related to Issue #40.

opam-install-depext.txt

@msprotz
Copy link
Collaborator

msprotz commented Jun 3, 2016

For the record, the newer readme at https://github.com/protz/ocaml-installer/wiki covers try to catch this case (most likely due to another tar in the path).

@sishtiaq
Copy link
Contributor Author

sishtiaq commented Jun 4, 2016

Out of curiousity: which tar should opam be using, then?

@ignacio-gc
Copy link

It seems that the tar that comes with cygwin, not other tar. Thanks @msprotz, I forgot to delete msys2 from path. Now I have another error, I'll trying to figure out myself.

Lambda-term installation fails with:

# install: cannot create regular file ~/.opam/system/bin/lambda-term-actions: File exists

@msprotz
Copy link
Collaborator

msprotz commented Jun 4, 2016

@sishtiaq: opam should be using the tar from cygwin.
@ignaciocaamanio: ocaml/opam#2313

Try manually fixing ~/.opam/system/repositories/default/packages/lambda-term.../files/....install to not install lambda-term-actions twice. I suspect the file is installed once by the Makefile, then a second time by the ....install file, which then fails because of the OPAM issue mentioned above.

@ignacio-gc
Copy link

Thanks. After a long time can make it work. In lambda-term.install I delete the two lines where 'lambda-term-actions' occur. Also for utop I have to add .exe to 'utop-full' and 'utop' in utop.install... and had problems with the libs path and utop... I don't know exactly how but eval opam config env was involved... thanks for the help!

@sishtiaq
Copy link
Contributor Author

sishtiaq commented Jun 5, 2016

@msprotz That means I can't have a Windows machine with "Git for Windows" on it? (VS recommends installing it!)

@ignacio-gc
Copy link

I think you can,, just don't install cygwin git, use where git to see the path of the git you are using.

Now I try to install merlin and the install script fails with syntax error near unexpected token...
¿Merlin can be installed?

@ignacio-gc
Copy link

I realized that the 64-bit version can not be installed merlin... I'll try with 32 bits.

@msprotz
Copy link
Collaborator

msprotz commented Jun 6, 2016

@sishtiaq good question; I don't use "git for windows", because it basically re-packages an entire linux set of utilities (bash, perl, and a million other files). I'd be interested in knowing if it's feasible to have the two co-exist (maybe with careful precedence of things in PATH?)

@ignaciocaamanio Merlin doesn't work because the patched version of OPAM that I'm using currently has a bug when forking out external shell commands; I have a newer version of OPAM that I can try to send you by email... contact me privately?

@ignacio-gc
Copy link

@msprotz Ok, all this was to use merlin and utop in emacs, so if you have a solution great ! How do I contact you ? There is a way in github or I should post my mail ?

@msprotz
Copy link
Collaborator

msprotz commented Jun 7, 2016

my email address is on my personal website at jonathan.protzenko.fr

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

No branches or pull requests

3 participants