Building from source
POSIX-compliant platforms
This section refers to building on AIX, FreeBSD, HP-UX, Linux, Mac OS X, OpenBSD, QNX Neutrino and Solaris platforms.
In addition to a Git client, you'll need autoconf, automake, libtool and pkg-config packages to build the project.
$ git clone git://github.com/sustrik/zeromq2.git zeromq
$ cd zeromq
$ sh ./autogen.sh
$ ./configure
$ make
$ sudo make install
For more detailed installation instructions have a look at INSTALL file in the root directory of the project.
For more information on configuration options (enabling/disabling optional functionality) use:
./configure --help
pkg-config issues
Building ØMQ from the development trunk requires that pkg-config is installed. A regular source build of ØMQ does not require pkg-config. On Mac OS X, pkg-config does not come with the system, so when you try to do configure you may see errors like:
./configure: line 23913: syntax error near unexpected token `GLIB,'
./configure: line 23913: ` PKG_CHECK_MODULES(GLIB, glib-2.0 gthread-2.0)'
To resolve this, you need to install the latest pkg-config:
$ tar xzf pkg-config-0.23.tar.gz
$ cd pkg-config-0.23
$ ./configure --prefix=/usr/local/pkg-config-0.23 --datarootdir=/usr/share
$ make
$ sudo make install
Then you will need to put /usr/local/pkg-config-0.23/bin on your $PATH. It is important to include the --datarootdir=/usr/share option, which will install the pkg.m4 file in /usr/share/aclocal, where aclocal will be able to find it.
Then you can build ØMQ itself:
$ ./autogen.sh # must do this again after installing pkg-config
$ ./configure # add other options here
$ make
$ sudo make install
Windows
This section refers to building on Windows platform.
To build you'll MS Visual C++ 2008 Express Edition. To donwload it free of charge click here.
Install Git client and download the source code from the repository:
git clone git://github.com/sustrik/zeromq1.git zeromq
Start the MSVC IDE and open the solution file located in builds\msvc subdirectory (msvc.sln). The solution contains projects to build all the libraries, executables and language extensions delivered with ØMQ. Also note that MSVC project builds C, Java and Python extensions as well.
When building Java extension don't forget to fill in appropriate development kit paths (Tools/Options/Projects and Solutions/VC++ Directories).
Add the path to your JDK bin directory to the executable files tab. For instance:
C:\Program Files\Java\jdk1.6.0_10\bin
Add the path to your JDK include directory and to include\win32 directory to the include directories tab. For example:
C:\Program Files\Java\jdk1.6.0_10\include
C:\Program Files\Java\jdk1.6.0_10\include\win32
To build Python extension you need to add python directories to MSVC IDE. Use 'Tools/Options/Projects and Solutions/VC++ Directories' from the main menu, then fill your python include directory into include directories tab. For instance:
C:\Python26\include
Next, fill your python libs directory into library files tab. For example:
C:\Python26\libs
Note: libpyzmq can be only build in Release configuration, as python26_d.lib is not installed by the Python installer on Windows.
To build OpenPGM on Windows you have to build the project under MinGW rather than using MSVC.
Creating package
POSIX compliant platforms
Use following sequence of commands to create the package:
$ ./autogen.sh
$ ./configure
$ make dist
The package will be placed into the root directory and named zeromq-X.Y.Z.tar.gz where X, Y and Z are major version, minor version and patch respectively.
