Operating system ================ TCE requires a Unix-style operating system such as Linux. Debian-based distributions like Debian and Ubuntu should have most of the required libraries included, but other distributions should work fine too. MacOS support is experimental. Library and tools version prerequisites for TCE =============================================== These are the current prerequisites for libraries and tools required to build TCE: Compiler supported versions ----------------- ------------------ GCC 4.7+ Clang 3.5+ Library supported versions library license ----------------- ------------------ --------------- Xerces-C++ 2.3.0+ Apache v2.0 wxWidgets 2.6.0+ wxWidgets Tcl 8.0-8.4 BSD-style Boost 1.48.0-1.53.0 very permissive sqlite3 3.2.0+ public domain LLVM 3.7-3.8 LLVM Release License Editline 2.9 BSD-style Python 2.4-2.8 PSF license Remarks concerning all libraries -------------------------------- Remember to install the '-dev' versions of the packages in order to get the library headers which are need to compile client code against them. You also need a version of "GNU Make" to build TCE. For example, to install the required libraries and tools for Ubuntu using its package manager 'apt-get', you need to execute the following command: sudo apt-get install libwxgtk2.8-dev libboost-{filesystem,graph,regex,thread}-dev \ tcl8.4-dev libedit-dev libsqlite3-dev sqlite3 libxerces-c2-dev g++ make latex2html \ libffi-dev This installs the required packages for an Red Hat 6 (and CentOS): sudo yum install -y bzr wxGTK-devel boost-devel tcl-devel libedit-devel sqlite-devel \ xerces-c-devel gcc-c++ make autoconf automake libtool Editline -------- Editline is used for command line editing/history browsing capabilities to the command line interface of the simulator. You can download the sources here: http://www.thrysoee.dk/editline/ Note: this library might require 'termcap' library in some distributions. The package is named 'libedit-dev' in Debian-based distributions. Boost ----- The development files of the following Boost libraries are required by TCE: . regexp, . spirit, . filesystem, . format, . thread, . graph, . tuple Some distributions, like Fedora Core, include all Boost libraries in a single package, but some, like Debian, have separated them in several packages. LLVM and Clang -------------- In order to compile programs from C/C++ with TCE, you need to install LLVM and Clang with some patches and correct LLVM build switches to fix issues affecting TCE use. You can do this most easily by executing tools/scripts/install_llvm_3.8.sh DEST_PATH where DEST_PATH is the absolute directory where you want the LLVM to be installed. This script installs some required patches to LLVM without which TCE refuses to build. Building and installing TCE =========================== After the required libraries have been installed, the following steps show how to build and install the TCE toolset. Creating the build scripts -------------------------- The scripts can be generated by running './autogen.sh' in the TCE root directory (where configure.ac is in). autogen.sh requires the autotools. I.e., you need 'libtool', 'automake' and 'autoconf' installed in your system. Setting compiler options ------------------------ Be sure to set CXXFLAGS environment variable to include aggressive optimization flags (e.g., "export CXXFLAGS=-O3") before running the 'configure' script. This results in a much more efficient TCE toolset. Most notably the architecture simulator can be more than 10x faster when compiled with aggressive compilation flags. Configuring TCE --------------- First, to create Makefiles you have to run configure as follows: ./configure --prefix=INSTALLATION_DIRECTORY If you don't give a prefix, TCE will be installed under /usr/local/. In that case you have to install TCE as the root user. Running 'make' -------------- After running configure, it should be enough to just type make && make install After installing TCE to somewhere in PATH, you can run a "smoke test" suite for the most important tools in the TCE installation by running the command 'tce-selftest -v'. This might take a couple of hours, depending on your computer's speed. OpenCL support ============== There is experimental and incomplete support for OpenCL. It's currently not usable for day-to-day OpenCL programming but is a work in progress. If you want to compile the support, for example, to help in implementing the missing features, read on. The OpenCL support uses the pocl project. In order to use TCE with the OpenCL support, install pocl so it can be found in your PATH and PKG_CONFIG_PATH. You can get it from http://launchpad.net/pocl. The tcecc compiler driver detects at runtime if you have pocl installed and enables the OpenCL C compilation feature. You can verify this by running 'tcecc --supported-languages' which should list 'OpenCL C'. See the TCE User Manual for more information on using the OpenCL in "offline mode". The another option is to use the 'ttasim' driver of pocl to simulate a host-device setup where the device is a TTA core (simulated using the ttasim engine). Refer to the pocl documentation on how to use it.