Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006445OCamltools (ocaml{lex,yacc,dep,debug,...})public2014-05-30 12:182016-12-07 11:34
Assigned Todoligez 
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 -build
Failure: ocamlfind not found on path, but -no-ocamlfind not used.
Additional Informationocamlfind is searched by Command.search_in_path cmd in, 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 0006092resolved Broken logic of finding tools on PATH in ocamlbuild 

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

Alain, can you help (or if not, can you suggest someone?)
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).
shinwell (developer)
2014-06-02 09:19

Jeremie tells me that Gabriel is an ocamlbuild expert, so let's try :)
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 [^] 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.
doligez (administrator)
2014-07-11 13:14

Regarding lines 289-290 of, 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.
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
2016-12-07 11:34 xleroy Status resolved => closed
2016-12-07 16:37 doligez Category OCaml tools (ocaml{lex,yacc,dep,browser,debug}) => OCaml tools (ocaml{lex,yacc,dep,debug})
2017-02-23 16:45 doligez Category OCaml tools (ocaml{lex,yacc,dep,debug}) => tools (ocaml{lex,yacc,dep,debug,...})

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker