Erlang manuals problem when installing from Homebrew

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang manuals problem when installing from Homebrew

Dmitry Demeshchuk
Greetings.

I've installed the R14B02 to a fresh machine with no previous versions
using Homebrew. Everything works good, but "erl -man" seems to be
broken.

Hombrew is default-configured, so the structure of
/usr/local/Cellar/erlang/R14B02 is the following:

AUTHORS    README.md  bin/       lib/       share/

So, the binary files are placed into
/usr/local/Cellar/erlang/R14B02/bin and the man pages – into
/usr/local/Cellar/erlang/R14B02/share/man

As far as I understand, when I call "erl -man", it tries to search at
some other location, not at the one I provided. I tried to add this
location to MANPATH, but result was the same.

Where does Erlang search for the manuals and is there a way to
configure these locations?

--
Best regards,
Dmitry Demeshchuk
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Dmitry Demeshchuk
Apparently, /usr/local/Cellar/erlang/R14B02/bin/erl was a symlink to
/usr/local/Cellar/erlang/R14B02/lib/erlang/bin/erl

I added a symlink /usr/local/Cellar/erlang/R14B02/lib/erlang/man
leading to the man pages dir and it started working.

The question is: is there the more right way to point Erlang to the
right manuals directory?

On Wed, Apr 6, 2011 at 5:44 PM, Dmitry Demeshchuk <[hidden email]> wrote:

> Greetings.
>
> I've installed the R14B02 to a fresh machine with no previous versions
> using Homebrew. Everything works good, but "erl -man" seems to be
> broken.
>
> Hombrew is default-configured, so the structure of
> /usr/local/Cellar/erlang/R14B02 is the following:
>
> AUTHORS    README.md  bin/       lib/       share/
>
> So, the binary files are placed into
> /usr/local/Cellar/erlang/R14B02/bin and the man pages – into
> /usr/local/Cellar/erlang/R14B02/share/man
>
> As far as I understand, when I call "erl -man", it tries to search at
> some other location, not at the one I provided. I tried to add this
> location to MANPATH, but result was the same.
>
> Where does Erlang search for the manuals and is there a way to
> configure these locations?
>
> --
> Best regards,
> Dmitry Demeshchuk
>



--
Best regards,
Dmitry Demeshchuk
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Jack Moffitt
> The question is: is there the more right way to point Erlang to the
> right manuals directory?

The more right way would be to fix the brew recipe.

Thanks for finding that workaround though; I was having the same
problem but was too lazy to fix it.

jack.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Dmitry Demeshchuk
Fixing the recipe is obvious. But maybe the problem can be solved in a
more proper way, like using some undocumented env variable, or
something?

Actually, the fact that Erlang doesn't understand $MANPATH seems odd
to me. Also, there are no proper manuals locations at the
documentation, so the user will have to find them out himself.

On Wed, Apr 6, 2011 at 7:03 PM, Jack Moffitt <[hidden email]> wrote:

>> The question is: is there the more right way to point Erlang to the
>> right manuals directory?
>
> The more right way would be to fix the brew recipe.
>
> Thanks for finding that workaround though; I was having the same
> problem but was too lazy to fix it.
>
> jack.
>



--
Best regards,
Dmitry Demeshchuk
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

bsmr
I only use "homebrew" installations, and never had those problems You
describe (so far... lucky me). Actually I have different Erlang/OTP
versions on a single machine. I supply different "prefixes" to
configure and "erl" always finds the corresponding man page version
under "<PREFIX>/lib/erlang/man".

The systems I use at work and home are always Ubuntu systems with
versions 10.04 and 10.10 (and very few 09.x ones). The only thing I
have to complain about is when running "make install-docs" (using an
unpatched R14BX source) that "env" doesn't properly evaluate escript
calls. But I start to believe this may be an "env" problem. I didn't
have time to have a closer look at this problem, because fixing the
makefile is much faster.

Just one questions why should "erl" "understand" the MANPATH variable?

To quote the "erl" man page:
    -man Module :
        Displays the manual page for the Erlang module Module . Only
supported on Unix.

Evaluating the MANPATH would lead to possible wrong versions,
especially on systems with multiple erlang installations.

When I really want the "man" command to include the erlang-man-pages,
I would add "<PREFIX>/lib/erlang/man" to the MANPATH environment variable.

IMHO it doesn't make any sense to use "erl -man ls", instead of "man ls".


Just my 2 cents, no offense meant...

  - boris



2011/4/6 Dmitry Demeshchuk <[hidden email]>:

> Fixing the recipe is obvious. But maybe the problem can be solved in a
> more proper way, like using some undocumented env variable, or
> something?
>
> Actually, the fact that Erlang doesn't understand $MANPATH seems odd
> to me. Also, there are no proper manuals locations at the
> documentation, so the user will have to find them out himself.
>
> On Wed, Apr 6, 2011 at 7:03 PM, Jack Moffitt <[hidden email]> wrote:
>>> The question is: is there the more right way to point Erlang to the
>>> right manuals directory?
>>
>> The more right way would be to fix the brew recipe.
>>
>> Thanks for finding that workaround though; I was having the same
>> problem but was too lazy to fix it.
>>
>> jack.
>>
>
>
>
> --
> Best regards,
> Dmitry Demeshchuk
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Dmitry Demeshchuk
"homebrew" doesn't mean actually homebrew, right? apt-get really
installs Erlang with proper manuals location, but homebrew doesn't. By
the way, as far as I remember, the directory structure that apt-get
generates differs much from the one generated by homebrew.

I agree with the point about possible versions conflicts. But I don't
believe anyone would often call Erlang manual pages like
"/some/long/path/erl -man lists", he'll just use "erl -man lists" in
most cases. And this way he'll use some particular Erlang version,
most actual to him.
If reading several manuals' versions is required, it's easy to use
simple custom scripts. Also, it's possible to make erl look for the
manuals at the default locations first, and only if the manuals aren't
found there, look them up using $MANPATH.

But my main concern is not this $MANPATH thing. It's rather the
uncertainty of the possible mans locations and being unable to
configure them in any way.

On Wed, Apr 6, 2011 at 8:21 PM, Boris Mühmer
<[hidden email]> wrote:

> I only use "homebrew" installations, and never had those problems You
> describe (so far... lucky me). Actually I have different Erlang/OTP
> versions on a single machine. I supply different "prefixes" to
> configure and "erl" always finds the corresponding man page version
> under "<PREFIX>/lib/erlang/man".
>
> The systems I use at work and home are always Ubuntu systems with
> versions 10.04 and 10.10 (and very few 09.x ones). The only thing I
> have to complain about is when running "make install-docs" (using an
> unpatched R14BX source) that "env" doesn't properly evaluate escript
> calls. But I start to believe this may be an "env" problem. I didn't
> have time to have a closer look at this problem, because fixing the
> makefile is much faster.
>
> Just one questions why should "erl" "understand" the MANPATH variable?
>
> To quote the "erl" man page:
>    -man Module :
>        Displays the manual page for the Erlang module Module . Only
> supported on Unix.
>
> Evaluating the MANPATH would lead to possible wrong versions,
> especially on systems with multiple erlang installations.
>
> When I really want the "man" command to include the erlang-man-pages,
> I would add "<PREFIX>/lib/erlang/man" to the MANPATH environment variable.
>
> IMHO it doesn't make any sense to use "erl -man ls", instead of "man ls".
>
>
> Just my 2 cents, no offense meant...
>
>  - boris
>
>
>
> 2011/4/6 Dmitry Demeshchuk <[hidden email]>:
>> Fixing the recipe is obvious. But maybe the problem can be solved in a
>> more proper way, like using some undocumented env variable, or
>> something?
>>
>> Actually, the fact that Erlang doesn't understand $MANPATH seems odd
>> to me. Also, there are no proper manuals locations at the
>> documentation, so the user will have to find them out himself.
>>
>> On Wed, Apr 6, 2011 at 7:03 PM, Jack Moffitt <[hidden email]> wrote:
>>>> The question is: is there the more right way to point Erlang to the
>>>> right manuals directory?
>>>
>>> The more right way would be to fix the brew recipe.
>>>
>>> Thanks for finding that workaround though; I was having the same
>>> problem but was too lazy to fix it.
>>>
>>> jack.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Dmitry Demeshchuk
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>



--
Best regards,
Dmitry Demeshchuk
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Michael Santos-2
In reply to this post by Dmitry Demeshchuk
On Wed, Apr 06, 2011 at 07:26:00PM +0400, Dmitry Demeshchuk wrote:
> Fixing the recipe is obvious. But maybe the problem can be solved in a
> more proper way, like using some undocumented env variable, or
> something?
>
> Actually, the fact that Erlang doesn't understand $MANPATH seems odd
> to me. Also, there are no proper manuals locations at the
> documentation, so the user will have to find them out himself.

erl reads the man pages like this:

    erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
    set_env("MANPATH", tmpStr);
    execvp("man", argv+i);

So it uses the location of the erlang install (e.g.,
/usr/local/lib/erlang), appends the "man" directory then overwrites
whatever is in your MANPATH environment variable.

The MANPATH variable still works:

$ man inets
No manual entry for inets
$ export MANPATH=/usr/local/lib/erlang/man
$ man inets
inets(3) ...


> On Wed, Apr 6, 2011 at 7:03 PM, Jack Moffitt <[hidden email]> wrote:
> >> The question is: is there the more right way to point Erlang to the
> >> right manuals directory?
> >
> > The more right way would be to fix the brew recipe.
> >
> > Thanks for finding that workaround though; I was having the same
> > problem but was too lazy to fix it.
> >
> > jack.
> >
>
>
>
> --
> Best regards,
> Dmitry Demeshchuk
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Dmitry Demeshchuk
Thanks, Michael, that's exactly what I was asking about.

On Wed, Apr 6, 2011 at 11:22 PM, Michael Santos
<[hidden email]> wrote:

> On Wed, Apr 06, 2011 at 07:26:00PM +0400, Dmitry Demeshchuk wrote:
>> Fixing the recipe is obvious. But maybe the problem can be solved in a
>> more proper way, like using some undocumented env variable, or
>> something?
>>
>> Actually, the fact that Erlang doesn't understand $MANPATH seems odd
>> to me. Also, there are no proper manuals locations at the
>> documentation, so the user will have to find them out himself.
>
> erl reads the man pages like this:
>
>    erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
>    set_env("MANPATH", tmpStr);
>    execvp("man", argv+i);
>
> So it uses the location of the erlang install (e.g.,
> /usr/local/lib/erlang), appends the "man" directory then overwrites
> whatever is in your MANPATH environment variable.
>
> The MANPATH variable still works:
>
> $ man inets
> No manual entry for inets
> $ export MANPATH=/usr/local/lib/erlang/man
> $ man inets
> inets(3) ...
>
>
>> On Wed, Apr 6, 2011 at 7:03 PM, Jack Moffitt <[hidden email]> wrote:
>> >> The question is: is there the more right way to point Erlang to the
>> >> right manuals directory?
>> >
>> > The more right way would be to fix the brew recipe.
>> >
>> > Thanks for finding that workaround though; I was having the same
>> > problem but was too lazy to fix it.
>> >
>> > jack.
>> >
>>
>>
>>
>> --
>> Best regards,
>> Dmitry Demeshchuk
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>



--
Best regards,
Dmitry Demeshchuk
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang manuals problem when installing from Homebrew

Ahmed Al-Saadi
In reply to this post by Dmitry Demeshchuk
I have had a problem with missing wx-related files when I installed with
Homebrew. I installed from source and all is well. I recommend that path
for anyone who doesn't wanna muck around with brew.

-signed(ahmed).


On 4/6/11 9:44 AM, Dmitry Demeshchuk wrote:

> Greetings.
>
> I've installed the R14B02 to a fresh machine with no previous versions
> using Homebrew. Everything works good, but "erl -man" seems to be
> broken.
>
> Hombrew is default-configured, so the structure of
> /usr/local/Cellar/erlang/R14B02 is the following:
>
> AUTHORS    README.md  bin/       lib/       share/
>
> So, the binary files are placed into
> /usr/local/Cellar/erlang/R14B02/bin and the man pages – into
> /usr/local/Cellar/erlang/R14B02/share/man
>
> As far as I understand, when I call "erl -man", it tries to search at
> some other location, not at the one I provided. I tried to add this
> location to MANPATH, but result was the same.
>
> Where does Erlang search for the manuals and is there a way to
> configure these locations?
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions