processone / stun

STUN and TURN library for Erlang / Elixir
http://www.ejabberd.im
Apache License 2.0
244 stars 62 forks source link

Error compiling with rebar3 #20

Closed yokomizor closed 6 years ago

yokomizor commented 6 years ago

Hi,

Running rebar3 compile causes this error:

===> Verifying dependencies...
===> Compiling stun
===> Compiling /Users/rogerioyokomizo/projects/stun/c_src/*.c
===> clang: error: no such file or directory: 'c_src/*.c'
clang: error: no input files

Turning provider_hooks off solves the problem: https://github.com/processone/stun/blob/master/rebar.config.script#L106

- {[provider_hooks], IsRebar3,
-     AppendList([{pre, [
-                {compile, {pc, compile}},
-                {clean, {pc, clean}}
-               ]}]), []},
yokomizor commented 6 years ago

https://github.com/blt/port_compiler/issues/48

yokomizor commented 6 years ago

Possible workaround: https://github.com/erlio/vernemq/pull/700/files

prefiks commented 6 years ago

Ups, you are right, must have left that when i ported rebar.config from different project.

yokomizor commented 6 years ago

Looks like it is a port_compiler problem.

prefiks commented 6 years ago

This is problem in our rebar.config.script, i try to call those hooks, without loading pc plugin.

yokomizor commented 6 years ago

The plugin is being loaded I guess: https://github.com/processone/stun/blob/87cafb5fc84fbed97380a5c267610fb1e7ad7488/rebar.config.script#L103

prefiks commented 6 years ago

Fixed by commit: 6a07ea2ad5a1149585956fc85d54dbae7a5d0f3b

yokomizor commented 6 years ago

Great, thanks!

btw, maybe you can remove the plugin declaration as well:

 - AppendList([rebar3_hex, pc]), []},
 + AppendList([rebar3_hex]), []},