On 09:43 Mon 31 Dec, Ian Ozsvald wrote:
> Hi all, I'm just getting my feet wet with Disco. I'm working on Linux Mint
> 13 (Ubuntu 12.04), I ran into an error during setup. Googling showed a
> similar error in some gists but no fix, having figured it out I'll note
> this here in the hope that it helps someone else.
>
> I'm installing from github HEAD. I've never used erlang before.
>
> First I checked out the dev branch:
>
http://discoproject.org/doc/disco/start/download.html#development-branches
> and made sure that I had the "erlang-base" package installed (as "escript"
> is required), but then:
> ----
> git clone git://
github.com/discoproject/disco.git
> cd DISCO_HOME
> DISCO_HOME $ make
> ==> lager (get-deps)
> ==> mochiweb (get-deps)
> ==> master (get-deps)
> ==> lager (compile)
> src/lager_util.erl:19: can't find include lib "kernel/include/file.hrl"
> src/lager_util.erl:64: record file_info undefined
> src/lager_util.erl:65: record file_info undefined
> src/lager_util.erl:76: record file_info undefined
> src/lager_util.erl:79: record file_info undefined
> make: *** [master] Error 1
> ----
>
> The fix is to also install the "erlang" package in Ubuntu.
>
> Might it be worth listing the "erlang" package as a dependency requirement
> on the Install page? "erlang" wants either "erlang-base" or
> "erlang-base-hipe", I'm not sure which (if either) is better.
We just list Erlang itself as a dependency, to be distribution-agnostic.
http://discoproject.org/doc/disco/start/install.html#prerequisites
But yes, it might be worthwhile to have specific instructions for
Debian/Ubuntu.
> I'm curious to know if there's a difference between "erlang-base" and
> "erlang-base-hipe" (I'm using the non-hipe version). Should one be
> favoured over the other? The only notes I found were that the "hipe"
> branch code was folded into the main erlang project years ago (but that
> doesn't tell me why I might want to avoid the hipe version).
The 'hipe' version uses the native-code compiler. We don't use hipe
because the native-code code is not as portable as byte-code. Afaik,
code compiled with hipe needs to run against exactly the same version
of the run-time as that it was compiled with. So you will need
exactly the same version of Erlang on your build machine as your
cluster. Erlang byte-code has looser versioning requirements, which
is easier to support in a cluster environment with a separate build
machine. That said, it is possible that native-code compatibility has
improved in the recent versions of Erlang.
> Before fixing the problem I also tried using the "Latest Release" link:
>
http://discoproject.org/doc/disco/start/download.html#latest-release
> but the linked page is empty:
>
https://github.com/discoproject/disco/downloads
> and if you download the Tagged release 0.4.4 release via the Tag button on
> the right then during the compile phase you get:
> ----
> fatal: Not a git repository (or any parent up to mount parent /home)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> make: *** [master] Error 1
> ----
Yes, unfortunately this is a limitation of the Erlang build tool that
we are using (rebar). We can look into using a patched version of
rebar to get around this.
> I also tried the Debian Package
>
http://discoproject.org/doc/disco/start/download.html#debian-packages
> but it seemed to want Python 2.6 only, not 2.7 (I don't have 2.6 on Ubuntu
> 12.04).
I'm not a Debian packaging expert, but handling python versions
according to Debian Policy is IMHO totally fubar, and Python3 is
making it even worse. That's why the source-tree contains the
'make-discoproject-debian' script to help you build debian packages
that are compatible with your own debian/ubuntu environments.
Unfortunately, this option is not present in our current
documentation; I will add it.
> I guess I missed something in the install flow but it felt a bit trickier
> to download+compile than I expected. Perhaps other first-timers will trip
> up on the download page too?
>
> Personally I prefer building locally as I can play with virtualenvs
> (rather than having a global install via apt-get), so for me the easy fix
> would be to see a requirement for the "erlang" package (with a note on
> hipe or not-hipe) on the download page.
>
> I'm compiled now so I'll move on to testing my setup.
Thanks for your experience report and feedback, and good luck! :)
--
prashanth