Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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('
like image 476
Joshua Avatar asked Aug 19 '10 13:08

Joshua


2 Answers

A better solution is:

eval `brew --config | grep HOMEBREW_PREFIX | sed 's/: /=/'`
sudo bash -c 'echo '$HOMEBREW_PREFIX/share/aclocal' >> `aclocal --print-ac-dir`/dirlist'

This will allow the version of aclocal that ships with OSX to find any macros installed by homebrew packages.

like image 90
Beekhof Avatar answered Sep 20 '22 17:09

Beekhof


With homebrew, the key is the warning message:

~/code/foss/java/jzmq$ brew install pkg-config                                                                                    
==> Downloading http://pkg-config.freedesktop.org/releases/pkg-config-0.25.tar.gz
==> ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.25 --with-pc-path=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
==> make install
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
==> Summary
/usr/local/Cellar/pkg-config/0.25: 8 files, 232K, built in 19 seconds

If you look at /usr/local/Cellar/pkg-config/0.25/share/aclocal/, you will see:

$ ls /usr/local/Cellar/pkg-config/0.25/share/aclocal/                                                            
pkg.m4

You need to append /usr/local/Cellar/pkg-config/0.25/share/aclocal/ to /usr/share/aclocal/dirlist,like this:

$ cat   /usr/share/aclocal/dirlist                                                                           
/usr/local/share/aclocal
/usr/local/Cellar/pkg-config/0.25/share/aclocal/

And then re-run autogen and the other steps.

like image 25
Phil Calçado Avatar answered Sep 21 '22 17:09

Phil Calçado