Skip to content
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

erl_interface not found solutions #149

Closed
wants to merge 2 commits into from
Closed

erl_interface not found solutions #149

wants to merge 2 commits into from

Conversation

choptastic
Copy link
Contributor

Hey Guys,

I've encountered and issue with reltool which results in erl_interface not being copied with "rebar generate". This becomes a problem with the Nitrogen Web Framework (or others, I'm sure), where in the target installation, I wish to include bcrypt, erls3, and others which require compiling from C.

However, because erl_interface was not being copied automatically to the target lib dir, it proved a problem for dependencies.

These two commits help alleviate that problem with a generated installation by extending the reltool.config overlay functionality to include the ability to copy additional libs from the source erlang installation.

The example, which I would include into Nitrogen would be to add to the default reltool.config the following:

{copy_absolute, "{{core_lib_dir}}/erl_interface-*","lib"}

Which will essentially copy the erl_interface dir from "/usr/local/lib/erlang/lib/erl_interface-X.Y.Z" into the target lib dir.

I realize that this might not be the ideal solution, and if so, please let me know so I can adjust this accordingly. As it is, however, this solves my immediate problems.

Thanks :)

This allow us to copy additional libs from absolute directories, in a
specific case copying erl_interface into the libs of a release, which
may be needed for compiling further.

Example: {copy_absolute,"{{core_lib_dir}}/erl_interface-*","lib"}
This will copy the erl_interface lib from the core erlang installation
to the newly generated one.
Previous was the cryptic {error, not_found}, which is simply the return
value of code:lib_dir(erl_interface) when not found. This at least
informs the user of *what* is wrong along with a possible solution.
@choptastic
Copy link
Contributor Author

The second commit, which I've not mentioned, is simply an improved error message in the event that the erl_interface is not found in the installation. Prior to this patch, it would simply throw an error because lists:flatten (called from lists:concat), cannot flatten {error,bad_name}. It took me a while to track down what was causing that.

@choptastic
Copy link
Contributor Author

closing this and re-opening with modifications as per our emails.

@choptastic choptastic closed this Dec 7, 2011
@proger
Copy link

proger commented Aug 14, 2013

Is there any followup to problem where erl_interface isn't copied? Why was copy_absolute abandoned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants