Giter VIP home page Giter VIP logo

elzo's People

Contributors

ledest avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

fermuch

elzo's Issues

lzo package headers not linked?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.