trifork / erjang

A JVM-based Erlang VM
http://www.erjang.org
Apache License 2.0
726 stars 62 forks source link

[otp] io:fwrite/2 does not appear? #9

Closed krestenkrab closed 14 years ago

krestenkrab commented 14 years ago

It seems that even though we succeed loading and compiling io, the function fwrite/2 is not there anyway? This is strange. The module compiles and loads with no complaints; perhaps a race condition?

resolving io:fwrite/2
{get_file,"./io.beam"}
{return,{error,enoent}}
{get_file,"/sw/lib/erlang/lib/kernel-2.13.3/ebin/io.beam"}
{return,{error,enoent}}
{get_file,"/sw/lib/erlang/lib/stdlib-1.16.3/ebin/io.beam"}
{return,{ok,<<70,79,82,49,0,0,60,208,66,69,65,77,65,116,111,109,0,0,2,174,...,0>>}}
{get_cwd,[]}
{return,{ok,"/Users/krab/Documents/humio/erlang"}}
[compiling io:98ms]exiting PID<:351> with: erjang.ErlangRaise: {undef,[{io,fwrite,[<<69,115,104,101,108,108,32,86,126,115,32,32,40,97,98,111,114,116,32,119,...,10>>,["5.7.3"]]},{shell,server,1},{erlang,apply,2}]}
at erjang.ERT.raise(ERT.java:62)
at erjang.ERT.do_raise(ERT.java:48)
at erjang.m.error_handler.error_handler.crash__1(Unknown Source)
at erjang.m.error_handler.error_handler$FN_crash__1.go(Unknown Source)
at erjang.m.error_handler.error_handler$FN_undefined_function__3.invoke(Unknown Source)
at erjang.EFun3.invoke(Unknown Source)
at erjang.EFun.apply(EFun.java:422)
krestenkrab commented 14 years ago

Duh! this is because of the dummy io module. If we remove this, then the problem goes away.

eriksoe commented 14 years ago

Indeed... Close this?

krestenkrab commented 14 years ago

Yep. closed.