Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006445OCamlOCaml tools (ocaml{lex,yacc,dep,browser,debug})public2014-05-30 12:182014-07-19 23:38
Reporterfuruse 
Assigned Todoligez 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformMingwOSOS Version
Product Version4.01.0 
Target Version4.02.0+devFixed in Version4.02.0+dev 
Summary0006445: 4.02.0+dev: ocamlbuild fails to find ocamlfind.exe
DescriptionIt 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 Informationocamlfind 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.
TagsNo tags attached.
Attached Files

- Relationships
child of 0006092acknowledged Broken logic of finding tools on PATH in ocamlbuild 

-  Notes
(0011603)
shinwell (developer)
2014-05-30 15:03

Alain, can you help (or if not, can you suggest someone?)
(0011615)
frisch (developer)
2014-05-31 19:18

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).
(0011617)
shinwell (developer)
2014-06-02 09:19

Jeremie tells me that Gabriel is an ocamlbuild expert, so let's try :)
(0011623)
protz (manager)
2014-06-02 14:08

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:
- commands are executed via bash -c
- cygwin arrives in-between and somehow tries to parse stuff with different quoting conventions depending on whether the path to the executable looks windows-y or cygwin-y
- the resulting program receives a different argv

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.
(0011799)
doligez (administrator)
2014-07-11 13:14

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.
(0011889)
doligez (administrator)
2014-07-19 23:38

I have fixed this one (commit 15014) but there seems to be other problems.

- Issue History
Date Modified Username Field Change
2014-05-30 12:18 furuse New Issue
2014-05-30 15:03 shinwell Note Added: 0011603
2014-05-30 15:03 shinwell Assigned To => frisch
2014-05-30 15:03 shinwell Status new => assigned
2014-05-31 19:18 frisch Note Added: 0011615
2014-05-31 19:18 frisch Assigned To frisch =>
2014-06-02 09:19 shinwell Note Added: 0011617
2014-06-02 09:20 shinwell Assigned To => gasche
2014-06-02 14:08 protz Note Added: 0011623
2014-07-11 13:14 doligez Note Added: 0011799
2014-07-16 16:58 doligez Target Version => 4.02.0+dev
2014-07-17 16:24 doligez Relationship added child of 0006092
2014-07-18 09:42 doligez Assigned To gasche => doligez
2014-07-19 23:38 doligez Note Added: 0011889
2014-07-19 23:38 doligez Status assigned => resolved
2014-07-19 23:38 doligez Resolution open => fixed
2014-07-19 23:38 doligez Fixed in Version => 4.02.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker