<p>You can try running erl.exe with sasl enabled to get better error messages.</p>
<p>The messages you see at the moment are coming out interleaved, like in the old joke "When faced with a problem you decide to use threading, ..."  :-)</p>
<p>Robby<br>
</p>
<div class="gmail_quote">On Jan 3, 2013 4:53 AM, "SurferJeff" <<a href="mailto:surferjeff@gmail.com">surferjeff@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I found the recipe to build debug:</div><div><pre>$ cd $ERL_TOP
$ rm bin/win32/erlexec.dll
$ cd erts/emulator
$ make debug
$ cd ../etc
$ make debug</pre></div><div> </div><div>And it succeeded.  However, the next command in the recipe fails:</div><div><a href="mailto:jeff@lenovo" target="_blank"><font face="courier new,monospace">jeff@lenovo</font></a><font face="courier new,monospace"> /cygdrive/c/Users/jeff/GitHub/otp<br>
$ make local_setup<br>make[1]: Entering directory `/cygdrive/c/Users/jeff/GitHub/otp/erts'<br>make[2]: Entering directory `/cygdrive/c/Users/jeff/GitHub/otp/erts/start_script<br>s'<br>make[2]: Nothing to be done for `debug'.<br>
make[2]: Leaving directory `/cygdrive/c/Users/jeff/GitHub/otp/erts/start_scripts<br>'<br>ct_run.exe dialyzer.exe erl.ini erl_crash.dump escript.exe run_test.exe typer.ex<br>e werl.exe win32<br>make[2]: Entering directory `/cygdrive/c/Users/jeff/GitHub/otp/erts/start_script<br>
s'<br>/usr/bin/install -c -d /cygdrive/c/users/jeff/github/otp/erts/start_scripts/tmp<br>( cd /cygdrive/c/users/jeff/github/otp/erts/start_scripts/tmp && \<br>  erlc -W  -I/cygdrive/c/users/jeff/github/otp/lib/kernel/ebin -I/cygdrive/c/use<br>
rs/jeff/github/otp/lib/stdlib/ebin -I/cygdrive/c/users/jeff/github/otp/lib/sasl/<br>ebin +no_warn_sasl +otp_build -o /cygdrive/c/users/jeff/github/otp/bin/start.scr<br>ipt /cygdrive/c/users/jeff/github/otp/erts/start_scripts/start_clean.rel )<br>
File not found: "c:/cygdrive/c/users/jeff/github/otp/erts/start_scripts/start_cl<br>ean.rel"<br>Makefile:129: recipe for target `/cygdrive/c/users/jeff/github/otp/bin/start.scr<br>ipt' failed<br>make[2]: *** [/cygdrive/c/users/jeff/github/otp/bin/start.script] Error 1<br>
make[2]: Leaving directory `/cygdrive/c/Users/jeff/GitHub/otp/erts/start_scripts<br>'<br>Makefile:69: recipe for target `local_setup' failed<br>make[1]: *** [local_setup] Error 2<br>make[1]: Leaving directory `/cygdrive/c/Users/jeff/GitHub/otp/erts'<br>
Makefile:883: recipe for target `local_setup' failed<br>make: *** [local_setup] Error 2</font></div><div><font face="courier new,monospace"></font> </div><div> </div><div>And now my erl.exe is completely hosed:</div><div>
<a href="mailto:jeff@lenovo" target="_blank"><font face="courier new,monospace">jeff@lenovo</font></a><font face="courier new,monospace"> /cygdrive/c/Users/jeff/GitHub/otp/bin/win32<br>$ ./erl.exe<br>{(no error logger present"i)n ietr rtoerr: m"iEnrartoirn gi ni np rdooc_ebsoost<br>
"<,0{.b2a.d0a>r wgi,t[h{ eerxli_tp rviaml_uleo:a d{ebra,dcahregc,k[_{feirlle__pr<br>reismu_llto,a3d,e[r{,fcihleec,k"_efrill_ep_rriems_ullota,d3er,[.{efrill"e},,\{"l<br>eirnle_,p28r3i}m]_}l,o{aidneirt.,egrelt\_"b}o,o{tl,i1n,e[,{2f8i3l}e,]"}i,n{iitn.<br>
ite,rgle"t},_{bloionte,,178,5[}{]f}i,l{ei,n\i"ti,ngiett._ebrolo\t",}2,,{[l{ifnie<br>l,e7,8"5i}n]i}t,.{eirnli"t},,g{elti_nbeo,o77t2,}2]},,[{{ifniilte,,d\o"_ibnoiott.<br>,e3r,l[\{"f}i,l{el,i"nien,i7t7.2e}r]l}",}{,i{nliitn,ed,o73_9b}o]o}t],}3},<br>
[{file,\"init.erl\"},{line,739}]}]}\n"</font></div><div><font face="courier new,monospace">Crash dump was written to: erl_crash.dump<br>init terminating in do_boot ()<br></font></div><div> </div><div><br>On Wednesday, January 2, 2013 7:26:09 PM UTC-8, SurferJeff wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">I'm working through the example here:
<br><a href="http://www.erlang.org/doc/tutorial/c_portdriver.html" target="_blank">http://www.erlang.org/doc/<u></u>tutorial/c_portdriver.html</a>
<br>And I'm trying to get it to run on Windows.  I reordered the code in the C
<br>source so that it compiles, and added a module.def file so that erlang
<br>actually finds and executes the driver init function.
<br>
<br>I attached a debugger.  Walking back up the stack, I observe that:
<br>The driver init function returns correctly.
<br>erts_sys_ddll_call_init() returns correctly.
<br>do_load_driver_entry() returns ERL_DE_NO_ERROR.
<br>load_driver_entry() returns ERL_DE_NO_ERROR.
<br>erl_ddll_try_load_3 returns t = TUPLE2(hp, am_ok, ok_term); on line 417 of
<br>erl_bif_ddl.c.
<br>But the next higher call on the stack is _process_main(), which was compiled
<br>with gcc and has no debug symbols so I can't step through and figure out why
<br>the end result is:
<br>
<br>=ERROR REPORT==== 2-Jan-2013::19:14:22 ===
<br>Error in process <0.31.0> with exit value:
<br>{enoent,[{erlang,open_port,[{<u></u>spawn,"example_drv"},[]],[]},{<u></u>complex5,init,1,[
<br>{file,"c:/Users/jeff/code/<u></u>code/port_driver/complex5.erl"<u></u>},{line,19}]}]}
<br>
<br>Has anyone seen this before?
<br>
<br>If not, how do I recompile erl.exe purely with cl.exe (no gcc) so that it
<br>generates debug symbols?  And while I'm recompiling, how do I turn off all
<br>optimizations?  I can read basic make files, but I get lost in the configure
<br>scripts and .in and .mk files.  Please take pity on a Windows programmer ;-)
<br>
<br>
<br>______________________________<u></u>_________________
<br>erlang-questions mailing list
<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a>
<br></blockquote><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>