On_load_function_failed : cberl_nif (Erlang)

我是研究僧i 提交于 2021-01-29 04:11:32

问题


I am using https://github.com/chitika/cberl.

My current application version is 1.2.1. Which is running fine. I created a new release 1.2.2 which upgraded fine. But when I started a new instance it failed on 1.2.2. It keep on throwing cberl error.

If I start my prev release 1.2.1 and then upgrade it to 1.2.2 again then it works fine. But starting from scratch doesn't.

My application (say test) failed to start. Command I used : bin/test console.

OTP version used : 18.2.
Compiled on OTP 18.2.
Linux version : 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2 x86_64 GNU/Linux.

The full error message:

erl_crash.dump Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,cberl_nif}}},{kernel,start,[normal,[]]}}} System version: Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:16:16] [async-threads:10] [kernel-poll:true]

Things I tried till now:

1) I checked my libcouchbase. It is installed.


回答1:


It looks like the cberl_nif is compiled with two different versions of Erlang.

The Erlang version you are running seem to be 18.2, and the one used for compiling cberl_nif is 18 . So the NIF interface will have different versions resulting in the error message you see.

So, if you rebuild from scratch make sure all caches are cleaned and rebuild again. Especially all .so and .o files.




回答2:


So, I was able to solve this problem. I was an erlang library mismatch. Thanks to @fredrikvensson I was able to solve it. I was intended to use OTP 15 but had 17.



来源:https://stackoverflow.com/questions/37607902/on-load-function-failed-cberl-nif-erlang

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!