basho / erlang_js

A linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime.
Apache License 2.0
238 stars 88 forks source link

In OTP19: Error loading "erlang_js_drv": "undefined symbol: erl_exit" #68

Open zhaoweiguo opened 5 years ago

zhaoweiguo commented 5 years ago

Is this project still can be use now?

os:

[root@db-01 erlang_js]# cat /etc/centos-release CentOS Linux release 7.4.1708 (Core)

erl:

[root@db-01 erlang_js]# erl Erlang/OTP 19 [erts-8.3.3] [source] [64-bit] [smp:32:32] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.3.3 (abort with ^G) 1>

I run:

git clone git://github.com/basho/erlang_js.git make all test

It result:

=PROGRESS REPORT==== 17-Sep-2018::10:16:50 === application: sasl started_at: nonode@nohost

=ERROR REPORT==== 17-Sep-2018::10:16:50 === Error loading "erlang_js_drv": "undefined symbol: erl_exit"

=CRASH REPORT==== 17-Sep-2018::10:16:50 === crasher: initial call: supervisor:erlang_js_sup/1 pid: <0.298.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.297.0>] messages: [] links: [<0.297.0>] dictionary: [] trap_exit: true status: running heap_size: 376 stack_size: 27 reductions: 145 neighbours:

=CRASH REPORT==== 17-Sep-2018::10:16:50 === crasher: initial call: application_master:init/4 pid: <0.296.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.295.0>] messages: [{'EXIT',<0.297.0>,normal}] links: [<0.295.0>,<0.31.0>] dictionary: [] trap_exit: true status: running heap_size: 376 stack_size: 27 reductions: 129 neighbours:

zhaoweiguo commented 5 years ago

I tried #51 #53 #55 #58 It still not work for me

I checked the code, it position at erl_ddll:load(priv_dir(), ?DRIVER_NAME) The params is correct, so may be the issue is from the file erlang_js_drv.so

russelldb commented 5 years ago

Can still be used with Riak, and the erlang riak supports (r16b02_basho10). Not sure about use outside Riak. Riak is being (still, one day!) changed to support erlang 20+. BUT when that happens we will be dropping erlang_js.

lemenkov commented 5 years ago

@russelldb btw following issue #65 I've made a fork which is a rewrite from driver to NIF - @erlang-mozjs.

What do you think about it?

@zhaoweiguo please try this one ^^^ and tell me what's your experience. It requires mozjs52 though.

russelldb commented 5 years ago

@lemenkov I think it would be great to get @martincox and bet365's opinion. I think (like webmachine and lager before it) erlang_js could well be given to the community and have it's own org on github and be maintained by the community, and not the "basho" org. Plus one from me.