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

Add more detailed installation instructions with Homebrew #268

Closed
mezzomondo opened this issue May 5, 2021 · 9 comments · May be fixed by #269
Closed

Add more detailed installation instructions with Homebrew #268

mezzomondo opened this issue May 5, 2021 · 9 comments · May be fixed by #269

Comments

@mezzomondo
Copy link

Hi,

It's unclear from the README how to go from:

brew install proper

to

-include_lib("proper/include/proper.hrl").

In particular no /full/path/to/proper that I can think of works in load_abs nor in the ERL_LIBS environment variable.

PS: I can update the README once it's sorted out, thank you :)

@pablocostass
Copy link
Contributor

After you have ran brew install proper you should check where it has been installed and then do as the guide says to first add PropEr's base directory to Erlang's path, either by modifying your .bashrc file or your .erlang file to point to the installation path.

In the case that under no circumstances you are able to find the installation directory, you can always add PropEr as a dependency of the project you want to use it in (e.g., in your rebar.config add {proper, "1.3.0"})

@mezzomondo
Copy link
Author

Thank you, with rebar3 I'm actually able to use it, setting manually the path is still not working but now is a lower priority.

@pablocostass
Copy link
Contributor

Okay, I got a colleague who has a Mac to help me out fixing this issue. At the end of the output you get from running brew install proper you can find where it has been installed.

So, you will find PropEr installed at /usr/local/Cellar/proper/<version> (version is the latest release, e.g., 1.3). If you use that path you will be able to add it to Erlang's path either with ERL_LIBS or code:load_abs/1. If by any chance PropEr wasn't installed there, I think you can run brew info proper to get its installation path.

@ansd
Copy link

ansd commented Nov 23, 2021

Having the same issue as @mezzomondo:

> brew install proper && export ERL_LIBS=/usr/local/Cellar/proper/1.4 && erl
Warning: proper 1.4 is already installed and up-to-date.
To reinstall 1.4, run:
  brew reinstall proper
Erlang/OTP 24 [erts-12.1.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit] [dtrace]

Eshell V12.1.5  (abort with ^G)
1> c(my_sort).
my_sort.erl:3:14: can't find include lib "proper/include/proper.hrl"
%    3| -include_lib("proper/include/proper.hrl").
%     |              ^

README seems to be wrong.
I also use rebar3 now.

@kostis
Copy link
Collaborator

kostis commented Nov 24, 2021

We clearly need help here from some user who has access to a MacOS environment and knows / can check what needs to be done there.

@mezzomondo
Copy link
Author

Happy to jump in in a call or something to sort it out.

@kostis
Copy link
Collaborator

kostis commented Nov 24, 2021

We need some PR to the README that describes the actions that homebrew users need to make in order to be able to use PropEr (from the Erlang shell). I have no idea about how homebrew stores packages, but surely there is some (a single?) place in the file system where PropEr's ebin and include dirs are stored and use them somehow.

Perhaps it's just a matter of manually adding symbolic links to ebin and include under /usr/local/Cellar/proper and bypassing the 1.4 dir, with commands such as:

cd /usr/local/Cellar/proper
ln -s 1.4/ebin .
ln -s 1.4/include .

and things will magically work from then on.

If we need a call to sort out this, my skype ID is of the form: name_surname

@mezzomondo
Copy link
Author

Update:

It turns out it's a Homebrew issue, the folder created by brew doesn't follow Erlang naming conventions.

See this discussion: Homebrew/discussions#2537
And the relative PR: Homebrew/homebrew-core#89963

@kostis
Copy link
Collaborator

kostis commented Nov 30, 2021

Since the PR was merged to Homebrew's repo, I am closing the issue.

Thanks to all and to @mezzomondo in particular for opening the issue and for his help.

@kostis kostis closed this as completed Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants