Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhumbertgz/ee0bf432edfa89ffa0a47405f3250fcd to your computer and use it in GitHub Desktop.
Save rhumbertgz/ee0bf432edfa89ffa0a47405f3250fcd to your computer and use it in GitHub Desktop.
Compilation issues with OTP 18.3: "Failed to load erlang_js_drv.so"
Hello, I have been trying to compile erlang_js with OTP 18.3, but allways I get this message "Failed to load erlang_js_drv.so".
I tried in Ubunto 14.0.04 and OSX 10.11.4
Erlang log:
======================================================================================
==> erlang_js (eunit)
Compiled src/js_driver.erl
=PROGRESS REPORT==== 13-May-2016::09:59:48 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.164.0>},
{id,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 13-May-2016::09:59:48 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.165.0>},
{id,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 13-May-2016::09:59:48 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.163.0>},
{id,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 13-May-2016::09:59:48 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.166.0>},
{id,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 13-May-2016::09:59:48 ===
application: sasl
started_at: nonode@nohost
=ERROR REPORT==== 13-May-2016::09:59:48 ===
Error loading "erlang_js_drv": "dlopen(/Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so, 2): Symbol not found: _erl_exit\n Referenced from: /Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so\n Expected in: flat namespace\n in /Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so"
=CRASH REPORT==== 13-May-2016::09:59:48 ===
crasher:
initial call: supervisor:erlang_js_sup/1
pid: <0.171.0>
registered_name: erlang_js_sup
exception exit: {bad_return_value,
{error,
{load_error,"Failed to load erlang_js_drv.so"}}}
in function gen_server:init_it/6 (gen_server.erl, line 356)
ancestors: [<0.170.0>]
messages: []
links: [<0.170.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1598
stack_size: 27
reductions: 207
neighbours:
=CRASH REPORT==== 13-May-2016::09:59:48 ===
crasher:
initial call: application_master:init/4
pid: <0.169.0>
registered_name: []
exception exit: {{bad_return_value,
{error,
{load_error,"Failed to load erlang_js_drv.so"}}},
{erlang_js,start,[normal,[]]}}
in function application_master:init/4 (application_master.erl, line 134)
ancestors: [<0.168.0>]
messages: [{'EXIT',<0.170.0>,normal}]
links: [<0.168.0>,<0.7.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 376
stack_size: 27
reductions: 118
neighbours:
=INFO REPORT==== 13-May-2016::09:59:48 ===
application: erlang_js
exited: {{bad_return_value,
{error,{load_error,"Failed to load erlang_js_drv.so"}}},
{erlang_js,start,[normal,[]]}}
type: temporary
=ERROR REPORT==== 13-May-2016::09:59:48 ===
Error loading "erlang_js_drv": "dlopen(/Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so, 2): Symbol not found: _erl_exit\n Referenced from: /Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so\n Expected in: flat namespace\n in /Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/erlang_js_drv.so"
=CRASH REPORT==== 13-May-2016::09:59:48 ===
crasher:
initial call: supervisor:erlang_js_sup/1
pid: <0.175.0>
registered_name: erlang_js_sup
exception exit: {bad_return_value,
{error,
{load_error,"Failed to load erlang_js_drv.so"}}}
in function gen_server:init_it/6 (gen_server.erl, line 356)
ancestors: [<0.174.0>]
messages: []
links: [<0.174.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1598
stack_size: 27
reductions: 207
neighbours:
=CRASH REPORT==== 13-May-2016::09:59:48 ===
crasher:
initial call: application_master:init/4
pid: <0.173.0>
registered_name: []
exception exit: {{bad_return_value,
{error,
{load_error,"Failed to load erlang_js_drv.so"}}},
{erlang_js,start,[normal,[]]}}
in function application_master:init/4 (application_master.erl, line 134)
ancestors: [<0.172.0>]
messages: [{'EXIT',<0.174.0>,normal}]
links: [<0.172.0>,<0.7.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 376
stack_size: 27
reductions: 118
neighbours:
=INFO REPORT==== 13-May-2016::09:59:48 ===
application: erlang_js
exited: {{bad_return_value,
{error,{load_error,"Failed to load erlang_js_drv.so"}}},
{erlang_js,start,[normal,[]]}}
type: temporary
sh: line 0: exec: erlang_js_drv: not found
undefined
*** context setup failed ***
**in function gen_server:call/3 (gen_server.erl, line 212)
in call from js_driver:json_converter/0 (src/js_driver.erl, line 218)
in call from js_driver:new/2 (src/js_driver.erl, line 63)
in call from test_util:port_setup/1 (test/test_util.erl, line 9)
**exit:{noproc,{gen_server,call,
[js_cache,
{fetch,"/Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/json2.js"},
infinity]}}
sh: line 0: exec: erlang_js_drv: not found
undefined
*** context setup failed ***
**in function gen_server:call/3 (gen_server.erl, line 212)
in call from js_driver:json_converter/0 (src/js_driver.erl, line 218)
in call from js_driver:new/2 (src/js_driver.erl, line 63)
in call from test_util:port_setup/1 (test/test_util.erl, line 9)
**exit:{noproc,{gen_server,call,
[js_cache,
{fetch,"/Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/json2.js"},
infinity]}}
sh: line 0: exec: erlang_js_drv: not found
undefined
*** context setup failed ***
**in function gen_server:call/3 (gen_server.erl, line 212)
in call from js_driver:json_converter/0 (src/js_driver.erl, line 218)
in call from js_driver:new/2 (src/js_driver.erl, line 63)
in call from test_util:port_setup/1 (test/test_util.erl, line 9)
**exit:{noproc,{gen_server,call,
[js_cache,
{fetch,"/Users/Humberto/Documents/Projects/Erlang/erlang_js/priv/json2.js"},
infinity]}}
sh: line 0: exec: erlang_js_drv: not found
driver_tests: spinup_test_...*timed out*
undefined
=======================================================
Failed: 0. Skipped: 0. Passed: 0.
One or more tests were cancelled.
Cover analysis: /Users/Humberto/Documents/Projects/Erlang/erlang_js/.eunit/index.html
=INFO REPORT==== 13-May-2016::10:00:08 ===
application: sasl
exited: stopped
type: temporary
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /Users/Humberto/Documents/Projects/Erlang/erlang_js: rebar_abort
make: *** [test] Error 1
@rhumbertgz
Copy link
Author

rhumbertgz commented May 16, 2016

Thanks @zackehh!

#58 fixed my problem, now it works in both Linux and OSX :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment