macospkg-configzeromqjzmq

How do I compile jzmq for ZeroMQ on OSX?


Trying to follow the directions from: http://github.com/zeromq/jzmq

I installed pkg-config using Homebrew and then I run the following commands: ./autogen.sh ./configure

The configure fails with:

checking how to hardcode library paths into programs... immediate
./configure: line 15263: syntax error near unexpected token `newline'
./configure: line 15263: `    PKG_CHECK_MODULES('

Solution

  • I made a simple list about jzmq building for MacOS.

    1. Install brew

      https://brew.sh

    2. Install tools for jzmq building

      brew install autoconf
      
      brew install automake
      
      brew install libtool
      
      brew install pkg-config
      
      brew install zeromq@3.2
      
    3. Download jzmq source

      https://github.com/zeromq/jzmq source download to ~/somewhere/jzmq

    4. Add symbolic link to /usr/local/include

      cd /usr/local/include
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/include/zmq.h
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/include/zmq_utils.h 
      
    5. Add symbolic linke to /usr/local/lib

      cd /usr/local/lib
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/lib/libzmq.3.dylib
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/lib/libzmq.a
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/lib/libmq.dylib
      
      ln -s /usr/local/Cellar/zeromq\@3.2/3.2.5/lib/pkgconfig/
      
    6. Build jzmq-jni

      cd ~/somewhere/jzmq
      
      cd jzmq-jni
      
      
      ./autogen.sh
      
      ./configure
      
      make
      
      make install
      
    7. Add option to VM options

    VM options -Djava.library.path=/usr/local/lib