processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

Hex Package Publishing Error. Missing fast_tls/priv/lib/*.so files #22

Closed v-kat closed 7 years ago

v-kat commented 7 years ago

Getting

11:16:33.215 [error] failed to start application 'fast_tls': {error,
                                         {{shutdown,
                                           {failed_to_start_child,fast_tls,
                                            {badarg,
                                             [{erl_ddll,format_error_int,
                                               [{load_failed,
                                                 "Failed to load NIF library: 'dlopen(/Users/anon/test-ejab/ejapp/_build/dev/lib/fast_tls/priv/lib/fast_tls.so, 2): image not found'"}],
                                               []},
                                              {erl_ddll,format_error,1,
                                               [{file,"erl_ddll.erl"},
                                                {line,239}]},
                                              {fast_tls,load_nif,1,
                                               [{file,
                                                 "/Users/anon/test-ejab/ejapp/deps/fast_tls/src/fast_tls.erl"},
                                                {line,429}]},
                                              {fast_tls,init,1,
                                               [{file,
                                                 "/Users/anon/test-ejab/ejapp/deps/fast_tls/src/fast_tls.erl"},
                                                {line,89}]},
                                              {gen_server,init_it,2,
                                               [{file,"gen_server.erl"},
                                                {line,365}]},
                                              {gen_server,init_it,6,
                                               [{file,"gen_server.erl"},
                                                {line,333}]},
                                              {proc_lib,init_p_do_apply,3,
                                               [{file,"proc_lib.erl"},
                                                {line,247}]}]}}},
                                          {fast_tls_app,start,[normal,[]]}}}

When attempting to start fast_tls. The fast_tls/priv/lib/fast_tls.so file and other files in that directory seem to be missing from the hex module.

leeicmobile commented 7 years ago

This is due to the packaging setup missing a c_src file:

fast_tls/src/fast_tls.app.src

Looks like a file name change along the way without the packaging config being updated.

{files, ["src/", "c_src/fast_tls_drv.c", "c_src/p1_sha.c", "c_src/options.h", "c_src/stdint.h", "rebar.config", "rebar.config.script", "README.md", "LICENSE.txt"]},

fast_tls_drv.c should just be fast_tls.c

prefiks commented 7 years ago

Good catch, i made that change in commit 8e28d0ef10bf9fa7ba239be2a98c12debcaa255c

leeicmobile commented 7 years ago

ah cheers, I just added a pull request happy for you to reject now, also added the hashmap.c/.h c_src not something I encountered as an issue but thought it h=may have some other unintended consequences.

Do you know when you'll be able to release a new hex package?

prefiks commented 7 years ago

@mremond: Could you please upload new release with this issue? I will tag new release with this change.

prefiks commented 7 years ago

New version should be published now

leeicmobile commented 7 years ago

Thanks for your help so far! Do I need to raise new issues to get cache_tab and XMPP releases or will they come as a matter of course.

prefiks commented 7 years ago

I make sure those get releases as well