Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

erl_nif.h compile issue #1

Open
zdenal opened this issue May 17, 2021 · 6 comments
Open

erl_nif.h compile issue #1

zdenal opened this issue May 17, 2021 · 6 comments

Comments

@zdenal
Copy link

zdenal commented May 17, 2021

Not sure it is issue of this library, but I am getting error related to path for erl_nif.h on macOs Big Sur.

using:

Elixir 1.11.3 (compiled with Erlang/OTP 21)

tmux_a_-t_main____tmux_new_-s_main

I have tried to find solution but w/o any success. Can anybody help? 馃檹

@seanmor5
Copy link
Owner

Hey, this usually occurs because erlang-dev is packaged separately and is not installed:

brew install erlang-dev

Might resolve the issue

@zdenal
Copy link
Author

zdenal commented May 17, 2021

Ola @seanmor5 thanks for quick response. Getting Error: No available formula or cask with the name "erlang-dev". 馃槩

@seanmor5
Copy link
Owner

You'll need to add Erlangs include path to your system wide include directory; however, I'm in the process of refactoring this library, so it might be better to wait a week or 2 while I make some fixes to the project :)

@vans163
Copy link

vans163 commented Mar 26, 2022

manually compile it and add the location of erl_nif to include path for cmake

For my ERTS-12.3

cd deps/alex/src/ale
mkdir build
cd build
export CXXFLAGS=-isystem\ /usr/local/lib/erlang/erts-12.3/include/
cmake -DUSE_SDL=ON ..
make

@stocks29
Copy link

This worked for me with an asdf installed erlang on ubuntu:

export CXXFLAGS="-I$HOME/.asdf/installs/erlang/25.2/usr/include/"
mix do deps.clean alex, deps.get, deps.compile

@stevensonmt
Copy link

This worked for me with an asdf installed erlang on ubuntu:

export CXXFLAGS="-I$HOME/.asdf/installs/erlang/25.2/usr/include/"
mix do deps.clean alex, deps.get, deps.compile

This worked for me. Because I'm looking to just use mix the solution for editing a makefile does not appeal. Anyone know why exporting CMAKE_INCLUDE_PATH or C_INCLUDE_PATH does not work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants