ledest / elzo Goto Github PK
View Code? Open in Web Editor NEWErlang NIF for LZO
License: GNU General Public License v2.0
Erlang NIF for LZO
License: GNU General Public License v2.0
I am trying to integrate this erlang package https://github.com/Ledest/elzo into my elixir app.
I have tried to mix compile
the app both on ubuntu and mac system, which is happening without errors.
The ledest/elzo package uses erl_nif (native interface function) which requires me to compile and link the correct C header files into a _build/dev/lib/lzo/priv
folder of elixir app
I am able to do that too : I am using the follwing commands to succesfuly compile the files:
Mac:
gcc -Wall \
-I /opt/homebrew/Cellar/erlang/25.1.1/lib/erlang/erts-13.1.1/include \
-I /opt/homebrew/Cellar/lzo/2.10/include \
-fPIC \
-bundle -flat_namespace -undefined suppress \
-o _build/dev/lib/lzo/priv/lzo1.so \
deps/lzo/c_src/lzo1.c
Ubuntu:
gcc -Wall \
-I /usr/local/lib/erlang/usr/include \
-I /usr/local/include/lzo \
-fPIC \
-shared \
-o _build/dev/lib/lzo/priv/lzo1.so \
deps/lzo/c_src/lzo1.c
The headers are from official package builds.
When I run iex -S mix the symbol :lzo1. is available on TAB complete.
however I am getting the following errors on calling any NIF ->
Mac:
iex(1)> :lzo1.
15:29:57.677 [warning] The on_load function for module lzo1 returned:
{:error,
{:load_failed,
'Failed to load NIF library: \'dlopen(/Users/dushyantgoel/Documents/Github/decomp/_build/dev/lib/lzo/priv/lzo1.so, 0x0002): symbol not found in flat namespace (___lzo_init_v2)\''}}
Ubuntu:
iex(1)> :lzo1.
15:21:49.829 [warning] The on_load function for module lzo1 returned:
{:error,
{:load_failed,
'Failed to load NIF library: \'/home/a6000/Desktop/decomp/_build/dev/lib/lzo/priv/lzo1.so: undefined symbol: lzo1x_decompress_safe\''}}
The only link I found on google which was half-way helpful is this:
https://erlang.org/pipermail/erlang-questions/2011-June/059678.html
Any leads on how to solve this issue or what direction to look into?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.