[erlang-questions] Eunit installation

Richard Carlsson <>
Tue Dec 9 12:47:55 CET 2008


Edward Stow wrote:
> I have installed erlang on Ubuntu 8.10 with aptitude.
> 
> The versions for Erlang I guess are in the RELEASES file.
> 
> $ cat /usr/lib/erlang/releases/RELEASES
> [{release,"OTP  APN 181 01","R12B","5.6.3",
>           [{kernel,"2.12.3","/usr/lib/erlang/lib/kernel-2.12.3"},
>            {stdlib,"1.15.3","/usr/lib/erlang/lib/stdlib-1.15.3"},
>            {sasl,"2.1.5.3","/usr/lib/erlang/lib/sasl-2.1.5.3"}],
>           permanent}].
> 
> eunit is not included in the /usr/lib/erlang/lib directory.

No, the version you get with aptitude predates R12B-5, which is
when eunit was first incluced with the OTP distribution.

> The instructions at the download page state that "[the] easiest way to
> correct the problem is to manually copy the eunit.hrl file to the
> installation directory." What is the installation directory?
> /usr/lib/erlang  ?

This doesn't apply to you since you didn't dowload the R12B-5 source
distribution which for the first few days contained a bug in 'make
install'. The tarball that you can download now has been fixed.

If your Ubuntu package installed at /usr/lib/erlang/, you should
copy the entire eunit application to  /usr/lib/erlang/lib/eunit,
and the system will then automatically add its modules to the path
(but you have to build them first).

> I tried to make eunit from source:
> /usr/lib/erlang/
> $sudo svn export  http://svn.process-one.net/contribs/trunk/eunit eunit
> $cd eunit
> $sudo make
> 
> but have the following messages and errors
> 
> :~/eunit$ sudo make
> make[1]: Entering directory `/home/edward/eunit/src'
> erlc -pa ../ebin -W -I../include +warn_unused_vars +nowarn_shadow_vars
> +warn_unused_import -o../ebin file_monitor.erl
> ./file_monitor.erl:39: can't find include lib "eunit/include/eunit.hrl"
> make[1]: *** [../ebin/file_monitor.beam] Error 1
> make[1]: Leaving directory `/home/edward/eunit/src'
> make: *** [subdirs] Error 2

Sorry for that - I've been working on that file recently, and didn't
realize I'd broken the build for people who didn't already have eunit
in the path. I just checked in a fix.

    /Richard




More information about the erlang-questions mailing list