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
4.02.0+dev: ocamlbuild fails to find ocamlfind.exe #6445
Comments
Comment author: @mshinwell Alain, can you help (or if not, can you suggest someone?) |
Comment author: @alainfrisch I'd prefer is someone more knowledgeable about ocamlbuild would look at it. I've zero experience with the tool (it has been removed from LexiFi's version of OCaml for a long time). |
Comment author: @mshinwell Jeremie tells me that Gabriel is an ocamlbuild expert, so let's try :) |
Comment author: @protz The double simple quote was added by myself (with Damien looking over my shoulder), because of a complex quoting issue with Cygwin. I only dimly recall what happened, but:
You can see the gory details in the original question that I asked on SO is http://stackoverflow.com/questions/9946586/cygwin-bash-c-yields-different-argc-depending-on-whether-the-command-start-with but the answer I picked did not really solve my problem. It looks like these simple quotes are added erroneously in that particular case, but still need to be there to guarantee a consistent quoting behavior on windows in all situations. |
Comment author: @damiendoligez Regarding lines 289-290 of options.ml, it feels wrong to be feeding the result of Command.string_of_command_spec (a command line with quoted names intended for the shell) into Command.search_in_path (which only expects a command name). I suggest removing the call to string_of_command_spec and passing directly the string "ocamlfind" to search_in_path. |
Comment author: @damiendoligez I have fixed this one (commit 15014) but there seems to be other problems. |
Original bug ID: 6445
Reporter: furuse
Assigned to: @damiendoligez
Status: closed (set by @xavierleroy on 2016-12-07T10:34:21Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: Mingw
Version: 4.01.0
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: tools (ocaml{lex,yacc,dep,debug,...})
Child of: #6092
Bug description
It seems that ocamlbuild 4.02.0 fails to find ocamlfind.exe in MinGW build:
To compiile pcre-ocaml-7.0.4, I see:
$ ocaml setup.ml -build
Failure: ocamlfind not found on path, but -no-ocamlfind not used.
Additional information
ocamlfind is searched by Command.search_in_path cmd in options.ml, where
cmd = Command.string_of_command_spec (A "ocamlfind")
cmd is "''ocamlfind" in Win32. I do not follow later but it seems to cause the problem.
If I override cmd by "ocamlfind" then ocamlbuild succeeds finding it.
The text was updated successfully, but these errors were encountered: