Installation

From BEMlab
Jump to: navigation, search

Installation procedure is consistent with a Unix/Linux procedure, which applies to both:

  • Binary based installation
  • Installation from sources

Using packages

Using binary packages is recommeded for all users who just want to use BEMLab and do not send patches nor problem reports. It also makes administration easier by giving control over installed software to the packaging system, specific to the platform used. This ensures the consistency of installed files, makes upgrading straight forward and ensures full integration with the operating system.

Binary packages

The BEMLab software is already provided with binary packages for selected Linux/Unix distributions' package systems or will be in the future:

  • Ubuntu/Debian -- .deb file
  • Fedora -- .rpm file

See Downloads for further instructions.

Source packages

The BEMLab source packages are already provided for the following Linux/Unix distributions or will be in the future.

Ubuntu/Debian

To build the binary package and install it run the following commands:

  1. Download source package files:
    mkdir bemlab
    cd bemlab
    wget http://bemlab.org/download/binaries/ubuntu/bemlab_1.0.1-1.dsc
    wget http://bemlab.org/download/binaries/ubuntu/bemlab_1.0.1-1.diff.gz
    wget http://bemlab.org/download/binaries/ubuntu/bemlab_1.0.1.orig.tar.gz
    
  2. Install dependencies if required (package names may differ, depending on your operating system version):
    sudo apt-get install dpkg-dev autotools-dev debhelper
  3. Extract source files:
    dpkg-source -x bemlab_1.0.1-1.dsc
  4. Build binary package:
    cd bemlab-1.0.1
    dpkg-buildpackage -rfakeroot -uc -b
    
  5. Install the built binary package:
    sudo dpkg -i ../bemlab_1.0.1-1_i386.deb

Fedora/RedHat

To build the binary package using the source package (.src.rpm) and install it afterwards, run the following commands:

  1. Download source package file:
    mkdir bemlab
    cd bemlab
    wget http://bemlab.org/download/binaries/fedora/bemlab-1.0.1-1.fc16.src.rpm
    
  2. Install build requisite: gcc-c++
    yum install gcc-c++
  3. Install RPM development tools
    yum install rpmdevtools
  4. Configure RPM build environment:
    cat ~/.rpmmacros 
    %_topdir /home/<username>/rpmbuild
    %_tmppath /home/<username>/rpmbuild/tmp
    %tmpdir /home/<username>/rpmbuild/tmp
    
  5. Create directory structure for rpm development tools:
    mkdir ~/rpmbuild; cd ~/rpmbuild; mkdir BUILD RPMS SOURCES SPECS SRPMS tmp
  6. Build binary package:
    rpmbuild --rebuild bemlab-1.0.1-1.fc16.src.rpm
  7. Install the built binary package:
    sudo rpm -ivh /home/<username>/rpmbuild/RPMS/i386/bemlab-1.0.1-1.fc16.i386.rpm

Ports/Portage packages

Gentoo uses portage and usually all installed software is compiled by systems' administrators, therefore port definition will be provided:

  • Gentoo -- .ebuild file

FreeBSD uses ports tree, where definitions with "instructions" how to build binary packages are gathered. Therefore port definition and compiled package file will be provided

  • FreeBSD -- bemlab port
  • FreeBSD -- .tbz binary file for stable release

Building from sources

Prerequisitives

Until now the only prerequisitve is GNU C++ compiler version 3 or higher. However the newest GNU C++ release is recommended for the newest BEMLab release. Multithreading (MT) support is available only for GNU C++ compiler version 4.4 or newer.

Build/Install

Using the following three lines, BEMLab software (and majority of other Unix/Linux software at the same time), can be configured (profiled to the running system), build and installed in the working operating system:

 ./configure
 make
 make install

Automake, Autoconf, Libtool configuration

If you obtained the sources from SVN, you do not have autogenerated files e.g. configuration script ./configure or multiple Makefiles. Therefore it is essential to generate them.

It can be done using the following scenario:

  1. Install autoconf, automake and libtool using the package system available in your operating system if you have not got it installed yet. E.g.:
    • For Debian/Ubuntu you may run:
    sudo apt-get install autoconf automake libtool
    • For RedHat/Fedora you may run:
    sudo yum install autoconf automake libtool
  2. Checkout the repository:
    svn checkout svn://svn.bemlab.org/bemlab/trunk bemlab --username guest --password guest
  3. Generate configuration files and appropriate Makefiles:
    aclocal
    autoconf
    automake --add-missing
    libtoolize --automake
    automake
    

Now required configuration files and Makefiles have been created and you can configure your package e.g.

./configure --prefix=/opt/bemlab --enable-tests --enable-debug