Skip to content
Jafet Villafranca edited this page Apr 29, 2015 · 17 revisions

Common dependencies

  • ZeroMQ (libzmq 4.0)
  • Boost 1.41 (unit_test_framework component required for zeq; regex serialization filesystem system thread unit_test_framework required for Lunchbox)
  • Git (to clone the CMake/common subtree and project dependencies)
  • Python 2.7 is required at the moment (CMake/common subtree to be fixed)

General

The common process to build zeq on any platform is based on the superproject feature in the CMake/common subtree. Using this, several CMake subprojects (which typically depend on each other) can be build. In this case, the main dependencies are FlatBuffers and Lunchbox.

git clone https://github.com/HBPVIS/zeq.git
mkdir zeq/build
cd zeq/build
cmake .. [ -G"Visual Studio 12 Win64" ] [ -DCMAKE_INSTALL_PREFIX:PATH="path_to_install" ]

And then, on Unix systems:

make -j8  # parallel build, splitting the task into 8 jobs

or on Windows:

cmake --build . 
cmake --build . --target INSTALL (in case you want to install)

This process will clone all the dependent projects (FlatBuffers and Lunchbox) under zeq/, and build them in the build directory. In the configuration step, the INSTALL_PACKAGES definition can be specified as:

cmake -DINSTALL_PACKAGES=1 ..

to automatically install the system packages required (boost, zmq...), or install them manually (e.g. apt in Ubuntu/Debian; Macports in OS X). See "Common practices" page for more information.

After the build process is finished, the libraries will be created under build/lib and binaries under build/bin. The installation of the built artifacts can be achieved by make install, and they will be placed in the directory specified in the CMAKE_INSTALL_PREFIX. This applies to the zeq library and also its dependencies.

Windows specifics

Boost

  • A pre-built version might be needed: http://boost.teeks99.com (be careful here, the prebuilds might actually not link, e.g., against your Python lib)
  • If you build boost on your own do not forget to change all library names by removing the prefix lib. Otherwise your libraries are not named properly to be found by CMake
  • If you encounter the meaningful message BOOST_NOT_FOUND, try invoking:
cmake 'path_to_build_dir' -DBoost_DEBUG=1
  • In addition, you need to build shared libraries, the static one won't work
  • Take a close look on the naming schema required to match with Lunchbox
  • The following environment variables need to be defined: BOOST_LIBRARYDIR, BOOST_ROOT (Warning! Beware of the backslashes, they can cause problems when present in the path definitions. Replace with forward slashes)
  • A common issue is that the boost version automatically found by CMake will always be used, and manual changes in the CMake configuration will have no effect. To be checked.

ZMQ

  • When compiling zmq from source, the binaries need to be installed in order to obtain the correct directory structure (libraries in */lib).
  • Pre-built binaries can be found at: http://zeromq.org/distro:microsoft-windows
  • The following environment variable needs to be defined:: LIBZMQ_ROOT_DIR

Git

  • The PATH environment variable needs to point to the git executable

Python

Flatbuffers and Lunchbox

  • Clone flatbuffers from https://github.com/BlueBrain/flatbuffers.git
  • Clone Lunchbox from https://github.com/Eyescale/Lunchbox
  • Set the CMAKE_INSTALL_PREFIX to the desired install location
  • flatbuffers and Lunchbox will be installed in the specified location, including the corresponding projectConfig.cmake files, that can be later found by other projects by just specifying the directory in the CMAKE_PREFIX_PATH

Build ZEQ

Without pre-build Flatbuffers and Lunchbox

  • run in a visual studio command line

msbuild ALL_BUILD.vcxproj /m /v:m and msbuild INSTALL.vcxproj /m /v:m

With pre-build Flatbuffers and Lunchbox

  • you can simply build the project within the Visual Studio IDE