[erlang-questions] rebar escriptize and shared libraries
Dave Smith
dizzyd@REDACTED
Mon Jun 13 15:56:59 CEST 2011
Unfortunately, you can't embed a .so into an escript. Most dynamic
loading APIs require the .so to be present as a file on disk, versus
via memory.
D.
On Mon, Jun 13, 2011 at 5:55 AM, Joel Reymont <joelr1@REDACTED> wrote:
> Given this rebar config:
>
> {lib_dirs,["deps"]}.
>
> {deps, [
> {'getopt', ".*", {git, "git://github.com/jcomellas/getopt.git", "HEAD"}},
> {'json', ".*", {git, "git://github.com/davisp/eep0018.git", "HEAD"}},
> {'lhttpc', ".*", {git, "git://github.com/esl/lhttpc.git", "HEAD"}}
> ]}.
>
> {escript_incl_apps, [getopt, json, lhttpc]}.
>
> How do I tell rebar to include deps/json/prive/json.so?
>
> It doesn't seem to be doing it because I get an error
>
> =ERROR REPORT==== 13-Jun-2011::15:49:20 ===
> The on_load function for module json returned {error,
> {load_failed,
> "Failed to load NIF library: 'dlopen(xxx/json/priv/json.so, 2): no suitable image found. Did find:\n\txxx/json/priv/json.so: stat() failed with errno=20'"}}
>
> Thanks, Joel
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list