<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p> Hi,</p>
<p> Is this a directory with a set of apps in it or is this an
umbrella? (i.e., you have a top level rebar.config). AFAIK there's
only two ways you can have local dependencies like this... in an
umbrella or using checkout dependencies. <br>
</p>
<p>Either way could you share the rebar config for project B? In
some loose form that is. <br>
</p>
<p> I just made an umbrella using rebar3 and could not replicate the
issue. Note that in an umbrella I must be top level when running
rebar3 compile, etc. <br>
</p>
<p>--</p>
<p>Bryan<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/23/19 6:58 PM, Igor Clark wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADskkxxEzNvUQ2MhuE3wtnFZx_Ofwxi=OwxZm+Ai_wr+rmEE0Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Reading it back, I'm not sure if I made this very
clear:
<div><br>
</div>
<div>- project A is an OTP app containing C port code in c_src,
and the above rebar.config with port compiler info<br>
</div>
<div>- project B is another OTP app referencing project A as a
source dependency in project B's rebar config</div>
<div>- when I build project A in its own dir with 'rebar3
compile', it compiles the C code as expected</div>
<div>- when I build project B in its own dir with 'rebar3
compile', it recognises the port compiler dependency in
project A's rebar.config, downloads and compiles it, but then
fails to compile project A as a dep, saying "found no source
files"</div>
<div><br>
</div>
<div>So I need some way for the port compiler, when running in
the context of the parent app A, to know the proper path for
'c_src' inside the source dependency B. Can't see how it could
be any problem with the port compiler, not least because jiffy
uses it fine, so I must be missing something!<br>
</div>
<div>
<div><br>
</div>
<div>Incidentally I added CXXFLAGS to the port_env as well,
but no difference, as expected. Clutching at straws somewhat
there. ;-)</div>
<div><br>
</div>
<div>I also tried using a Makefile, which I guess is the
intended rebar3 way, and that seems to work - but I'd love
to know what's happening here.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Igor</div>
<div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail-m_546863149659962758gmail_attr">On
Wed, Jan 23, 2019 at 7:35 PM Igor Clark <<a
href="mailto:igor.clark@gmail.com" target="_blank"
moz-do-not-send="true">igor.clark@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
everyone,<br>
<br>
I have an simple app which has a C port in it. I have a
rebar.config from which it builds correctly when I run 'rebar3
compile' inside the app directory:<br>
<br>
> { erl_opts, [debug_info] }.<br>
> { deps, [] }.<br>
> <br>
> { plugins, [<br>
> { pc, { git, "<a
href="https://github.com/blt/port_compiler.git"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/blt/port_compiler.git</a>",
{ tag, "v1.10.1" } } }<br>
> ] }.<br>
> <br>
> { provider_hooks, [<br>
> { pre, [<br>
> { compile, { pc, compile }},<br>
> { clean, { pc, clean }}<br>
> ] }<br>
> ] }.<br>
> <br>
> { port_specs, [<br>
> { "priv/bin/my_port_binary", [<br>
> "c_src/my_c_file.1.c",<br>
> "c_src/subdir/my_c_file_2.c"<br>
> ] }<br>
> ] }.<br>
> <br>
> { port_env, [<br>
> { "CFLAGS", "$CFLAGS -Ic_src/ -g -Wall -Werror -O2"
}<br>
> ] }.<br>
<br>
<br>
Compiling this works fine. The artifact is created in
priv/bin, and running myapp:module_info() inside the shell
shows the right details.<br>
<br>
However, when I try to include this app as a dependency, I get
this error:<br>
<br>
> ===> Found no source files for:<br>
> "c_src/my_c_file.1.c"<br>
> ===> Found no source files for:<br>
> "c_src/subdir/my_c_file_2.c"<br>
<br>
<br>
I've included src, c_src and rebar.config in the 'files' entry
in src/my_app.app.src.<br>
<br>
I've also included a jiffy dep as a test to make sure C code
gets built correctly, and that works fine, but I can't see
what jiffy's config has that I don't.<br>
<br>
Anyone know what I'm missing to make this work?<br>
<br>
Thanks very much!<br>
Igor</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
</body>
</html>