Ubuntu 12.04 Setup Script

From Cryptohaze Project Wiki
Revision as of 03:23, 10 April 2013 by Bitweasil (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Would you prefer to build Cryptohaze from source without needing to manually follow all the steps listed?

Good news - this is supported now with Ubuntu 12.04!

Contents

Prerequisites

This assumes a totally clean Ubuntu 12.04 LTS install without any of the build tools or anything else. If you've installed some of the tools and build-essential and similar, this script may miss some of the prerequisites. Please run the following to handle all the package dependencies before running the script:

sudo apt-get -y install build-essential subversion libcurl4-openssl-dev libncurses5-dev unzip libargtable2-dev debhelper dh-modaliases execstack dkms cmake

Download the setup script

The place to find the current revision of the setup script is on Sourceforge.

http://cryptohaze.svn.sourceforge.net/viewvc/cryptohaze/Cryptohaze-Combined/setup_scripts/setupLinuxBuildEnvironment.sh?view=log

In the "Links to HEAD" section, click the "Download" link and pick "Save File" - this will download the file into your ~/Downloads directory.

Create a working directory

Launch the terminal (in Unity, the main button, search for 'terminal' and pick it).

Make a directory for the build, move the script to it, and make it executable:

mkdir CHBuild
mv ~/Downloads/setupLinuxBuildEnvironment.sh ~/CHBuild
cd CHBuild
chmod 755 setupLinuxBuildEnvironment.sh

Run the build

Now, you should be able to just run the build script. It will ask for your password as it needs to install some packages as root, but should go about building everything!

If all goes well, you can get to the binaries:

cd ~/CHBuild/Cryptohaze-Dev/build/bin/

Details on the process

In something resembling execution order, this does the following:

  • Checks to see if g++ is installed.
    • If not installed, install some basic build dependencies.
  • Check for cmake (as this is not as common).
    • If not installed, install cmake.
  • Check for nvcc (nVidia's CUDA compiler).
    • If not installed, install the CUDA toolkit. This does NOT install the driver part - if you have an nVidia card and want to use it, you'll need to install the driver manually. This just installs the toolkit, as right now the build does build the CUDA bits even if you don't have an nVidia GPU.
  • Check to see if OpenCL is installed.
    • If not, download and install the AMD drivers. This does not set up X11, but will get the OpenCL runtime set up.
  • Check to see if a local copy of Boost is installed.
    • If not, download and install Boost into this directory. This allows me to work around distro version issues - some of the older versions of Boost do not work with Cryptohaze, and overwriting the distro version is not friendly.
  • Check for a local copy of libprotobuf.
    • Same thing - build from source. Not all distros include an up to date copy of libprotobuf.
  • Check out the current source tree from SVN.
  • Configure cmake with the local directories.
  • Build the project and install the binaries into ~/CHBuild/Cryptohaze-Dev/build/bin/
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox