Skip to content

odb not working #14

Closed
ygrek opened this Issue Jun 12, 2012 · 6 comments

2 participants

@ygrek
ygrek commented Jun 12, 2012

Consider:

$ curl -O https://raw.github.com/thelema/odb/master/odb.ml
$ ocaml odb.ml extunix
Installing extunix
Installing oUnit
Deps for oUnit satisfied

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 52677  100 52677    0     0  31432      0  0:00:01  0:00:01 --:--:--  103k
package downloaded to C:\cygwin\home\user\.odb\install-oUnit\ounit-1.1.1
I: Running command 'C:\Program Files\OCaml\bin\ocamlc.opt.EXE -config > "C:\cygwin\tmp\oasis-041201.txt"'
"C:\Program" ▒▒ ▒▒▒▒ ▒▒▒▒७▒▒▒ ▒▒▒ ▒▒▒譥▒
▒▒▒▒▒▒▒▒, ▒ᯮ▒▒塞▒▒ ▒ணࠬ▒▒▒ ▒▒▒ ▒▒▒▒▒▒ 䠩▒▒▒.
I: Running command 'C:\Program Files\OCaml\bin\ocamlfind.EXE query -format %v findlib > "C:\cygwin\tmp\oasis-22df40.txt"'
"C:\Program" ▒▒ ▒▒▒▒ ▒▒▒▒७▒▒▒ ▒▒▒ ▒▒▒譥▒
▒▒▒▒▒▒▒▒, ▒ᯮ▒▒塞▒▒ ▒ணࠬ▒▒▒ ▒▒▒ ▒▒▒▒▒▒ 䠩▒▒▒.
I: Running command 'C:\Program Files\OCaml\bin\ocamlfind.EXE query -format %d unix > "C:\cygwin\tmp\oasis-ad47ac.txt"'
"C:\Program" ▒▒ ▒▒▒▒ ▒▒▒▒७▒▒▒ ▒▒▒ ▒▒▒譥▒
▒▒▒▒▒▒▒▒, ▒ᯮ▒▒塞▒▒ ▒ணࠬ▒▒▒ ▒▒▒ ▒▒▒▒▒▒ 䠩▒▒▒.
W: Field 'pkg_unix' is not set: Command 'C:\Program Files\OCaml\bin\ocamlfind.EXE query -format %d unix > "C:\cygwin\tmp\oasis-ad47ac.txt"' terminated with error code 1
E: Cannot find findlib package unix
E: Failure("1 configuration error")
Exception: Failure "Could not configure oUnit".

Not sure whose bug is this (oasis?), but something inside me tells that installing ocaml into path with spaces (Program Files) by default is not the best idea.. Many existing (unix-land) tools are not ready for such an adventure. After installing into C:\ocaml-4.00-beta2 everything worked fine (modulo oUnit not ready for ocaml 4.00).
So my suggestion is to default installation path to something without spaces (fixing all the software and libraries out there is a loosing fight - I abandoned hope many years ago).

@ygrek
ygrek commented Jun 12, 2012

and add a warning if the user manually chooses path with spaces

@protz
Owner
protz commented Jun 12, 2012

Well Sylvain sent me a test package (lwt I think) whose setup.ml was generated using the latest version of Oasis, and there was no issue as far as I could tell. I'm not sure about installing into c:\ocaml.

  • Non-administrator users need to be able to install into their local directories, which means c:\documents and settings\user\local applications or whatever, and there will be spaces in there, so putting the default location to c:\ocaml sounds like we'll just make the problem less obvious, but still present for some users.
  • Installing into c:\ocaml feels 1997-ish and not native :) -- the goal of the installer is to provide a native solution.
  • The bug seems findlib-related, and I'm not sure I see the link to spaces in the path.

I just tried ocaml odb.ml extunix and I got:

E: Failure("Malformed log file 'C:\\cygwin\\home\\jonathan\\.odb\\install-oUnit\\ounit-1.1.1\\setup.log' at line 1")

Which is one of the bugs that have been fixed with more recent versions of oasis. Can you try to regenerate the ounit setup.ml with the latest version of Oasis see if the problem goes away?

Thanks,

jonathan

@protz
Owner
protz commented Jun 12, 2012

Alright, I just tried with spaces in the path and the latest version of oasis, and indeed, I'm getting errors. I'll email Sylvain see if he can fix the bug. Thanks for reporting!

@ygrek
ygrek commented Jun 12, 2012

I guess oasis fix and a release will take some time, regenerating all packages out there - even more time. And this means that all that time users of the installer will not be able to install the majority of ocaml libraries. Moreover I expect that similar issues with not-oasis-enabled libraries will arise too. Maybe installer could check whether it has enough permission to create folder in C:\ and use it if possible. Note that tcl installer proposes C:\tcl by default and doesn't care. Also, AFAIR home directory on recent windows versions is C:\users (without spaces). Anyway, I think that warning along the lines of "Installing into path without spaces is preferred to achieve maximum compatibility with third-party libraries and tools" would be appropriate.

@protz
Owner
protz commented Jun 14, 2012

Good points. I think installing by default in c:\ocaml is a good thing, and I'll add the warning as well.

@protz protz added a commit that closed this issue Jul 20, 2012
@protz We shouldn't install in a location with spaces.
- The default install location is now C:\OCaml (sigh...).
- We check for spaces before proceeding, and give the user a chance to return to
  the previous path to pick another install location.

This fixes #14.
a83e8ac
@protz protz closed this in a83e8ac Jul 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.