[erlang-questions] escript run from a rebar post_hook throwing "erlexec" error on Windows

44 views
Skip to first unread message

Jesse Gumm

unread,
Oct 19, 2012, 2:32:33 AM10/19/12
to Erlang Questions
Hey Everyone,

I'm running into a bit of an issue in trying to compile the mimetypes package.

I'm trying to compile the mimetypes library as a rebar dependency to
simple_bridge (and Nitrogen), and it's throwing the error "erlexec.exe
not found" when it tries to run the post_hook: {"win32", compile,
"escript.exe post_compile.escript"}. Further, this is being run within
a rebar/reltool-generated release.

If I try to run the escript directly from the command-line, it works
just fine. If I prepend the generated release's bin directory to the
windows PATH it also works just fine (manually running the escript
with: "escript.exe post_compile.escript").

Also, the environment is within a msysgit (mingw) session.

What's interesting about this is that this broke between R15B and
R15B01. On R15B, it all works just fine, whereas on R15B01 and R15B02
it generates the error.

I've tested this with R15B - R15B02 on both Windows 7, Windows XP, and
Linux. Linux (as expected) works reliably.

You can test this yourself if you follow the instructions I've written
up for building Nitrogen on Windows (which works reliably with R15B):
https://github.com/nitrogen/nitrogen/blob/master/rel/overlay/win/README.md

To help with debugging, I enabled ultra-verbose mode with rebar and
this is the complete error: http://ideone.com/p7Dv7

If anyone has any thoughts or what has changed that might cause this,
and more importantly, what would be the solution, I'm all ears.

Thanks in advance if anyone has anything,

-Jesse

--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Jesse Gumm

unread,
Oct 22, 2012, 5:40:22 AM10/22/12
to Erlang Questions

I'm giving this a quick bump. Anyone have any insight as to why this would work for R15B, but break after R15B01?

--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

David Mercer

unread,
Oct 22, 2012, 12:17:59 PM10/22/12
to Jesse Gumm, Erlang Questions
On Friday, October 19, 2012, Jesse Gumm wrote:

> I'm running into a bit of an issue in trying to compile the mimetypes
> package.
. . .
> I've tested this with R15B - R15B02 on both Windows 7, Windows XP, and
> Linux. Linux (as expected) works reliably.

I had issues with the mimetypes application on Windows because it expected Unix line-endings in one of the files. I submitted a patch for it, and if my deciphering of GitHub is correct, I think it got merged into the main branch. (I'm not a GitHub guru, though, so maybe I did it wrong.) Check to make sure you've got the most recent version.

Once I made that change, it did work for me, so I can confirm that it can work on Windows.

Otherwise, I can't help you.

Cheers,

DBM

Jesse Gumm

unread,
Oct 22, 2012, 12:44:43 PM10/22/12
to David Mercer, Erlang Questions

Hi David,

I do indeed have the latest version of  mimetypes.

Oddly, I can actually build the mimetypes app directly just fine.

The problem is when it's used as a dependency in a reltool generated release, rebar crashes when it does the post_hooks.

I've done a quick git blame on erlexec.c and escript.c and nothing stands out (neither of them have really changed at all). I've tried newer and older versions of rebar. All with the same result.

The only variable that changes things is which version of Erlang. R15B works, R15B01 and R15B02 do not. Maybe I have to look at erl.c. I don't know.

Thanks though,

--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Reply all
Reply to author
Forward
0 new messages