Building CompuCell3D on OSX - 10.9+

This writeup presents easy-to-follow instructions on how to build CC3D on OSX 10.9+ 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

Important: GCC/G++ on OSX: The default gcc/g++on OSX ships with faulty OpenMP implementation. for this reason you need download gcc/g++ compiler separately. The hpc.sourceforge.net provides you with a proper gcc/g++ compiler and we are using them to compile CC3D on OSX. once you install proper compiler (usually you will just unpack it so that it gets installed in /usr/local) you are ready to begin the compilation

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/mac/376

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

python build.py --prefix=~/376_auto --source-root=~/CC3D_GIT --build-dir=~/376_auto_build --version=3.7.6 --cores=2 --conda-env-name=cc3d_test_12 --c-compiler=/usr/local/bin/gcc --cpp-compiler=/usr/local/bin/g++

Notice, that because of the gcc/g++ issue on OSX you need to manually point the build script to the gcc and g++ compiler using --c-compiler and --cpp-compiler command line options. IMPORTANT: the values above are valid for my configuration in your case those will be probably be different so please do not copy verbatim the above line

After last command completes few things will happen:

  1. new conda environment (cc3d_test_12) will be created (build.py script will do this automatically for you). BTW feel free to change the name of this environment to your liking

  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.command 

Possible qt conflicts: When running the above command you may get qt-related error that would say something like

You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".

Available platform plugins are: cocoa, minimal, offscreen.

This is an indication that there is another PyQt library installed on your system. For example you might have installed qt or pyqt using Homebrew . In this case Homebrew will create ~/.local/lib/python2.7/site-packages/homebrew.pth file that will specify Python module search path which in turn causes python to search locations specified by homebrew first. If this is the case you may want to temporarily deactivate this file by e.g. renaming it to e.g. ~/.local/lib/python2.7/site-packages/homebrew.pth_1

CompuCell3D: SrcBin/CompilingOnMac2017 (last edited 2017-07-25 02:57:55 by mswat)