<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Bryan! Thanks for getting back to me.<div class=""><br class=""></div><div class="">Turns out this only happens with the latest version 1.10.1 of the port compiler - I tried older versions and everything works out as expected. Seems I'm <a href="https://github.com/blt/port_compiler/issues/55" class="">not the only one</a> who's seen this either. I'm going to pin pc to 1.9.1 in my project A, as everything works as I thought it should with that version.<br class=""><div class=""><br class=""></div><div class="">Just to tidy up, to answer your question, yes it's an umbrella app - the 'parent' app B is one that I made with "rebar3 new release", and then added project A as a remote source dependency, i.e. from a git repo, into 'deps' in project B's rebar.config. I'm running rebar3 commands from top level in project B.</div><div class=""><div class=""><br class=""></div><div class="">Appreciate your time!</div><div class=""><br class=""></div><div class="">best,</div><div class="">i</div><div><br class=""><blockquote type="cite" class=""><div class="">On 24 Jan 2019, at 05:18, Bryan Paxton <<a href="mailto:starbelly@pobox.com" class="">starbelly@pobox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""><p class=""> Hi,</p><p class=""> 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 class="">
</p><p class="">Either way could you share the rebar config for project B? In
some loose form that is. <br class="">
</p><p class=""> 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 class="">
</p><p class="">--</p><p class="">Bryan<br class="">
</p><p class=""><br class="">
</p>
<div class="moz-cite-prefix">On 1/23/19 6:58 PM, Igor Clark wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:CADskkxxEzNvUQ2MhuE3wtnFZx_Ofwxi=OwxZm+Ai_wr+rmEE0Q@mail.gmail.com" class="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
<div dir="ltr" class="">Reading it back, I'm not sure if I made this very
clear:
<div class=""><br class="">
</div>
<div class="">- project A is an OTP app containing C port code in c_src,
and the above rebar.config with port compiler info<br class="">
</div>
<div class="">- project B is another OTP app referencing project A as a
source dependency in project B's rebar config</div>
<div class="">- when I build project A in its own dir with 'rebar3
compile', it compiles the C code as expected</div>
<div class="">- 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 class=""><br class="">
</div>
<div class="">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 class="">
</div>
<div class="">
<div class=""><br class="">
</div>
<div class="">Incidentally I added CXXFLAGS to the port_env as well,
but no difference, as expected. Clutching at straws somewhat
there. ;-)</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Igor</div>
<div class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
<br class="">
<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" class="">igor.clark@gmail.com</a>> wrote:<br class="">
</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 class="">
<br class="">
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 class="">
<br class="">
> { erl_opts, [debug_info] }.<br class="">
> { deps, [] }.<br class="">
> <br class="">
> { plugins, [<br class="">
> { pc, { git, "<a href="https://github.com/blt/port_compiler.git" rel="noreferrer" target="_blank" moz-do-not-send="true" class="">https://github.com/blt/port_compiler.git</a>",
{ tag, "v1.10.1" } } }<br class="">
> ] }.<br class="">
> <br class="">
> { provider_hooks, [<br class="">
> { pre, [<br class="">
> { compile, { pc, compile }},<br class="">
> { clean, { pc, clean }}<br class="">
> ] }<br class="">
> ] }.<br class="">
> <br class="">
> { port_specs, [<br class="">
> { "priv/bin/my_port_binary", [<br class="">
> "c_src/my_c_file.1.c",<br class="">
> "c_src/subdir/my_c_file_2.c"<br class="">
> ] }<br class="">
> ] }.<br class="">
> <br class="">
> { port_env, [<br class="">
> { "CFLAGS", "$CFLAGS -Ic_src/ -g -Wall -Werror -O2"
}<br class="">
> ] }.<br class="">
<br class="">
<br class="">
Compiling this works fine. The artifact is created in
priv/bin, and running myapp:module_info() inside the shell
shows the right details.<br class="">
<br class="">
However, when I try to include this app as a dependency, I get
this error:<br class="">
<br class="">
> ===> Found no source files for:<br class="">
> "c_src/my_c_file.1.c"<br class="">
> ===> Found no source files for:<br class="">
> "c_src/subdir/my_c_file_2.c"<br class="">
<br class="">
<br class="">
I've included src, c_src and rebar.config in the 'files' entry
in src/my_app.app.src.<br class="">
<br class="">
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 class="">
<br class="">
Anyone know what I'm missing to make this work?<br class="">
<br class="">
Thanks very much!<br class="">
Igor</blockquote>
</div>
<br class="">
<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>
</div>
</div></blockquote></div><br class=""></div></div></body></html>