Install Hasard library


Stable version:

  • hasard-1.5.tar.bz2
  • MD5: 8d785a177cf10dfd5840a9bfe0f7ba5a
  • SHA-1: d91563d3a214d34ec2e9ad4c75dcd58d74c22659

Download development version using Mercurial:

hg clone

You can also browse the source code.



Command to run on Debian as root:

apt-get install cmake make gcc python

Note: TestBigEndian module of CMake 2.6.0 doesn’t work.


  • Python docutils (rst2html program) used to compile the reST documentation to HTML
  • glib 2.0: RNG engine
  • OpenSSL 0.9+: RNG engines
  • GSL: RNG engine
  • gmp: gmp_mt engine

Command to run on Debian as root:

apt-get install python-docutils libglib2.0-0 openssl libgmp3-dev


  • PIL (Python Imaging Library), need by program Debian package: python-imaging


Hasard library

Quick installation (prefix=/usr):

(cd build; sudo make install)

After the installation, you can run the unit tests using:


If you want to install Hasard is /opt/hasard instead of /usr, use:

mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/opt/hasard ..

If you are a hacker, you may want to compile Hasard in debug mode (to include debugger symbols): use “-D CMAKE_BUILD_TYPE=Debug” option.

Python binding

To install the Python binding (“hasard” module), type:

cd python
sudo ./ install


Compilation on MinGW with MSYS:

cmake -D CMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" ..

Compilation on MinGW without MSYS:

cmake -D CMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" ..


Hasard 0.9 was tested on:

  • Ubuntu Gutsy on i386
  • Debian Etch on x86_64
  • FreeBSD7 on i386
  • Windows XP with MinGW on i386
  • Debian Etch on ppc32