Doesn’t cross-compile for Nerves
TattdCodeMonkey opened this issue · 5 comments
Since the NIFs are load via erlang files and not elixir now, they are being auto loaded. This breaks cross compiling the module for a nerves project.
@TattdCodeMonkey I put the wrong cross-compiler variable check in in the Makefile
.
Instead of this:
Lines 91 to 93 in 2415b50
It should look like this: https://github.com/potatosalad/erlang-serial_framing_protocol/blob/90e9f6079fabc1f182f325f728802e2cfe95842a/c_src/Makefile#L91-L93
I think that's the only change that would need to happen to get nerves working again, but I can verify it later tonight.
@potatosalad thanks, I’ll try that out!!
@TattdCodeMonkey Yeah, I don't think (last time I checked) that this is documented anywhere inside nerves. I found out through trial and error and/or looking at what other Nerves NIF related projects were doing.
Nerves overrides $CC
as well, so this is ok. We take the "belt and suspenders" approach to Make environment variables to try to get most libraries to work without change, but certainly anyone manually crosscompiling will appreciate this.
Resolved by #23
Fixed in release v0.8.2