[erlang-questions] NIF + HiPE - can it works together?

Radosław Bułat radek.bulat@REDACTED
Tue Jun 7 01:15:25 CEST 2011


2011/6/6 Mikael Pettersson <mikpe@REDACTED>:
> Please post a standalone and minimal test case.
>
Yeah, sure.

$ git clone https://github.com/radarek/nif_with_hipe
$ cd nif_with_hipe
$ less README

$ cat rebar.config
$ ./rebar compile # compile with hipe support (see rebar.config)
$ erl -pa ../nif_with_hipe/ebin/ -s nif_with_hipe start -s init stop
Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

{"init terminating in do_boot",{{badmatch,{error,{bad_lib,"Library
module name 'nif_with_hipe' does not match calling module
'init'"}}},[{nif_with_hipe,load_nif,0},{nif_with_hipe,start,0},{code,lib_dir,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

$ # now remove rebar.config and run again
$ mv rebar.config rebar.config.deleted
$ ./rebar clean compile
$ erl -pa ../nif_with_hipe/ebin/ -s nif_with_hipe start -s init stop
'atom from nif!'
Eshell V5.8.4  (abort with ^G)
1>


-- 
Pozdrawiam

Radosław Bułat
http://radarek.jogger.pl - mój blog



More information about the erlang-questions mailing list