<div dir="ltr"><div><div>Thanks,<br><br></div>I'll try to see if there is a way in mix file to specifiy what projects should be built without HIPE. It's not so simple to take every single dep and modify :) <br><br></div>Silviu<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 4:51 PM, Kostis Sagonas <span dir="ltr"><<a href="mailto:kostis@cs.ntua.gr" target="_blank">kostis@cs.ntua.gr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/06/17 16:45, Caragea Silviu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
When I compile using HIPE: ERL_COMPILER_OPTIONS="[native,<wbr>{hipe, [o3]}]"<br>
<br>
All dependencies using NIF's are failing to compile:<br>
<br>
<HiPE (v 3.15.3)> EXITED with reason {'trans_fun/2',on_load}<br>
@hipe_beam_to_icode:1148<br>
<br>
Is this an expected behavior or anything I can do to bypass this ?<br>
</blockquote>
<br></span>
Yes, this is expected behaviour.<br>
<br>
The on_load attribute instructs the BEAM loader to do its magic when loading this module (typically containing NIFs). Files containing NIFs typically only contain very minimal Erlang code so they do not benefit much from native code compilation anyway. So simply do not compile them to native code.<br>
<br>
Perhaps adding an attribute<br>
<br>
-compile(no_native).<br>
<br>
on the source of the file will solve the problem?<span class="HOEnZb"><font color="#888888"><br>
<br>
Kostis<br>
</font></span></blockquote></div><br></div>