|Anonymous | Login | Signup for a new account||2019-02-20 14:01 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006626||OCaml||-for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues||public||2014-10-24 12:07||2015-03-12 19:26|
|Target Version||Fixed in Version||4.02.2+dev / +rc1|
|Summary||0006626: ocamlbuild on cygwin cannot find ocamlfind|
|Description||"Failure: ocamlfind not found on path, but -no-ocamlfind not used."|
ocamlbuild should append .exe extension to filename when looking for
executables on os_type 'Cygwin' (same as os_type 'Win32')
|Steps To Reproduce||ocamlbuild fails in "opam install react" with the following error:|
"Failure: ocamlfind not found on path, but -no-ocamlfind not used."
This is where the exception is thrown:
It is the result of Command.search_in_path not finding ocamlfind:
Which appears to be caused by file_or_exe_exists not appending ".exe" to the filename when Sys.os_type = "Cygwin" (which is what I see as os_type when compiling on cygwin):
|Additional Information||I submitted a simple fix here: https://github.com/ocaml/ocaml/pull/108 [^]|
It was suggested on the mailing list that a more elaborate fix was necessary, using Filename.check_suffix Config.default_executable_name ".exe" as the condition, but I haven't done that (yet). Let me know if I should.
|Tags||No tags attached.|
|Attached Files||ocaml-4.02.1+cygwin.patch [^] (616 bytes) 2014-11-05 19:15 [Show Content]|
|I don't think it should be keyed on Config.default_executable_name: it's just a default name, not a strong statement about the OS.|
Sorry - uploaded that patch before discovering that it was the same as the one in the pull request (I'd read Damien's note first). :$
My suggestion on the OCaml list is indeed flawed, but not quite for Damien's reasons - Cygwin executables can choose not to have the ".exe" suffix and still be executable.
It would still be useful to have a new Sys.executable_suffix for the native ports - that way MSVC, MSVC64, MinGW & MinGW64 could have ".exe" (i.e. executable files *must* end with .exe) but Cygwin, like Unix, would remain with "" and simply be an annoying special case in code!
|This patch was applied in trunk (commit 15577) and 4.02 (15578).|
Damien, I'm still seeing this on 4.02.1, am I missing something?
protz@Joprotze-Z420:~/.opam/4.02.1/build/fix.20130611 $ ocamlbuild -use-ocamlfind -cflags "-g" -lflags "-g" -classic-display Fix.cma Fix.cmxa Failure: ocamlfind not found on path, but -no-ocamlfind not used.
|2014-10-24 12:07||algoriddle||New Issue|
|2014-10-29 17:52||doligez||Note Added: 0012467|
|2014-11-05 19:15||dra||File Added: ocaml-4.02.1+cygwin.patch|
|2014-11-05 19:25||dra||Note Added: 0012492|
|2014-12-18 00:16||doligez||Note Added: 0012846|
|2014-12-18 00:18||doligez||Status||new => closed|
|2014-12-18 00:18||doligez||Resolution||open => fixed|
|2014-12-18 00:18||doligez||Fixed in Version||=> 4.02.2+dev / +rc1|
|2015-03-12 19:26||protz||Note Added: 0013482|
|2017-02-23 16:34||doligez||Category||OCamlbuild (the tool) => for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^]|
|2017-02-23 16:44||doligez||Category||for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^] => -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^]|
|Copyright © 2000 - 2011 MantisBT Group|