iskra / jsonx

JSONX is an Erlang library for efficient decode and encode JSON, written in C.
Other
91 stars 32 forks source link

Error when I compile with rebar3 #23

Closed PearceDuan closed 7 years ago

PearceDuan commented 7 years ago

When I use rebar3 to compile jsonx,got error like this:

=ERROR REPORT==== 19-Apr-2017::11:36:37 ===
Error in process <0.207.0> with exit value: {{badmatch,{error,{load_failed,"Failed to load NIF library: '/home/dasudian/Proj/swdportal/deps/jsonx/_build/test/lib/jsonx/priv/jsonx.so: cannot open shared object file: No such file or directory'"}}},[{jsonx...

Everything is ok when I compile with rebar... Is there any advice?Thanks

ymv commented 7 years ago

rebar3 does not build ports same way as previous version did.

Add following to jsonx's rebar.config to enable old behaviour via plugin:

{plugins, [pc]}. {provider_hooks, [{pre, [{compile, {pc, compile}}, {clean, {pc, clean}}]}]}.

https://www.rebar3.org/v3/docs/using-available-plugins#section-port-compiler