I encountered the above error while trying to build an Erlang RabbitMQ plugin using MinGW/MSYS on Windows 7 (64 bit). I'm using Erlang v5.10.3 (32 bit). I'm able to run RabbitMQ on my system.
Fujitsu@Notebook /d/RabbitMQ/build-source/rabbitmq-public-umbrella/presence-exchange-master
$ make
[elided] generate deps
escript: exception error: no match of right hand side value {error,enoent}
in function generate_deps__escript__1389__793192__493000:detect_deps/5 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 40)
in call from generate_deps__escript__1389__793192__493000:'-main/1-fun-0-'/6 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 19)
in call from lists:foldl/3 (lists.erl, line 1248)
in call from generate_deps__escript__1389__793192__493000:main/1 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 17)
in call from escript:run/2 (escript.erl, line 747)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1 (init.erl, line 1054)
in call from init:start_em/1 (init.erl, line 1034)
I've posted the full error on pastebin - http://pastebin.com/S739wfhB The complete code for generate_deps can be found here - http://pastebin.com/N4HVz8z1
Ps. I've also tried using CYGWIN but it returns another error - escript: Failed to open file: /home/Fujitsu/rabbitmq/build-source/rabbitmq-public-umbrella/generate_deps
EDIT 1
CYGWIN returns:
$ make
[elided] generate deps
escript: Failed to open file: /cygdrive/d/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps
[elided] generate deps
escript: Failed to open file: /cygdrive/d/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps
make: *** No rule to make target 'build/deps.mk', needed by 'ebin/presence_exchange.beam'. Stop.
However, I'm able to open the file using the head command.
Fujitsu@Notebook /cygdrive/d/RabbitMQ/build-source/rabbitmq-public-umbrella/presence-exchange-master
$ head /cygdrive/d/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps
#!/usr/bin/env escript
%% -*- erlang -*-
-mode(compile).
%% We expect the list of Erlang source and header files to arrive on
%% stdin, with the entries colon-separated.
main([TargetFile, EbinDir]) ->
ErlsAndHrls = [ string:strip(S,left) ||
S <- string:tokens(io:get_line(""), ":\n")],
ErlFiles = [F || F <- ErlsAndHrls, lists:suffix(".erl", F)],