Building CompuCell3D on Linux

This writeup presents easy-to-follow instructions on how to build CC3D on Linux using CompuCell3D channel of Anaconda. Anaconda is a cloud-based system that provides easy-to-use cross-platform system for managing software packages and dependencies

Prerequisites

On Ubuntu all items (except conda - it has to be installed manually) can be installed automatically using the following command:

sudo apt-get install g++ build-essential git libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev

Important For this tutorial to work you need to make sure that libGLU.so is in the /usr/lib64. On Ubuntu this library will be installed in /usr/lib/x86_64-linux-gnu In this case you may have to create symbolic link (you have to be sudo to do that)

ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

If you are on CentOS 7.x you may have more work to do but it is fairly straightforward because you will need to create more symbolic links for completeness we are listing the commands necessary to accomplish this task:

cd /usr/lib64

ln  s libXt.so.6 libXt.so
ln -s libGLU.so.1 libGLU.so
ln -s libGLU.so.1 libGL.so
ln -s libXext.so.6 libXext.so
ln -s libX11.so.6 libX11.so
ln -s libICE.so.6 libICE.so
ln -s libSM.so.6 libSM.so

Of course you need to do it as super user and keep in mind that the library numbers (.so.x) may vary depending on your system version

CC3D_BUILD_SCRIPTS repository

Get main cc3d repository by running from your home directory the following command

mkdir ~/CC3D_GIT

cd ~/CC3D_GIT

git clone https://github.com/CompuCell3D/CompuCell3D.git .

Get cc3d_build_scripts repository by running from your home directory the following command

git clone https://github.com/CompuCell3D/cc3d_build_scripts.git

Once the cloning process is complete go to the directory where the build.py script for the current version of cc3d is located:

cd cc3d_build_scripts/linux/376

To run the build/install script run the following command:

python build.py --prefix=~/cc3d_376 --source-root=~/CC3D_GIT --build-dir=~/cc3d_376_build --version=3.7.6 --cores=2 --conda-env-name=cc3d_python

After last command completes few things will happen:

  1. new conda environment (cc3d_python) will be created (build.py script will do this automatically for you)

  2. the dependencies needed to build CC3D will be downloaded
  3. CC3D will be installed will be installed in ~/cc3d_376 . Temporary compilation files will get stored in ~/cc3d_376_build

Now all you have to do is to go the the installation directory and run CC3D:

cd ~/cc3d_376

./compucell3d.sh 

SrcBin/CompilingOnLinux2017 (last edited 2017-12-31 00:24:12 by mswat)