-
Notifications
You must be signed in to change notification settings - Fork 24
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with -include_lib: "can't find include lib" #44
Comments
Hi,
|
The "lager" MWE fails in the same way even after a Here is the output from running
|
In
|
Sorry for the delayed response. Thanks for the help; I would very much like to figure out the issue.
This is in my
I have
|
Ok, so the difference is that in your environment, the dependency ( Could you execute this command to find where the BEAM files are created?
Which rebar version do you use? I tried 3.13.2 and 3.7.5, both with the same result.
|
My build files seem to be going into the following folder:
and
And my
|
I found the root cause. Rebar3 changed the output directory for the Could you edit the % _checkouts -> code_path (see
% https://www.rebar3.org/docs/dependencies#section-checkout-dependencies)
code:add_pathsa(filelib:wildcard(absname(ConfigPath, "_checkouts") ++ "/*/ebin")),
+code:add_pathsa(filelib:wildcard(absname(ConfigPath, "_build") ++ "/default/checkouts/*/ebin")),
lists:foreach(
fun({ProfileName, Deps}) -> Then please check whether it solves the problem (it solved it for me in my lager example). It's not an ideal solution because the profile name ("default") is hard-coded, but you could use |
This indeed addresses the problem on my setup using the lager example as a test. |
Although I am still having trouble with my original example. I will dig a bit more. |
OK, made a bit of progress... my other project doesn't have a
Adding an empty I am too new to rebar(3) to know why my project didn't have a |
Thank you for the feedback. A simple
Maybe this also works differently in the master branch of rebar3, I haven't checked that. |
Indeed, I get the lock file in the lager post-compile but not in my from-scratch project. Here is the myapp lager example lock file contents:
Perhaps if there are no locks then the file is not created? Thanks again for the help; |
It seems that this is another behaviour that changed in the rebar3 master branch.
Creating an empty rebar.lock file looks like a good workaround. For the proper solution, I will need to figure out how to distinguish between rebar2 and rebar3 projects, and how to find the project root. (So far the existence and location of the rebar.lock file was a convenient way to do these.)
Thanks :) |
rebar3 changed where it stores the beam files for the dependencies in _checkouts directories [1]. This commit adds the new directories to the code_path too. [1] erlang/rebar3@d87b68b
|
The command:
is causing the error
"can't find include lib "..."
. This error then triggers many others within the file due to missing definitions.I am using
rebar3
. The dependency from which I am trying to include thehrl
file from is under development locally and thus is linked (via relative soft link) in the_checkouts
folder. Could this be causing the issue? The project compiles and runs fine with rebar despite the error.Thanks
The text was updated successfully, but these errors were encountered: