filipe
NIF module dependency is not being fetched while calling mix deps.get
hey folks,
I tried to fetch a small library which has a NIF module that calls a C code, but seems it cannot be fetched, so I’m getting:
{:error, {:load_failed, ‘Failed to load NIF library: './c_source.so: cannot open shared object file: No such file or directory'’}}
It has the makefile, and all is working fine on the library directory
I tried to force fetch it directly from git like
{:ex_interval, git: "
https://github.com/filipevarjao/ex_interval.git` `", branch: “master”}
I can see all source code is fetched and compiled generating the *.so file on the deps directory, but on the _build directory it only shows the beam files
Marked As Solved
hauleth
This library uses relative path for fetching the *.so while it should store it in priv and load it from there using :code.priv_dir(app_name).
Also Liked
dimitarvp
If the native dependency has a build script (like a Makefile) you could add a step to just copy the resulting .so file(s) to priv/.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









