Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Last active October 8, 2017 17:29
Show Gist options
  • Save tsloughter/8135f58949e7a3144bf7 to your computer and use it in GitHub Desktop.
Save tsloughter/8135f58949e7a3144bf7 to your computer and use it in GitHub Desktop.
{deps, [
{eleveldb, {git, "https://github.com/basho/eleveldb.git", {branch, "master"}}}
]}.
{overrides,
[{override, eleveldb, [
{pre_hooks, [{compile, "c_src/build_deps.sh get-deps"},
{compile, "c_src/build_deps.sh"}]},
{post_hooks, [{clean, "c_src/build_deps.sh clean"}]},
{plugins, [
{pc, {git, "[email protected]:blt/port_compiler.git", {branch, "master"}}}
]},
{provider_hooks, [
{post,
[
{compile, {pc, compile}},
{clean, {pc, clean}}
]
}]
}
]
}]}.
@kansi
Copy link

kansi commented Jun 3, 2015

I tried using this approach to compile elevedb and then tested it by loading the module in the shell
erl -pa ebin it gives the following error

1> l(eleveldb).
{error,on_load_failure}

=ERROR REPORT==== 3-Jun-2015::12:01:07 ===
The on_load function for module eleveldb returned {error,
                                                   {bad_lib,
                                                    "Failed to find library init function: 'ebin/../priv/eleveldb.so: undefined symbol: _nif_init'"}}

on the other hand it works well when compiled manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment